summaryrefslogtreecommitdiff
path: root/dichroism/migrations
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-10-22 17:44:38 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-10-22 17:44:38 -0400
commit99dabd3f2f81ffcf0b6f2b59e13ebb4502b2ccac (patch)
tree15e19324332173405fc7544af2c17195d7b05ff1 /dichroism/migrations
parent76a782599b4ecc4ecb9b0ce7acc6420ed9e1ec8e (diff)
downloadtheglassyladies-99dabd3f2f81ffcf0b6f2b59e13ebb4502b2ccac.tar.xz
theglassyladies-99dabd3f2f81ffcf0b6f2b59e13ebb4502b2ccac.zip
Added product migration, better organization of DTOs, Entities, and
Domain Models. Also made config loading/photo generation easier.
Diffstat (limited to 'dichroism/migrations')
-rw-r--r--dichroism/migrations/2020-10-21-221149_products/down.sql1
-rw-r--r--dichroism/migrations/2020-10-21-221149_products/up.sql11
2 files changed, 12 insertions, 0 deletions
diff --git a/dichroism/migrations/2020-10-21-221149_products/down.sql b/dichroism/migrations/2020-10-21-221149_products/down.sql
new file mode 100644
index 0000000..f800c5c
--- /dev/null
+++ b/dichroism/migrations/2020-10-21-221149_products/down.sql
@@ -0,0 +1 @@
+DROP TABLE "products"
diff --git a/dichroism/migrations/2020-10-21-221149_products/up.sql b/dichroism/migrations/2020-10-21-221149_products/up.sql
new file mode 100644
index 0000000..9e9c696
--- /dev/null
+++ b/dichroism/migrations/2020-10-21-221149_products/up.sql
@@ -0,0 +1,11 @@
+CREATE TABLE "products" (
+ "id" INTEGER NOT NULL,
+ "photo_set" INTEGER NOT NULL,
+ "cents" INTEGER NOT NULL,
+ "quantity" INTEGER NOT NULL,
+ "name" TEXT NOT NULL,
+ "description" TEXT NOT NULL,
+ "featured" INTEGER NOT NULL,
+ PRIMARY KEY("id"),
+ FOREIGN KEY("photo_set") REFERENCES "photo_sets"("id")
+)