From bf09dc2318d999bf813342c2f314a9319ec36dad Mon Sep 17 00:00:00 2001 From: nochill Date: Tue, 7 Mar 2023 18:52:18 +0700 Subject: [PATCH] fix migration --- db/migrations/000001_init_schema.down.sql | 14 +++++++------- db/migrations/000001_init_schema.up.sql | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/db/migrations/000001_init_schema.down.sql b/db/migrations/000001_init_schema.down.sql index e6b4118..6d7fb3c 100644 --- a/db/migrations/000001_init_schema.down.sql +++ b/db/migrations/000001_init_schema.down.sql @@ -1,9 +1,9 @@ -DROP TABLE IF EXISTS users; -DROP TABLE IF EXISTS merchants; -DROP TABLE IF EXISTS suppliers; -DROP TABLE IF EXISTS customers; -DROP TABLE IF EXISTS products; -DROP TABLE IF EXISTS purchase_order; DROP TABLE IF EXISTS purchase_order_detail; +DROP TABLE IF EXISTS sale_order_detail; +DROP TABLE IF EXISTS purchase_order; DROP TABLE IF EXISTS sale_order; -DROP TABLE IF EXISTS sale_order_detail; \ No newline at end of file +DROP TABLE IF EXISTS products; +DROP TABLE IF EXISTS customers; +DROP TABLE IF EXISTS suppliers; +DROP TABLE IF EXISTS merchants; +DROP TABLE IF EXISTS users; \ No newline at end of file diff --git a/db/migrations/000001_init_schema.up.sql b/db/migrations/000001_init_schema.up.sql index 6de022e..07f791e 100644 --- a/db/migrations/000001_init_schema.up.sql +++ b/db/migrations/000001_init_schema.up.sql @@ -31,7 +31,7 @@ CREATE TABLE customers ( "index_id" bigserial not null, "merchant_id" uuid references "merchants"("id") not null, "name" varchar not null, - "detail" jsonb, + "detail" jsonb[], "created_at" timestamp default(now()), "updated_at" timestamp default(now())