Delete species
This commit is contained in:
parent
50bee9ab88
commit
20026ebfd9
4 changed files with 13 additions and 2 deletions
|
@ -21,7 +21,7 @@ CREATE TABLE strains (
|
|||
deleted_by BIGINT NULL,
|
||||
|
||||
CONSTRAINT strain_pkey PRIMARY KEY (id),
|
||||
FOREIGN KEY (species_id) REFERENCES species(id),
|
||||
FOREIGN KEY (species_id) REFERENCES species(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (created_by) REFERENCES users(id),
|
||||
FOREIGN KEY (updated_by) REFERENCES users(id),
|
||||
FOREIGN KEY (deleted_by) REFERENCES users(id)
|
||||
|
|
|
@ -20,7 +20,7 @@ CREATE TABLE measurements (
|
|||
updated_by BIGINT NOT NULL,
|
||||
|
||||
CONSTRAINT strainscharmeasurements_pkey PRIMARY KEY (id),
|
||||
FOREIGN KEY (strain_id) REFERENCES strains(id),
|
||||
FOREIGN KEY (strain_id) REFERENCES strains(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (characteristic_id) REFERENCES characteristics(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (text_measurement_type_id) REFERENCES text_measurement_types(id),
|
||||
FOREIGN KEY (unit_type_id) REFERENCES unit_types(id),
|
||||
|
|
Reference in a new issue