Files
sql/postgresql-entrypoint-initdb.d/02_seed.sql
2025-11-02 07:35:49 +01:00

20 lines
922 B
SQL

truncate table adherent;
truncate table famille;
truncate table article;
truncate table market.ticket;
truncate table market.ligne;
truncate table marque;
truncate table fournisseur;
\COPY adherent FROM '/tmp/adherent.csv' (FORMAT CSV, header, ENCODING 'UTF8');
\COPY famille FROM '/tmp/famille.csv' (FORMAT CSV, header, ENCODING 'UTF8');
\COPY article FROM '/tmp/article.csv' (FORMAT CSV, header, ENCODING 'UTF8');
\COPY market.ticket FROM '/tmp/ticket.csv' (FORMAT CSV, header, ENCODING 'UTF8');
\COPY market.ligne FROM '/tmp/ligne.csv' (FORMAT CSV, header, ENCODING 'UTF8');
\COPY marque FROM '/tmp/marque.csv' (FORMAT CSV, header, ENCODING 'UTF8');
\COPY fournisseur FROM '/tmp/fournisseur.csv' (FORMAT CSV, header, ENCODING 'UTF8');
\COPY produit FROM '/tmp/produits/cereales_petitdejeuner.csv' (FORMAT CSV, header, ENCODING 'UTF8');
\COPY personne FROM '/tmp/personne1.csv' (FORMAT CSV, header, ENCODING 'UTF8');