From 6ffa432a30d6001804c985294c2f63acb10cb259 Mon Sep 17 00:00:00 2001 From: "M.Palerme" Date: Tue, 19 Nov 2024 07:17:22 +0100 Subject: [PATCH 1/5] 62 add id for daughter --- db/init.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/init.sql b/db/init.sql index b279615..c1b69cd 100644 --- a/db/init.sql +++ b/db/init.sql @@ -159,6 +159,7 @@ CREATE TABLE equivalent id_relation INT ); +-- create transitivty of equivalent when A=B and B=C then A=C CREATE OR REPLACE FUNCTION maintain_equivalence_transitivity() RETURNS TRIGGER AS $$ DECLARE @@ -211,6 +212,7 @@ BEGIN END; $$ LANGUAGE plpgsql; +-- launch equivalent transitivity when add equivalent CREATE TRIGGER trigger_maintain_equivalence_transitivity AFTER INSERT ON equivalent FOR EACH ROW @@ -279,12 +281,12 @@ CREATE TABLE calib_curves CREATE TABLE daughter ( + id SERIAL PRIMARY KEY, id_calib_curves SERIAL REFERENCES calib_curves (id) ON DELETE CASCADE, id_file SERIAL REFERENCES file (id) ON DELETE CASCADE, id_mol VARCHAR(52), area FLOAT NOT NULL, - concentration FLOAT NOT NULL, - PRIMARY KEY (id_calib_curves, id_file, id_mol) + concentration FLOAT NOT NULL ); CREATE VIEW view_calib_curve AS From d5bff116b08a167a82709715dd9062302c51ed71 Mon Sep 17 00:00:00 2001 From: "M.Palerme" Date: Tue, 19 Nov 2024 08:00:20 +0100 Subject: [PATCH 2/5] 62 replace id as primary key by curve,file, molecule and area --- db/init.sql | 4 ++-- server/api/UpdateCalibCurve.post.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/db/init.sql b/db/init.sql index c1b69cd..9c7c67f 100644 --- a/db/init.sql +++ b/db/init.sql @@ -281,12 +281,12 @@ CREATE TABLE calib_curves CREATE TABLE daughter ( - id SERIAL PRIMARY KEY, id_calib_curves SERIAL REFERENCES calib_curves (id) ON DELETE CASCADE, id_file SERIAL REFERENCES file (id) ON DELETE CASCADE, id_mol VARCHAR(52), area FLOAT NOT NULL, - concentration FLOAT NOT NULL + concentration FLOAT NOT NULL, + PRIMARY KEY (id_calib_curves, id_file, id_mol, area) ); CREATE VIEW view_calib_curve AS diff --git a/server/api/UpdateCalibCurve.post.ts b/server/api/UpdateCalibCurve.post.ts index 581cf7d..a78cf72 100644 --- a/server/api/UpdateCalibCurve.post.ts +++ b/server/api/UpdateCalibCurve.post.ts @@ -26,9 +26,8 @@ export default defineEventHandler(async (event) => { (${idFile}, '${daughter.nameMeta}', ${body.idCalibCurve}, ${daughter.area}, ${daughter.concentration}) - ON CONFLICT (id_file, id_mol, id_calib_curves) - DO UPDATE SET concentration = ${daughter.concentration}, - area = ${daughter.area}` + ON CONFLICT (id_file, id_mol, id_calib_curves, area) + DO UPDATE SET concentration = ${daughter.concentration}` )); } } From 0cbd7dab5029e546efd1ebc91abadbe57962afbe Mon Sep 17 00:00:00 2001 From: "M.Palerme" Date: Tue, 19 Nov 2024 08:06:26 +0100 Subject: [PATCH 3/5] 62 increase version --- nuxt.config.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index 28083fd..f61dd6c 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -106,5 +106,5 @@ export default defineNuxtConfig({ }, }, - compatibilityDate: "2024-11-15", + compatibilityDate: "2024-11-19", }); \ No newline at end of file diff --git a/package.json b/package.json index 08d84eb..bc2c393 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ep2m2", - "version": "0.2.1", + "version": "0.3.1", "private": true, "type": "module", "scripts": { From 35b507e92615eee48652bd9a6660eb4ed240d644 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Nov 2024 06:03:56 +0000 Subject: [PATCH 4/5] doc: update README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 76dcf02..1527130 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ __0.2.1__ ## Reuse compliance
-[![Reuse compliant](./badges/reuse_compliant.svg)](https://github.com/p2m2/EP2M2/actions/runs/11858498771) +[![Reuse compliant](./badges/reuse_compliant.svg)](https://github.com/p2m2/EP2M2/actions/runs/11927660060) ## Tests
From b0ce19e191bc96702c5ac8dfe0d260f882e563b0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Nov 2024 06:03:57 +0000 Subject: [PATCH 5/5] doc: update README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1527130..53a6e78 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ __0.2.1__ ## Tests
-[![result](./badges/tests-result.svg) ![total](./badges/tests-total.svg) ![passed](./badges/tests-passed.svg) ![failed](./badges/tests-failed.svg) ![todo](./badges/tests-todo.svg)](https://github.com/p2m2/EP2M2/actions/runs/11858498771)
[![Branches](./badges/coverage-branches.svg) ![Functions](./badges/coverage-functions.svg) ![Lines](./badges/coverage-lines.svg)![Statements](./badges/coverage-statements.svg) ![Coverage total](./badges/coverage-total.svg)](https://github.com/p2m2/EP2M2/actions/runs/11858498771) +[![result](./badges/tests-result.svg) ![total](./badges/tests-total.svg) ![passed](./badges/tests-passed.svg) ![failed](./badges/tests-failed.svg) ![todo](./badges/tests-todo.svg)](https://github.com/p2m2/EP2M2/actions/runs/11927660060)
[![Branches](./badges/coverage-branches.svg) ![Functions](./badges/coverage-functions.svg) ![Lines](./badges/coverage-lines.svg)![Statements](./badges/coverage-statements.svg) ![Coverage total](./badges/coverage-total.svg)](https://github.com/p2m2/EP2M2/actions/runs/11927660060) ## Features - Extraction of formats files of the metabolomics data acquisition devices of the P2M2 platform - gcms