2020-12-23 11:23:37 +00:00
|
|
|
CREATE TABLE `vn`.`entryObservation` (
|
|
|
|
id int NOT NULL AUTO_INCREMENT,
|
|
|
|
entryFk int NOT NULL,
|
|
|
|
observationTypeFk TINYINT(3) UNSIGNED,
|
|
|
|
description TEXT,
|
|
|
|
PRIMARY KEY (id),
|
|
|
|
CONSTRAINT entry_id_entryFk
|
|
|
|
FOREIGN KEY (entryFk) REFERENCES entry(id),
|
|
|
|
CONSTRAINT observationType_id_observationTypeFk
|
|
|
|
FOREIGN KEY (observationTypeFk) REFERENCES observationType(id)
|
2020-12-23 12:31:55 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
ALTER TABLE `vn`.`entryObservation`
|
|
|
|
ADD UNIQUE INDEX `entryFk_observationTypeFk_UNIQUE` (`entryFk` ASC,`observationTypeFk` ASC);
|