Noms de fichier identiques aux tables
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user