-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdump.sql
More file actions
25 lines (23 loc) · 1.13 KB
/
dump.sql
File metadata and controls
25 lines (23 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The unique user ID.',
`email` varchar(50) NOT NULL COMMENT 'The e-moe of the user.',
`password` varchar(100) NOT NULL COMMENT 'The hash of the user password.',
`session_token` varchar(100) DEFAULT NULL COMMENT 'The session token.',
`session_expire` bigint(20) DEFAULT NULL COMMENT 'The session expiration time.',
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `session_token` (`session_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='API sample project.';
INSERT INTO `users` (`id`, `email`, `password`, `session_token`, `session_expire`) VALUES
(1, 'admin@example.com', '$2y$10$3ujtWcwuB6IQbKYNHo1tfOTCLUalnQcdcEDnt.iDcg0no/7tPSLe2', NULL, NULL);
DROP TABLE IF EXISTS `logs`;
CREATE TABLE IF NOT EXISTS `logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ip` varchar(16) NOT NULL,
`endpoint` varchar(256) NOT NULL,
`token` varchar(100) DEFAULT NULL,
`result` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;