photosite/sql/setup.sql

25 lines
470 B
SQL

CREATE TABLE IF NOT EXISTS photos (
id TEXT PRIMARY KEY,
name TEXT UNIQUE,
original TEXT UNIQUE,
hash TEXT UNIQUE,
width INTEGER,
height INTEGER,
format TEXT,
filmstock TEXT,
location TEXT,
latitude REAL,
longitude REAL,
discovered INTEGER,
created INTEGER,
updated INTEGER,
bsky INTEGER DEFAULT 0,
score INTEGER DEFAULT 0,
deleted INTEGER DEFAULT 0
);
CREATE TABLE IF NOT EXISTS geocode (
location TEXT PRIMARY KEY,
latitude REAL,
longitude REAL
);