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

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