13 lines
385 B
SQL
13 lines
385 B
SQL
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;
|