1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-16 23:42:32 +01:00

Updated SQL for auth

Updated SQL for auth
This commit is contained in:
cp6 2021-03-17 11:37:49 +11:00
parent c435d43137
commit e7c84abc30
3 changed files with 41 additions and 2 deletions

View File

@ -394,6 +394,27 @@ CREATE TABLE IF NOT EXISTS `speed_tests`
/*!40000 ALTER TABLE `speed_tests` /*!40000 ALTER TABLE `speed_tests`
ENABLE KEYS */; ENABLE KEYS */;
CREATE TABLE IF NOT EXISTS `auth`
(
`user` varchar(64) NOT NULL,
`pass` varchar(255) DEFAULT NULL,
`token` char(32) DEFAULT NULL,
`login_count` int(11) DEFAULT 0,
`login_fails` int(11) DEFAULT 0,
`last_login` datetime DEFAULT NULL,
`last_fail` datetime DEFAULT NULL,
PRIMARY KEY (`user`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
CREATE TABLE IF NOT EXISTS `login_attempts`
(
`user` varchar(124) DEFAULT NULL,
`ip` varchar(124) DEFAULT NULL,
`datetime` datetime DEFAULT current_timestamp()
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
/*!40101 SET SQL_MODE = IFNULL(@OLD_SQL_MODE, '') */; /*!40101 SET SQL_MODE = IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS = IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; /*!40014 SET FOREIGN_KEY_CHECKS = IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT = @OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_CLIENT = @OLD_CHARACTER_SET_CLIENT */;

View File

@ -1,2 +0,0 @@
ALTER TABLE `servers`
ADD COLUMN `asn` VARCHAR(124) NULL DEFAULT NULL AFTER `notes`;

20
update1.4to1.5.sql Normal file
View File

@ -0,0 +1,20 @@
CREATE TABLE IF NOT EXISTS `auth`
(
`user` varchar(64) NOT NULL,
`pass` varchar(255) DEFAULT NULL,
`token` char(32) DEFAULT NULL,
`login_count` int(11) DEFAULT 0,
`login_fails` int(11) DEFAULT 0,
`last_login` datetime DEFAULT NULL,
`last_fail` datetime DEFAULT NULL,
PRIMARY KEY (`user`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
CREATE TABLE IF NOT EXISTS `login_attempts`
(
`user` varchar(124) DEFAULT NULL,
`ip` varchar(124) DEFAULT NULL,
`datetime` datetime DEFAULT current_timestamp()
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;