Files
houston-be/db/migration/000029_private_incidents.up.sql

12 lines
292 B
MySQL
Raw Permalink Normal View History

BEGIN;
ALTER TABLE incident ADD COLUMN is_private boolean DEFAULT false;
CREATE TABLE incident_user (
id SERIAL PRIMARY KEY,
incident_id INTEGER NOT NULL REFERENCES incident(id),
user_id INTEGER NOT NULL REFERENCES houston_user(id),
UNIQUE (incident_id, user_id)
);
COMMIT;