summaryrefslogtreecommitdiff
path: root/nodejs/database/002_ships.sql
blob: 402adef08132fd0a923c64ba77de08cb4ebd784e (plain)
1
2
3
4
5
6
CREATE TABLE ships (
       id INTEGER PRIMARY KEY,
       data JSON NOT NULL
);
CREATE UNIQUE INDEX ships_data_symbol ON ships (json_extract(data, '$.symbol'));
CREATE INDEX ships_data_nav_systemSymbol ON ships (json_extract(data, '$.nav.systemSymbol'));