From 34ffc73485e871868ec73ff9bde4339f4bc4c753 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 2 Dec 2021 17:54:48 -0800 Subject: issue-db: fixes to schema The primary key on release_counts was resulting in only one row per pubid. Also the 'year_in_sim' column was never being used. --- schema/issue_db.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'schema') diff --git a/schema/issue_db.sql b/schema/issue_db.sql index e07e97e..422717e 100644 --- a/schema/issue_db.sql +++ b/schema/issue_db.sql @@ -26,10 +26,10 @@ CREATE TABLE IF NOT EXISTS sim_issue ( -- intent here is to capture how many releases are just not getting matched due -- to missing issue metadata CREATE TABLE IF NOT EXISTS release_counts ( - sim_pubid TEXT NOT NULL PRIMARY KEY, - year TEXT, - volume TEXT, - year_in_sim BOOLEAN, - release_count INTEGER, + sim_pubid TEXT NOT NULL, + year TEXT NOT NULL, + volume TEXT NOT NULL, + release_count INTEGER NOT NULL, + PRIMARY KEY(sim_pubid, year, volume), FOREIGN KEY(sim_pubid) REFERENCES sim_pub(sim_pubid) ); -- cgit v1.2.3