This repository has been archived on 2022-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
tacitus/config/postgres.sql

16 lines
408 B
MySQL
Raw Normal View History

2017-09-07 23:04:47 -07:00
CREATE TABLE trades (
id SERIAL PRIMARY KEY,
trade_id integer NOT NULL,
2017-09-21 10:25:30 -07:00
product CHAR(7) NOT NULL,
2017-09-07 23:04:47 -07:00
price NUMERIC(1000, 8) NOT NULL,
size NUMERIC(1000, 8) NOT NULL,
buy BOOLEAN NOT NULL DEFAULT FALSE,
sell BOOLEAN NOT NULL DEFAULT FALSE,
timestamp TIMESTAMPTZ NOT NULL);
2017-09-10 13:06:53 -07:00
CREATE UNIQUE INDEX product_trade_id_index ON trades (
product,
trade_id);
2017-09-07 23:04:47 -07:00
CREATE INDEX timestamp_index ON trades (timestamp);