From c9248050393c04a0af8d359f92607c0e6888371a Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Sun, 5 Mar 2023 23:05:22 +0900 Subject: Add table for link to diary articles. --- deploy/articles.sql | 14 ++++++++++++++ revert/articles.sql | 7 +++++++ sqitch.plan | 2 ++ verify/articles.sql | 13 +++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 deploy/articles.sql create mode 100644 revert/articles.sql create mode 100644 verify/articles.sql diff --git a/deploy/articles.sql b/deploy/articles.sql new file mode 100644 index 0000000..7d61ad7 --- /dev/null +++ b/deploy/articles.sql @@ -0,0 +1,14 @@ +-- Deploy kakeibo:articles to pg +-- requires: appschema + +BEGIN; + +CREATE TABLE kakeibo.articles ( + id SERIAL PRIMARY KEY, + location TEXT UNIQUE, + title TEXT, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + updated_at TIMESTAMP NOT NULL DEFAULT NOW() +); + +COMMIT; diff --git a/revert/articles.sql b/revert/articles.sql new file mode 100644 index 0000000..d5177d1 --- /dev/null +++ b/revert/articles.sql @@ -0,0 +1,7 @@ +-- Revert kakeibo:articles from pg + +BEGIN; + +DROP TABLE kakeibo.articles; + +COMMIT; diff --git a/sqitch.plan b/sqitch.plan index 11de372..b86363b 100644 --- a/sqitch.plan +++ b/sqitch.plan @@ -26,3 +26,5 @@ transactions_type_code_fkey [transactions types] 2023-03-05T04:00:45Z Masaya Toj @v1.0.0-dev3 2023-03-05T05:01:10Z Masaya Tojo # Tag v1.0.0-dev3. insert_transaction [insert_transaction@v1.0.0-dev3 appschema transactions] 2023-03-05T05:28:42Z Masaya Tojo # Rename column of transactions from type to type_code. @v1.0.0-dev4 2023-03-05T05:31:39Z Masaya Tojo # Tag v1.0.0-dev4. + +articles [appschema] 2023-03-05T14:01:38Z Masaya Tojo # Add table for link to diary articles. diff --git a/verify/articles.sql b/verify/articles.sql new file mode 100644 index 0000000..355d20f --- /dev/null +++ b/verify/articles.sql @@ -0,0 +1,13 @@ +-- Verify kakeibo:articles on pg + +BEGIN; + +SELECT id, + location, + title, + created_at, + updated_at + FROM kakeibo.articles + WHERE FALSE; + +ROLLBACK; -- cgit v1.2.3