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