From 9c8cbed6cdd725ed1153a260ab0844971b685fbf Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Sat, 11 Nov 2023 16:13:41 +0900
Subject: Change taken_at column type to timestamptz

---
 deploy/photos@v1.0.0-alpha1.sql | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 deploy/photos@v1.0.0-alpha1.sql

(limited to 'deploy/photos@v1.0.0-alpha1.sql')

diff --git a/deploy/photos@v1.0.0-alpha1.sql b/deploy/photos@v1.0.0-alpha1.sql
new file mode 100644
index 0000000..a14f480
--- /dev/null
+++ b/deploy/photos@v1.0.0-alpha1.sql
@@ -0,0 +1,21 @@
+-- Deploy photos:photos to pg
+-- requires: schema
+
+BEGIN;
+
+SET search_path to photos;
+
+CREATE TABLE photos(
+  id UUID PRIMARY KEY,
+  path TEXT NOT NULL UNIQUE,
+  date DATE NOT NULL,
+  is_video BOOLEAN NOT NULL,
+  is_receipt BOOLEAN NOT NULL DEFAULT FALSE,
+  note TEXT CHECK (note <> ''),
+  taken_at TIME,
+  camera_name TEXT,
+  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
+  updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
+);
+
+COMMIT;
-- 
cgit v1.2.3

