diff options
author | jloup <jeanloup.jamet@gmail.com> | 2018-05-01 02:44:04 +0200 |
---|---|---|
committer | jloup <jeanloup.jamet@gmail.com> | 2018-05-01 02:44:04 +0200 |
commit | 2b2fd737b4b6e530e67de743e58b630d69228c57 (patch) | |
tree | d0f2f5cc7fe3c3a1fdb641d5fc0cf06c8a0bf3f3 | |
parent | 323b7f4032d19c06523f2eaaf1d20d32e1330b54 (diff) | |
download | Front-2b2fd737b4b6e530e67de743e58b630d69228c57.tar.gz Front-2b2fd737b4b6e530e67de743e58b630d69228c57.tar.zst Front-2b2fd737b4b6e530e67de743e58b630d69228c57.zip |
Add reports CREATE TABLE.
-rw-r--r-- | db/migrations.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/db/migrations.go b/db/migrations.go index ce5caf6..286fe17 100644 --- a/db/migrations.go +++ b/db/migrations.go | |||
@@ -35,7 +35,14 @@ var migrations []Migration = []Migration{ | |||
35 | )`, | 35 | )`, |
36 | "CREATE INDEX IF NOT EXISTS report_lines_report_id ON report_lines (report_id)", | 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)", | 37 | "CREATE INDEX IF NOT EXISTS report_lines_type ON report_lines (type)", |
38 | `CREATE TABLE reports ( | ||
39 | id BIGSERIAL PRIMARY KEY, | ||
40 | date timestamp with time zone NOT NULL, | ||
41 | market_config_id bigint NOT NULL, | ||
42 | debug boolean | ||
43 | )`, | ||
44 | "CREATE INDEX IF NOT EXISTS reports_market_config_id ON reports (market_config_id)", | ||
38 | }, | 45 | }, |
39 | Down: []string{"DROP TABLE users", "DROP TABLE market_configs", "DROP TABLE report_lines"}, | 46 | Down: []string{"DROP TABLE users", "DROP TABLE market_configs", "DROP TABLE report_lines", "DROP TABLE reports"}, |
40 | }, | 47 | }, |
41 | } | 48 | } |