summaryrefslogtreecommitdiff
path: root/nodejs/database/003_surveys.sql
blob: 0548796c5f2b83150fc4aec9f0bc22aa1cc6ec64 (plain)
1
2
3
4
5
6
CREATE TABLE surveys (
       id INTEGER PRIMARY KEY,
       data JSON NOT NULL
);
CREATE INDEX surveys_data_symbol on surveys (json_extract(data, '$.symbol'));
CREATE INDEX surveys_data_expiration on surveys (json_extract(data, '$.expiration'));