mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-07-12 20:16:21 +02:00
Update database schema
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
-- PHP-Auth (https://github.com/delight-im/PHP-Auth)
|
||||||
|
-- Copyright (c) delight.im (https://www.delight.im/)
|
||||||
|
-- Licensed under the MIT License (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `users` (
|
CREATE TABLE IF NOT EXISTS `users` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL,
|
`email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
@ -35,12 +44,12 @@ CREATE TABLE IF NOT EXISTS `users_remembered` (
|
|||||||
CREATE TABLE IF NOT EXISTS `users_resets` (
|
CREATE TABLE IF NOT EXISTS `users_resets` (
|
||||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`user` int(10) unsigned NOT NULL,
|
`user` int(10) unsigned NOT NULL,
|
||||||
`selector` varchar(24) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,
|
`selector` varchar(20) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,
|
||||||
`token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,
|
`token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,
|
||||||
`expires` int(10) unsigned NOT NULL,
|
`expires` int(10) unsigned NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `selector` (`selector`),
|
UNIQUE KEY `selector` (`selector`),
|
||||||
KEY `user` (`user`)
|
KEY `user_expires` (`user`,`expires`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `users_throttling` (
|
CREATE TABLE IF NOT EXISTS `users_throttling` (
|
||||||
@ -52,3 +61,7 @@ CREATE TABLE IF NOT EXISTS `users_throttling` (
|
|||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `action_type_selector_time_bucket` (`action_type`,`selector`,`time_bucket`)
|
UNIQUE KEY `action_type_selector_time_bucket` (`action_type`,`selector`,`time_bucket`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
|
Reference in New Issue
Block a user