mirror of
https://gitlab.com/jrmiller82/pathfinder-2-sqlite.git
synced 2026-10-16 22:29:44 -04:00
Bulks sourceEntry conversion
This commit is contained in:
1 parent
4e295080d8
commit
a9d20d40dd
2 files changed
+41
-11
No files matched your search
+9
-2
@@ -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)
|
||||
);
|
||||
Reference in new issue
Block a user