From de0372d79c1993a01d9586481723e27b31d77bcb Mon Sep 17 00:00:00 2001 From: Niklas Fondberg Date: Thu, 10 Mar 2022 16:22:25 +0100 Subject: [PATCH] Add publishing date (#255) --- migrations/000.359.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 migrations/000.359.sql diff --git a/migrations/000.359.sql b/migrations/000.359.sql new file mode 100644 index 0000000..701b84f --- /dev/null +++ b/migrations/000.359.sql @@ -0,0 +1,5 @@ +-- Add publishing_date to products +ALTER TABLE "product-products" DROP COLUMN IF EXISTS publishing_date; +ALTER TABLE "product-products" ADD COLUMN IF NOT EXISTS publishing_date timestamp with time zone DEFAULT now(); + +UPDATE "product-products" SET publishing_date = inserted;