Noms de fichier identiques aux tables

This commit is contained in:
2025-08-28 09:38:07 +02:00
parent a309b44034
commit 6b1bba0c44
6 changed files with 794748 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
28/08 28/08
- Export des familles en triant par code - ~~Export des familles en triant par code~~
- Guillemets autour du nom des articles car présence de virgule - ~~Guillemets autour du nom des articles car présence de virgule~~
- Nom des fichiers d'import identique aux noms des tables - ~~Nom des fichiers d'import identique aux noms des tables~~
- Convention de nommage - Convention de nommage
- Ajouter la table adherent - Ajouter la table adherent

File diff suppressed because one or more lines are too long

101616
data/ticket.csv Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -23,7 +23,7 @@ create table article (
sommeil int sommeil int
); );
\COPY article FROM '/tmp/articles.csv' (FORMAT CSV, header, ENCODING 'UTF8'); \COPY article FROM '/tmp/article.csv' (FORMAT CSV, header, ENCODING 'UTF8');
create table ticket ( create table ticket (
id int primary key, id int primary key,
@@ -34,15 +34,14 @@ create table ticket (
facture text facture text
); );
\COPY ticket FROM '/tmp/tickets.csv' (FORMAT CSV, header, ENCODING 'UTF8'); \COPY ticket FROM '/tmp/ticket.csv' (FORMAT CSV, header, ENCODING 'UTF8');
create table ligne ( create table ligne (
id int primary key, id int primary key,
ticket_id int, --references ticket (id), ticket_id int, --references ticket (id),
article text, -- references article (code) article text, -- references article (code)
prix_unitaire decimal, prix_unitaire decimal,
quantite decimal, quantite decimal
total decimal
); );
\COPY ligne FROM '/tmp/lignes.csv' (FORMAT CSV, header, ENCODING 'UTF8'); \COPY ligne FROM '/tmp/ligne.csv' (FORMAT CSV, header, ENCODING 'UTF8');