-- 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;
