forked from tomcur/CookieTokenAuth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.sql
46 lines (40 loc) · 991 Bytes
/
db.sql
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--
-- Table structure for table `auth_tokens`
--
CREATE TABLE `auth_tokens` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`series` varchar(255) NOT NULL,
`token` varchar(255) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`expires` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `auth_tokens`
--
ALTER TABLE `auth_tokens`
ADD PRIMARY KEY (`id`),
ADD KEY `user_id` (`user_id`),
ADD KEY `series` (`series`),
ADD KEY `token` (`token`),
ADD KEY `expires` (`expires`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `auth_tokens`
--
ALTER TABLE `auth_tokens`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `auth_tokens`
--
ALTER TABLE `auth_tokens`
ADD CONSTRAINT `auth_tokens_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;