From e4815b407b546bbd64cabf085fe923e6bcfdfe72 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 11 Mar 2015 15:34:10 +0900 Subject: [PATCH] Database cleanup --- scrape/build_db.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scrape/build_db.js b/scrape/build_db.js index 548b723..29d63cd 100755 --- a/scrape/build_db.js +++ b/scrape/build_db.js @@ -82,15 +82,15 @@ for (var i = 0, count = categories.length; i < count; ++i) { // conn.query('DROP TABLE IF EXISTS history'); -conn.query('CREATE TABLE history(date DATETIME NOT NULL, reviewId INT NOT NULL, subspaceId INT NOT NULL)'); +conn.query('CREATE TABLE history(date DATETIME NOT NULL, reviewId INT NOT NULL, id INT NOT NULL AUTO_INCREMENT PRIMARY KEY)'); // -// Subspaces +// HistoryGroup // -conn.query('DROP TABLE IF EXISTS subspaces'); -conn.query('CREATE TABLE subspaces(categoryId INT NOT NULL, subspaceId INT NOT NULL AUTO_INCREMENT PRIMARY KEY)'); +conn.query('DROP TABLE IF EXISTS historyGroups'); +conn.query('CREATE TABLE historyGroups(categoryId INT NOT NULL, historyId INT NOT NULL)'); //