summaryrefslogtreecommitdiff
path: root/nodejs/database/004_markets.sql
blob: 668e4d76806ac22820309755c1f9d1c014963779 (plain)
1
2
3
4
5
6
7
CREATE TABLE markets (
       id INTEGER PRIMARY KEY,
       system TEXT NOT NULL,
       data JSON NOT NULL
);
CREATE INDEX markets_system on markets (system);
CREATE UNIQUE INDEX markets_symbol on markets(json_extract(data, '$.symbol'));