From 67cabf314b2b60c81454682f9259c3c207f71a73 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Thu, 31 Aug 2023 00:31:37 +0900 Subject: Add date column to date table --- deploy/diaries.sql | 1 + verify/diaries.sql | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/diaries.sql b/deploy/diaries.sql index 3188490..f156ff1 100644 --- a/deploy/diaries.sql +++ b/deploy/diaries.sql @@ -9,6 +9,7 @@ SET search_path to photos; CREATE TABLE diaries ( id UUID PRIMARY KEY, photo_id UUID NOT NULL REFERENCES photos(id) ON DELETE RESTRICT ON UPDATE RESTRICT, + date DATE NOT NULL UNIQUE, title TEXT NOT NULL, entry TEXT NOT NULL, created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), diff --git a/verify/diaries.sql b/verify/diaries.sql index 654c2ff..afdd875 100644 --- a/verify/diaries.sql +++ b/verify/diaries.sql @@ -4,7 +4,7 @@ BEGIN; SET search_path to photos; -SELECT id, photo_id, title, entry, created_at, updated_at +SELECT id, photo_id, date, title, entry, created_at, updated_at FROM diaries WHERE FALSE; -- cgit v1.2.3