nidus-sync/db/migrations/00024_publicreport_quick.sql
Eli Ribble 01ed2d6086
Finish green pool report submission
Also start the pattern of breaking out pool pages together in their own
file. I think its easier to read this way.
2026-01-09 19:43:19 +00:00

26 lines
625 B
SQL

-- +goose Up
CREATE SCHEMA IF NOT EXISTS publicreport;
CREATE TABLE publicreport.quick (
id SERIAL PRIMARY KEY,
created TIMESTAMP WITHOUT TIME ZONE NOT NULL,
comments TEXT NOT NULL,
location GEOGRAPHY,
h3cell h3index,
public_id TEXT NOT NULL UNIQUE,
reporter_email TEXT NOT NULL,
reporter_phone TEXT NOT NULL
);
CREATE TABLE publicreport.quick_photo (
id SERIAL PRIMARY KEY,
size BIGINT NOT NULL,
filename TEXT NOT NULL,
quick_id INT NOT NULL REFERENCES publicreport.quick(id),
uuid UUID NOT NULL
);
-- +goose Down
DROP TABLE publicreport.quick_photo;
DROP TABLE publicreport.quick;
DROP SCHEMA publicreport;