From ec4f9b5302c7ffa519fd19d95ceafd1830c86f9c Mon Sep 17 00:00:00 2001 From: shockrah Date: Tue, 19 May 2020 20:08:26 -0700 Subject: [PATCH] using secret as primary key --- server/migrations/2020-05-17-225334_sessions/up.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/migrations/2020-05-17-225334_sessions/up.sql b/server/migrations/2020-05-17-225334_sessions/up.sql index 579bf1b..1a7b9f9 100644 --- a/server/migrations/2020-05-17-225334_sessions/up.sql +++ b/server/migrations/2020-05-17-225334_sessions/up.sql @@ -2,8 +2,7 @@ -- 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, `secret` varchar(255) NOT NULL, `expires` bigint UNSIGNED NOT NULL, - PRIMARY KEY(`id`) + PRIMARY KEY(`secret`) ); \ No newline at end of file