From 37db03353a121d039a98af49aa034fb2d8f6e6ea Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Tue, 28 Mar 2023 01:10:08 +0900
Subject: Add table for tracking photos.

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

(limited to 'deploy/photo.photos.sql')

diff --git a/deploy/photo.photos.sql b/deploy/photo.photos.sql
new file mode 100644
index 0000000..6cb3cba
--- /dev/null
+++ b/deploy/photo.photos.sql
@@ -0,0 +1,16 @@
+-- Deploy life-archive:photo.photos to pg
+-- requires: photo
+
+BEGIN;
+
+CREATE TABLE photo.photos (
+  id SERIAL PRIMARY KEY,
+  url TEXT NOT NULL,
+  taken_at timestamp NOT NULL,
+  place TEXT NOT NULL,
+  note TEXT CHECK (note <> ''),
+  created_at TIMESTAMP NOT NULL DEFAULT NOW(),
+  updated_at TIMESTAMP NOT NULL DEFAULT NOW()
+);
+
+COMMIT;
-- 
cgit v1.2.3

