diff --git a/db/init.js b/db/init.js index 6bb3033..a3791c0 100644 --- a/db/init.js +++ b/db/init.js @@ -124,6 +124,14 @@ client.connect() id_file SERIAL REFERENCES file (id) ON DELETE CASCADE, PRIMARY KEY (id_series, id_file) ); + + CREATE TABLE ratio + ( + id_mol VARCHAR(52) UNIQUE, + id_series SERIAL REFERENCES series (id) ON DELETE CASCADE, + ratio FLOAT, + PRIMARY KEY (id_mol, id_series) + ); INSERT INTO users (name, email, hash, team) VALUES diff --git a/db/init.sql b/db/init.sql index 24f6a21..d69af67 100644 --- a/db/init.sql +++ b/db/init.sql @@ -118,6 +118,14 @@ CREATE TABLE daughter PRIMARY KEY (id_series, id_file) ); +CREATE TABLE ratio +( + id_mol VARCHAR(52) UNIQUE, + id_series SERIAL REFERENCES series (id) ON DELETE CASCADE, + ratio FLOAT, + PRIMARY KEY (id_mol, id_series) +); + INSERT INTO users (name, email, hash, team) VALUES ('root_ep2m2', 'admin@ep2m2.bzh',