Skip to content

Commit

Permalink
#48 add ratio table in database
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcellino-Palerme committed Jun 14, 2024
1 parent 2ba994c commit 10a0f2a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions db/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions db/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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', '[email protected]',
Expand Down

0 comments on commit 10a0f2a

Please sign in to comment.