From b06ccf00cbe77da05f4cdda0cfb352e80595e867 Mon Sep 17 00:00:00 2001 From: ecmadao Date: Mon, 8 Aug 2022 10:09:00 +0800 Subject: [PATCH 1/2] chore: add test sql --- store/migration/prod/1.4/0000__test_table.sql | 4 ++++ store/migration/prod/1.4/0001_unique_key.sql | 1 + 2 files changed, 5 insertions(+) create mode 100644 store/migration/prod/1.4/0000__test_table.sql create mode 100644 store/migration/prod/1.4/0001_unique_key.sql diff --git a/store/migration/prod/1.4/0000__test_table.sql b/store/migration/prod/1.4/0000__test_table.sql new file mode 100644 index 00000000000000..b57a45c2b917a1 --- /dev/null +++ b/store/migration/prod/1.4/0000__test_table.sql @@ -0,0 +1,4 @@ +CREATE TABLE testTable ( + id SERIAL PRIMARY KEY, + name TEXT +); \ No newline at end of file diff --git a/store/migration/prod/1.4/0001_unique_key.sql b/store/migration/prod/1.4/0001_unique_key.sql new file mode 100644 index 00000000000000..42147526729915 --- /dev/null +++ b/store/migration/prod/1.4/0001_unique_key.sql @@ -0,0 +1 @@ +ALTER TABLE testTable ADD CONSTRAINT uk_id_name UNIQUE (id, name); \ No newline at end of file From 1f965c5fdc6c2854a985a4b0bf37136b609b1643 Mon Sep 17 00:00:00 2001 From: ecmadao Date: Mon, 8 Aug 2022 10:11:30 +0800 Subject: [PATCH 2/2] chore: update mock --- store/migration/prod/1.4/0000__test_table.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/migration/prod/1.4/0000__test_table.sql b/store/migration/prod/1.4/0000__test_table.sql index b57a45c2b917a1..3254d504e117f3 100644 --- a/store/migration/prod/1.4/0000__test_table.sql +++ b/store/migration/prod/1.4/0000__test_table.sql @@ -1,4 +1,4 @@ CREATE TABLE testTable ( - id SERIAL PRIMARY KEY, + id INTEGER, name TEXT ); \ No newline at end of file