Store images with nuisance reports
This commit is contained in:
parent
a369758eda
commit
527f6a5628
18 changed files with 2443 additions and 63 deletions
12
db/migrations/00049_publicreport_nuisance_h3cell.sql
Normal file
12
db/migrations/00049_publicreport_nuisance_h3cell.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-- +goose Up
|
||||
ALTER TABLE publicreport.nuisance ADD COLUMN h3cell h3index;
|
||||
ALTER TABLE publicreport.nuisance ADD COLUMN organization_id INTEGER REFERENCES organization(id);
|
||||
CREATE TABLE publicreport.nuisance_image (
|
||||
image_id INTEGER NOT NULL REFERENCES publicreport.image(id),
|
||||
nuisance_id INTEGER NOT NULL REFERENCES publicreport.nuisance(id),
|
||||
PRIMARY KEY (image_id, nuisance_id)
|
||||
);
|
||||
-- +goose Down
|
||||
DROP TABLE publicreport.nuisance_image;
|
||||
ALTER TABLE publicreport.nuisance DROP COLUMN h3cell;
|
||||
ALTER TABLE publicreport.nuisance DROP COLUMN organization_id;
|
||||
Loading…
Add table
Add a link
Reference in a new issue