Basic sessions schema which is used as a api key cache
This commit is contained in:
parent
0340204141
commit
9c03207489
2
server/migrations/2020-05-17-225334_sessions/down.sql
Normal file
2
server/migrations/2020-05-17-225334_sessions/down.sql
Normal file
@ -0,0 +1,2 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE `sessions`;
|
9
server/migrations/2020-05-17-225334_sessions/up.sql
Normal file
9
server/migrations/2020-05-17-225334_sessions/up.sql
Normal file
@ -0,0 +1,9 @@
|
||||
-- id's are given back to the user otherwise everything is server sided
|
||||
-- NOTE: the expires column is not explicitly a date because the code required
|
||||
-- to make the DATE field work with diesel is ass and looks annoying
|
||||
CREATE TABLE IF NOT EXISTS `sessions` (
|
||||
`id` bigint UNSIGNED NOT NULL auto_increment,
|
||||
`secret` varchar(255) NOT NULL,
|
||||
`expires` bigint UNSIGNED NOT NULL,
|
||||
PRIMARY KEY(`id`)
|
||||
);
|
Loading…
Reference in New Issue
Block a user