3 type Migration struct {
9 var migrations []Migration = []Migration{
14 id BIGSERIAL PRIMARY KEY,
16 password_hash text NOT NULL,
22 `CREATE TABLE market_configs (
23 id BIGSERIAL PRIMARY KEY,
24 market_name text NOT NULL,
25 user_id bigint NOT NULL REFERENCES users(id),
27 UNIQUE(user_id, market_name)
29 `CREATE TABLE report_lines (
30 id BIGSERIAL PRIMARY KEY,
31 date timestamp with time zone NOT NULL,
32 report_id bigint NOT NULL,
36 "CREATE INDEX IF NOT EXISTS report_lines_report_id ON report_lines (report_id)",
37 "CREATE INDEX IF NOT EXISTS report_lines_type ON report_lines (type)",
39 Down: []string{"DROP TABLE users", "DROP TABLE market_configs", "DROP TABLE report_lines"},