aboutsummaryrefslogtreecommitdiffstats
path: root/migrations/dbasik.sql
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-04-10 19:33:21 +0100
committerMatthew Lemon <y@yulqen.org>2024-04-10 19:33:21 +0100
commite69391d4f309f6268440632585bbddf3a2a5bd60 (patch)
tree9e0faa4a92f06dbd8c228ba80752ea5f4d89dd17 /migrations/dbasik.sql
parentd36c48b3251b9da483f06318ecaa14b9a4fa7118 (diff)
First introduction of migrations using golang-migrate
Diffstat (limited to 'migrations/dbasik.sql')
-rw-r--r--migrations/dbasik.sql32
1 files changed, 0 insertions, 32 deletions
diff --git a/migrations/dbasik.sql b/migrations/dbasik.sql
deleted file mode 100644
index b5bb6f9..0000000
--- a/migrations/dbasik.sql
+++ /dev/null
@@ -1,32 +0,0 @@
-CREATE TABLE "datamap" (
- "id" int PRIMARY KEY,
- "name" varchar,
- "description" varchar
-);
-
-CREATE TABLE "datamapline" (
- "id" uuid PRIMARY KEY,
- "datamap_id" uuid,
- "name" string,
- "cellref" string,
- "sheet" string,
- "data_type" string
-);
-
-CREATE TABLE "returnitem" (
- "id" uuid PRIMARY KEY,
- "datamapline_id" uuid,
- "return_id" int,
- "value" string
-);
-
-CREATE TABLE "return" (
- "id" int PRIMARY KEY,
- "name" string
-);
-
-ALTER TABLE "datamapline" ADD FOREIGN KEY ("datamap_id") REFERENCES "datamap" ("id");
-
-ALTER TABLE "returnitem" ADD FOREIGN KEY ("datamapline_id") REFERENCES "datamapline" ("id");
-
-ALTER TABLE "returnitem" ADD FOREIGN KEY ("return_id") REFERENCES "return" ("id");