From 6499b28df7b90025b5045cb343a110a1bdb6dfbe Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 28 Mar 2018 20:45:38 -0400 Subject: Optimized dids table --- schema.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/schema.sql b/schema.sql index ade7522..c4724f8 100644 --- a/schema.sql +++ b/schema.sql @@ -20,10 +20,11 @@ CREATE TABLE `achievements` ( ); CREATE TABLE `dids` ( - `profile_id` INTEGER NOT NULL, `achievement_id` INTEGER NOT NULL, - `achieved_at` DATETIME NOT NULL -); + `profile_id` INTEGER NOT NULL, + `achieved_at` DATETIME NOT NULL, + PRIMARY KEY (`achievement_id`, `profile_id`) +) WITHOUT ROWID; CREATE TABLE `images` ( `image_id` INTEGER PRIMARY KEY, -- cgit 1.4.1