From 5cb0869b94fc8b9aff564055af9a60046de7b028 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Thu, 22 Oct 2020 22:09:46 -0400 Subject: Skipped separate photo table; working handler for get all products (lacking cats) --- dichroism/migrations/.gitkeep | 0 dichroism/migrations/2020-10-09-210205_photos/down.sql | 1 - dichroism/migrations/2020-10-09-210205_photos/up.sql | 5 ----- dichroism/migrations/2020-10-09-210247_photo_sets/down.sql | 1 - dichroism/migrations/2020-10-09-210247_photo_sets/up.sql | 12 ------------ dichroism/migrations/2020-10-21-221149_products/down.sql | 1 - dichroism/migrations/2020-10-21-221149_products/up.sql | 11 ----------- dichroism/migrations/2020-10-23-010629_photo_sets/down.sql | 1 + dichroism/migrations/2020-10-23-010629_photo_sets/up.sql | 8 ++++++++ dichroism/migrations/2020-10-23-010929_products/down.sql | 1 + dichroism/migrations/2020-10-23-010929_products/up.sql | 11 +++++++++++ 11 files changed, 21 insertions(+), 31 deletions(-) delete mode 100644 dichroism/migrations/.gitkeep delete mode 100644 dichroism/migrations/2020-10-09-210205_photos/down.sql delete mode 100644 dichroism/migrations/2020-10-09-210205_photos/up.sql delete mode 100644 dichroism/migrations/2020-10-09-210247_photo_sets/down.sql delete mode 100644 dichroism/migrations/2020-10-09-210247_photo_sets/up.sql delete mode 100644 dichroism/migrations/2020-10-21-221149_products/down.sql delete mode 100644 dichroism/migrations/2020-10-21-221149_products/up.sql create mode 100644 dichroism/migrations/2020-10-23-010629_photo_sets/down.sql create mode 100644 dichroism/migrations/2020-10-23-010629_photo_sets/up.sql create mode 100644 dichroism/migrations/2020-10-23-010929_products/down.sql create mode 100644 dichroism/migrations/2020-10-23-010929_products/up.sql (limited to 'dichroism/migrations') diff --git a/dichroism/migrations/.gitkeep b/dichroism/migrations/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/dichroism/migrations/2020-10-09-210205_photos/down.sql b/dichroism/migrations/2020-10-09-210205_photos/down.sql deleted file mode 100644 index 1f9850a..0000000 --- a/dichroism/migrations/2020-10-09-210205_photos/down.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE "photos" diff --git a/dichroism/migrations/2020-10-09-210205_photos/up.sql b/dichroism/migrations/2020-10-09-210205_photos/up.sql deleted file mode 100644 index 0e74ff9..0000000 --- a/dichroism/migrations/2020-10-09-210205_photos/up.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE "photos" ( - "id" INTEGER NOT NULL, - "path" TEXT NOT NULL UNIQUE, - PRIMARY KEY("id") -) diff --git a/dichroism/migrations/2020-10-09-210247_photo_sets/down.sql b/dichroism/migrations/2020-10-09-210247_photo_sets/down.sql deleted file mode 100644 index d02736a..0000000 --- a/dichroism/migrations/2020-10-09-210247_photo_sets/down.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE "photo_sets" diff --git a/dichroism/migrations/2020-10-09-210247_photo_sets/up.sql b/dichroism/migrations/2020-10-09-210247_photo_sets/up.sql deleted file mode 100644 index 98e6050..0000000 --- a/dichroism/migrations/2020-10-09-210247_photo_sets/up.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE "photo_sets" ( - "id" INTEGER NOT NULL, - "base" INTEGER NOT NULL, - "fullsize" INTEGER NOT NULL, - "thumbnail" INTEGER NOT NULL, - "original" INTEGER NOT NULL, - FOREIGN KEY("thumbnail") REFERENCES "photos"("id"), - FOREIGN KEY("original") REFERENCES "photos"("id"), - FOREIGN KEY("base") REFERENCES "photos"("id"), - FOREIGN KEY("fullsize") REFERENCES "photos"("id"), - PRIMARY KEY("id") -) diff --git a/dichroism/migrations/2020-10-21-221149_products/down.sql b/dichroism/migrations/2020-10-21-221149_products/down.sql deleted file mode 100644 index f800c5c..0000000 --- a/dichroism/migrations/2020-10-21-221149_products/down.sql +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 9e9c696..0000000 --- a/dichroism/migrations/2020-10-21-221149_products/up.sql +++ /dev/null @@ -1,11 +0,0 @@ -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") -) diff --git a/dichroism/migrations/2020-10-23-010629_photo_sets/down.sql b/dichroism/migrations/2020-10-23-010629_photo_sets/down.sql new file mode 100644 index 0000000..d02736a --- /dev/null +++ b/dichroism/migrations/2020-10-23-010629_photo_sets/down.sql @@ -0,0 +1 @@ +DROP TABLE "photo_sets" diff --git a/dichroism/migrations/2020-10-23-010629_photo_sets/up.sql b/dichroism/migrations/2020-10-23-010629_photo_sets/up.sql new file mode 100644 index 0000000..ed10670 --- /dev/null +++ b/dichroism/migrations/2020-10-23-010629_photo_sets/up.sql @@ -0,0 +1,8 @@ +CREATE TABLE "photo_sets" ( + "id" INTEGER NOT NULL, + "base" TEXT NOT NULL, + "fullsize" TEXT NOT NULL, + "thumbnail" TEXT NOT NULL, + "original" TEXT NOT NULL, + PRIMARY KEY("id") +) diff --git a/dichroism/migrations/2020-10-23-010929_products/down.sql b/dichroism/migrations/2020-10-23-010929_products/down.sql new file mode 100644 index 0000000..f800c5c --- /dev/null +++ b/dichroism/migrations/2020-10-23-010929_products/down.sql @@ -0,0 +1 @@ +DROP TABLE "products" diff --git a/dichroism/migrations/2020-10-23-010929_products/up.sql b/dichroism/migrations/2020-10-23-010929_products/up.sql new file mode 100644 index 0000000..9e9c696 --- /dev/null +++ b/dichroism/migrations/2020-10-23-010929_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") +) -- cgit v1.2.3