blob: a14f4805ae238a6723041f4d009e97891bc1f72c (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
|