nidus-sync/db/migrations/00074_fileupload_pool_aerial_services.sql
Eli Ribble ff2ec0ad14
Split out ability to upload flyover data from pool uploads
Tons of changes here, all in the name of quickly getting to where I can
create test compliance letters.
2026-03-02 18:49:02 +00:00

18 lines
731 B
SQL

-- +goose Up
ALTER TYPE fileupload.CSVType ADD VALUE 'Flyover' AFTER 'PoolList';
CREATE TABLE fileupload.flyover_aerial_service (
committed BOOLEAN NOT NULL, -- Whether or not its just proposed before a CSV file is committed
condition fileupload.PoolConditionType NOT NULL,
created TIMESTAMP WITHOUT TIME ZONE NOT NULL,
creator_id INTEGER REFERENCES user_(id) NOT NULL,
csv_file INTEGER REFERENCES fileupload.csv(file_id) NOT NULL,
deleted TIMESTAMP WITHOUT TIME ZONE,
geom geometry(Point, 4326),
h3cell h3index,
id SERIAL,
organization_id INTEGER REFERENCES organization(id) NOT NULL,
PRIMARY KEY (id)
);
-- +goose Down
DROP TABLE fileupload.flyover_aerial_services;
ALTER TYPE fileupload.CSVType DROP VALUE 'Flyover';