feat: update area management to implement hard delete and adjust related references
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
ALTER TABLE teams DROP FOREIGN KEY teams_area_fk;
|
||||
ALTER TABLE reports DROP FOREIGN KEY reports_area_fk;
|
||||
|
||||
ALTER TABLE areas DROP COLUMN active;
|
||||
|
||||
ALTER TABLE teams
|
||||
ADD CONSTRAINT teams_area_fk
|
||||
FOREIGN KEY (area_id) REFERENCES areas(id) ON DELETE SET NULL;
|
||||
|
||||
ALTER TABLE reports
|
||||
ADD CONSTRAINT reports_area_fk
|
||||
FOREIGN KEY (area_id) REFERENCES areas(id) ON DELETE SET NULL;
|
||||
Reference in New Issue
Block a user