Skip to content

Instantly share code, notes, and snippets.

@arbarlow
Created April 23, 2015 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arbarlow/e48601f301e5912ec739 to your computer and use it in GitHub Desktop.
Save arbarlow/e48601f301e5912ec739 to your computer and use it in GitHub Desktop.
-- +goose Up
CREATE TABLE photos (
id uuid primary key default uuid_generate_v4() NOT NULL,
reel_id uuid NOT NULL REFERENCES reels(id),
path text NOT NULL,
thumbnail text,
bytes bigint NOT NULL,
rev text NOT NULL,
exif text,
cleaned boolean NOT NULL default false,
updated_at timestamp NOT NULL default now(),
created_at timestamp NOT NULL default now(),
deleted_at timestamp
);
CREATE UNIQUE INDEX photos_reel_rev ON photos(reel_id, rev);
-- +goose Down
DROP TABLE photos;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment