fix: rename postgresql constraints
This commit is contained in:
parent
366dccde12
commit
59db7cfc85
@ -0,0 +1,9 @@
|
||||
ALTER TABLE humidities
|
||||
DROP CONSTRAINT fk_humidites_sensor_id;
|
||||
|
||||
ALTER TABLE humidities
|
||||
ADD CONSTRAINT pk_humidites_sensor_id
|
||||
FOREIGN KEY (sensor_id)
|
||||
REFERENCES sensors(sensor_id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
@ -0,0 +1,9 @@
|
||||
ALTER TABLE humidities
|
||||
DROP CONSTRAINT pk_humidites_sensor_id;
|
||||
|
||||
ALTER TABLE humidities
|
||||
ADD CONSTRAINT fk_humidites_sensor_id
|
||||
FOREIGN KEY (sensor_id)
|
||||
REFERENCES sensors(sensor_id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
@ -0,0 +1,9 @@
|
||||
ALTER TABLE pressures
|
||||
DROP CONSTRAINT fk_pressures_sensor_id;
|
||||
|
||||
ALTER TABLE pressures
|
||||
ADD CONSTRAINT pk_pressures_sensor_id
|
||||
FOREIGN KEY (sensor_id)
|
||||
REFERENCES sensors(sensor_id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
@ -0,0 +1,9 @@
|
||||
ALTER TABLE pressures
|
||||
DROP CONSTRAINT pk_pressures_sensor_id;
|
||||
|
||||
ALTER TABLE pressures
|
||||
ADD CONSTRAINT fk_pressures_sensor_id
|
||||
FOREIGN KEY (sensor_id)
|
||||
REFERENCES sensors(sensor_id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
Loading…
Reference in New Issue
Block a user