mirror of
https://gitlab.com/jrmiller82/pathfinder-2-sqlite.git
synced 2026-10-12 22:29:44 -04:00
scratch, that neede the data and schema here
This commit is contained in:
1 parent
0f60606c73
commit
8e4a82aa9e
2 files changed
+77
No files matched your search
@@ -0,0 +1,48 @@
|
||||
-- -*- mode:sql sql-product:sqlite -*-
|
||||
|
||||
PRAGMA foreign_keys = ON; -- database requires foreign key checking to be turned
|
||||
-- on PER CONNECTION
|
||||
|
||||
CREATE TABLE weapongroups (
|
||||
weapongroups_id INTEGER PRIMARY KEY,
|
||||
sources_id INTEGER,
|
||||
sources_pages TEXT,
|
||||
"name" TEXT NOT NULL UNIQUE,
|
||||
descr TEXT,
|
||||
FOREIGN KEY (sources_id) REFERENCES sources(sources_id)
|
||||
);
|
||||
|
||||
CREATE TABLE weaponcategories (
|
||||
weaponcategories_id INTEGER PRIMARY KEY,
|
||||
"name" TEXT NOT NULL UNIQUE
|
||||
);
|
||||
|
||||
CREATE TABLE weapons (
|
||||
weapons_id INTEGER PRIMARY KEY,
|
||||
sources_id INTEGER,
|
||||
sources_pages TEXT,
|
||||
weaponcategories_id INTEGER,
|
||||
weapongroups_id INTEGER,
|
||||
price_gp REAL,
|
||||
dice_size INTEGER,
|
||||
damagetypes_id INTEGER,
|
||||
"bulk" REAL,
|
||||
hands TEXT, -- '1+' is different than '1' per the rules
|
||||
range INTEGER,
|
||||
reload TEXT, -- '-' is significant in the rules
|
||||
"name" TEXT NOT NULL UNIQUE,
|
||||
descr TEXT,
|
||||
FOREIGN KEY (weapongroups_id) REFERENCES weapongroups(weapongroups_id),
|
||||
FOREIGN KEY (weaponcategories_id) REFERENCES weaponcategories(weaponcategories_id),
|
||||
FOREIGN KEY (sources_id) REFERENCES sources(sources_id)
|
||||
);
|
||||
|
||||
CREATE TABLE weapons_traits (
|
||||
id INTEGER PRIMARY KEY,
|
||||
weapons_id INTEGER NOT NULL,
|
||||
trait_id INTEGER NOT NULL,
|
||||
UNIQUE(weapons_id, trait_id)
|
||||
FOREIGN KEY (weapons_id) REFERENCES weapons(weapons_id),
|
||||
FOREIGN KEY (trait_id) REFERENCes traits(trait_id)
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user