Bulks sourceEntry conversion

This commit is contained in:
Brian Haley committed 2019-11-12 22:36:23 -05:00
1 parent 4e295080d8
commit a9d20d40dd
2 files changed
+41 -11

No files matched your search

+9 -2
View File
@@ -1,10 +1,17 @@
CREATE TABLE bulks (
bulk_id INTEGER PRIMARY KEY,
sources_id INTEGER NOT NULL,
sources_pages TEXT NOT NULL,
short_name TEXT NOT NULL,
long_name TEXT NOT NULL,
numerical FLOAT NOT NULL,
FOREIGN KEY (sources_id) REFERENCES sources(sources_id)
);
-- Joining table --
CREATE TABLE bulks_sourceentries (
id INTEGER PRIMARY KEY
,bulk_id INTEGER NOT NULL
,sourceentry_id INTEGER NOT NULL
,UNIQUE (id, bulk_id, soruceentry_id),
,FOREIGN KEY (bulk_id) REFERENCES bulks(bulk_id)
,FOREIGN KEY (sourceentry_id) REFERENCES sourceentries(sourceentry_id)
);