From d12cd30a96cb538eae094334b2bbf91909d521c9 Mon Sep 17 00:00:00 2001 From: medina474 Date: Fri, 29 Aug 2025 11:18:26 +0200 Subject: [PATCH] Ajustements --- README.md | 10 ++++++---- data/article.csv | 2 +- docker-entrypoint-initdb.d/initdb.sql | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index acc87d4..5f1644f 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,10 @@ docker build -t iut/pgsql:2025-08 . ### Schéma +``` Adherent : id, nom, prenom, genre, naissance, codepostal -Famille : code, famille, code_parent -Article : code, article, famille_code, factpoids, prix -Ticket : id, date_ticket, adherent_id, mode_rglt -Ligne : id, ticket_id, article_code, prix_unitaire, quantite +Famille : code, famille, code_parent +Article : code, article, famille_code, factpoids, prix +Ticket : id, date_ticket, adherent_id, mode_rglt +Ligne : id, ticket_id, article_code, prix_unitaire, quantite +``` diff --git a/data/article.csv b/data/article.csv index e981ea5..c3fd2dc 100644 --- a/data/article.csv +++ b/data/article.csv @@ -38,7 +38,7 @@ "AUBER","Aubergine bio plant motte 8cm","05AUBE",0,2,1.6,2,1,0,0 "AUBERG","Aubergine Jardins","02AUBE",0,3,3.5,2,1,0,1 "AUBERGINESCOT","Aubergine SCOT","02AUBE",0,3,4.7,2,1,2,1 -"AUBRAC","Ventes Délices d'Aubrac","12DELAUBRA",0,1,0,2,1,0,0 +"AUBRAC","Délices d'Aubrac","12DELAUBRA",0,1,0,2,1,0,0 "AVOCAT","Avocat Kenya Kg","03AVOCAT",0,3,7.95,2,1,2,1 "AVOCATAFS","Avocat Hass Espagne Kg","03AVOCAT",0,3,7.5,2,1,2,1 "AVOCATHASS","Avocat fuerte Espagne Pièce","03AVOCAT",0,2,1.75,2,1,2,1 diff --git a/docker-entrypoint-initdb.d/initdb.sql b/docker-entrypoint-initdb.d/initdb.sql index b6d7fd9..73461c3 100644 --- a/docker-entrypoint-initdb.d/initdb.sql +++ b/docker-entrypoint-initdb.d/initdb.sql @@ -10,13 +10,13 @@ create table adherent ( create table famille ( code text primary key, famille text, - code_parent text + code_parent text -- references famille(code) ); create table article ( code text primary key, article text, - famille_code text, -- references famille(famille) + famille_code text, -- references famille(code) factpoids int, unitevente int, prix decimal, @@ -29,7 +29,7 @@ create table article ( create table ticket ( id int primary key, date_ticket timestamp, - adherent_id int, + adherent_id int, -- references adherent(id) mode_rglt int );