From 5934d9831350640a99526fad6afb2ec104316fea Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Tue, 29 Aug 2023 23:55:08 +0900
Subject: Create table to manage my photos

---
 deploy/photos.sql | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 deploy/photos.sql

(limited to 'deploy/photos.sql')

diff --git a/deploy/photos.sql b/deploy/photos.sql
new file mode 100644
index 0000000..7b727b5
--- /dev/null
+++ b/deploy/photos.sql
@@ -0,0 +1,19 @@
+-- Deploy photos:photos to pg
+-- requires: schema
+
+BEGIN;
+
+SET client_min_messages = 'warning';
+SET search_path to photos;
+
+CREATE TABLE photos(
+  id UUID PRIMARY KEY,
+  path TEXT NOT NULL,
+  is_receipt BOOLEAN NOT NULL DEFAULT FALSE,
+  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

