2021-03-24 09:28:05 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS `users` (
|
|
|
|
`uuid` BINARY(16) PRIMARY KEY,
|
2021-04-02 12:11:05 +00:00
|
|
|
`created_at` DATETIME NOT NULL DEFAULT NOW(),
|
2021-03-25 23:21:28 +00:00
|
|
|
`created_ip` VARBINARY(16) NULL DEFAULT NULL,
|
2021-04-02 12:11:05 +00:00
|
|
|
`modified_at` DATETIME NOT NULL DEFAULT NOW(),
|
2021-03-25 23:21:28 +00:00
|
|
|
`modified_ip` VARBINARY(16) NULL DEFAULT NULL,
|
2021-03-24 09:28:05 +00:00
|
|
|
`username` VARCHAR(64) NOT NULL,
|
|
|
|
`password` VARCHAR(60) NOT NULL,
|
|
|
|
`email` VARCHAR(255) NULL DEFAULT NULL,
|
|
|
|
`verified` TINYINT(1) NOT NULL DEFAULT 0,
|
|
|
|
`active` TINYINT(1) NOT NULL DEFAULT 1,
|
|
|
|
`admin` TINYINT(1) NOT NULL DEFAULT 0,
|
2021-04-01 10:17:46 +00:00
|
|
|
`private` TINYINT(1) NOT NULL DEFAULT 0,
|
2021-04-02 09:24:00 +00:00
|
|
|
`timezone` VARCHAR(100) NOT NULL DEFAULT 'Etc/UTC',
|
2021-03-24 09:28:05 +00:00
|
|
|
KEY `usernameLookup` (`username`, `active`),
|
|
|
|
KEY `emailLookup` (`email`, `active`)
|
|
|
|
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci;
|