Initial OnlyScavs: keys, ratings, grid icons
This commit is contained in:
27
migrations_v1.sql
Normal file
27
migrations_v1.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
-- V1: maps tagging + used_in_quest flag
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS maps (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT UNIQUE
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS key_maps (
|
||||
key_id INTEGER NOT NULL,
|
||||
map_id INTEGER NOT NULL,
|
||||
PRIMARY KEY (key_id, map_id),
|
||||
FOREIGN KEY (key_id) REFERENCES keys(id),
|
||||
FOREIGN KEY (map_id) REFERENCES maps(id)
|
||||
);
|
||||
|
||||
ALTER TABLE key_ratings ADD COLUMN used_in_quest INTEGER DEFAULT 0;
|
||||
|
||||
INSERT OR IGNORE INTO maps (name) VALUES
|
||||
('Customs'),
|
||||
('Factory'),
|
||||
('Shoreline'),
|
||||
('Interchange'),
|
||||
('Reserve'),
|
||||
('Woods'),
|
||||
('Labs'),
|
||||
('Streets');
|
||||
Reference in New Issue
Block a user