diff options
author | Matthew Lemon <y@yulqen.org> | 2024-04-10 19:33:21 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-04-10 19:33:21 +0100 |
commit | e69391d4f309f6268440632585bbddf3a2a5bd60 (patch) | |
tree | 9e0faa4a92f06dbd8c228ba80752ea5f4d89dd17 /migrations/000001_create_datamaps_datamap_line_tables.up.sql | |
parent | d36c48b3251b9da483f06318ecaa14b9a4fa7118 (diff) |
First introduction of migrations using golang-migrate
Diffstat (limited to 'migrations/000001_create_datamaps_datamap_line_tables.up.sql')
-rw-r--r-- | migrations/000001_create_datamaps_datamap_line_tables.up.sql | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/migrations/000001_create_datamaps_datamap_line_tables.up.sql b/migrations/000001_create_datamaps_datamap_line_tables.up.sql new file mode 100644 index 0000000..be96b96 --- /dev/null +++ b/migrations/000001_create_datamaps_datamap_line_tables.up.sql @@ -0,0 +1,15 @@ +CREATE TABLE IF NOT EXISTS datamaps ( + id bigserial PRIMARY KEY, + name text, + description text, + created timestamp(0) with time zone NOT NULL DEFAULT NOW() +); + +CREATE TABLE IF NOT EXISTS datamap_lines ( + datamap_line_id bigserial PRIMARY KEY, + datamap_id bigserial REFERENCES datamaps ON DELETE CASCADE, + key text, + sheet text, + data_type text, + cellref text +); |