Updated SQL for auth
Updated SQL for auth
This commit is contained in:
parent
c435d43137
commit
e7c84abc30
|
@ -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 */;
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
ALTER TABLE `servers`
|
|
||||||
ADD COLUMN `asn` VARCHAR(124) NULL DEFAULT NULL AFTER `notes`;
|
|
20
update1.4to1.5.sql
Normal file
20
update1.4to1.5.sql
Normal 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;
|
Loading…
Reference in New Issue
Block a user