clean and simplify tree of the plugin

This commit is contained in:
JBthePenguin 2021-06-05 18:48:45 +02:00
parent 35c88400b0
commit 12a11611c6
18 changed files with 31 additions and 77 deletions

View file

@ -22,31 +22,11 @@ CREATE TABLE IF NOT EXISTS plugin_materiels_entry (
FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_equipment( id ) ON DELETE RESTRICT ON UPDATE CASCADE
);
CREATE TABLE IF NOT EXISTS plugin_materiels_temporary_entry (
id integer NOT NULL PRIMARY KEY autoincrement,
kind varchar(20) NOT NULL,
number_of_equipments integer NOT NULL,
equipment_id integer NOT NULL,
start_date date NOT NULL,
end_date date,
FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_equipment( id ) ON DELETE RESTRICT ON UPDATE CASCADE
);
CREATE TABLE IF NOT EXISTS plugin_materiels_output (
id integer NOT NULL PRIMARY KEY autoincrement,
kind varchar(20) NOT NULL,
number_of_equipments integer NOT NULL,
equipment_id integer NOT NULL,
output_date date NOT NULL,
FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_entry( equipment_id ) ON DELETE RESTRICT ON UPDATE CASCADE
);
CREATE TABLE IF NOT EXISTS plugin_materiels_temporary_output (
id integer NOT NULL PRIMARY KEY autoincrement,
kind varchar(20) NOT NULL,
number_of_equipments integer NOT NULL,
equipment_id integer NOT NULL,
start_date date NOT NULL,
end_date date,
FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_entry( equipment_id ) ON DELETE RESTRICT ON UPDATE CASCADE
FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_equipment( id ) ON DELETE RESTRICT ON UPDATE CASCADE
);