diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1708086..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/reponses.sql diff --git a/ToDo.md b/ToDo.md index 203a0b6..498352d 100644 --- a/ToDo.md +++ b/ToDo.md @@ -6,3 +6,4 @@ - Convention de nommage - ~~Ajouter la table adherent~~ - ~~Trier les ticket par date~~ +- Trier les ticket par id diff --git a/data/famille.csv b/data/famille.csv index 8a1f229..a26fe7b 100644 --- a/data/famille.csv +++ b/data/famille.csv @@ -1,130 +1,130 @@ -famille,intitule,type,unite -01,"** ADHERENTS",1,0 -01AB,"Abonnements",0,0 -01ABF,"Abonnement Fruit",0,0 -01CO,"Cotisations",0,0 -02,"** LÉGUMES ÉPICES",1,0 -02AROM,"Aromates",0,0 -02CARO,"Carotte - Panais",0,0 -02CHAM,"Champignons",0,0 -02CHOU,"Chou",0,0 -02COUR,"Courges",0,0 -02EPIC,"Epices",0,0 -02LEXT,"Extérieurs",0,0 -02LFEU,"Feuilles",0,0 -02PATA,"Patates",0,0 -02RAVE,"Racines",0,0 -02SALA,"Salade",0,0 -02TOMA,"Tomates",0,0 -03,"** FRUITS",1,0 -03AGRU,"Agrumes",0,0 -03FDCL,"Fruits Déclassés",0,0 -03FEXO,"Fruits Exotiques",0,0 -03FFAV,"Fruits Favoris",0,0 -03FJAR,"Fruits du Jardins",0,0 -03FNOY,"Fruits à Noyaux",0,0 -03FPEP,"Fruits à Pépins",0,0 -03FSEC,"Fruits Secs",0,0 -03MELO,"Melon Pastèque",0,0 -03RAIS,"Raisins",0,0 -04,"** EPICERIE",1,0 -04AJAR,"Accessoires Jardins",0,0 -04BIER,"Bières",0,0 -04CONL,"Conserves Légumes",0,0 -04CONP,"Conserves Poissons",0,0 -04CONV,"Conserves Viande",0,0 -04EPFR,"Epicerie Fraîche",0,0 -04EPSE,"Epicerie sèche",0,0 -04FARI,"Farines",0,0 -04HEEP,"Herbes et Épices",0,0 -04HUVI,"Huiles - Vinaigre",0,0 -04JUSF,"Jus de Fruits",0,0 -04LSCE,"Légumes Secs - Céréales",0,0 -04OEUF,"Boite Oeufs",0,0 -04PLAI,"Laitages",0,0 -04THE,"Thés",0,0 -04VINC,"Vins - Crémant",0,0 -04VRAC,"Cond. VRAC",0,0 -05,"** PLANTS Adhérent",1,0 -05AROM,"Aromates A - B",0,0 -05AROM2,"Aromates C - H",0,0 -05AROM3,"Aromates L - P",0,0 -05AROM4,"Aromates R - V",0,0 -05ARTI,"Artichaut",0,0 -05AUBE,"Aubergine",0,0 -05BETT,"Bette",0,0 -05BETTE,"Betterave",0,0 -05CELE,"Céleri rave",0,0 -05CHOU,"Chou",0,0 -05CONC,"Concombre",0,0 -05CORN,"Cornichon",0,0 -05COUR,"Courgette",0,0 -05EPINARD,"Epinard",0,0 -05FENO,"Fenouil",0,0 -05FRAISIER,"Fraisiers plants",0,0 -05HARI,"Haricot",0,0 -05MAIS,"Mais",0,0 -05MELON,"Melon",0,0 -05NAVET,"Navet",0,0 -05OIGN,"Oignon",0,0 -05PF,"Plants de fleurs",0,0 -05PHYSA,"Physalis",0,0 -05PL,"Plants Divers",0,0 -05POIR,"Poireau",0,0 -05POIV,"Poivron - Piment",0,0 -05POTI,"Courge - Potiron",0,0 -05RHUB,"Rhubarbe",0,0 -05SALA,"Salade",0,0 -05TOMA,"Tomate",0,0 -05ZPRO,"Plants Pro",0,0 -06,"** PRESTATIONS",1,0 -06FO,"Formations",0,0 -06PE,"Prestations environnements",0,0 -06PM,"Prestations de maraichage",0,0 -07,"** RESTAURATION",1,0 -07RE,"Repas",0,0 -10,"** TRANSFORMATION Jardin",1,0 -10TRAITEUR,"Traiteur Jardins",0,0 -10TRANSLEG,"Transformation Légumes",0,0 -11,"** PLANTS Aromates",1,0 -11ABSINT,"Absinthe plant",0,0 -11ACHE,"Ache des montagnes plant",0,0 -11AIL,"Ail des ours",0,0 -11ANETH,"Aneth plant",0,0 -11ANGEL,"Angélique plant",0,0 -11BASILIC,"Basilic plant",0,0 -11CAMOMI,"Camomille romaine plant",0,0 -11CITRONNE,"Citronnelle de Madagascar plant",0,0 -11CONSOUDE,"Consoude officinale plant",0,0 -11CUMIN,"Cumin des prés plant",0,0 -11FINESHER,"Ciboul - Estrag - Romarin plant",0,0 -11GUIMAUVE,"Guimauve officinale plant",0,0 -11HERBCURR,"Herbe à curry plant",0,0 -11HYSOPE,"Hysope plant",0,0 -11LAVANDE,"Lavande vraie plant",0,0 -11MENTHE,"Menthe-Mélisse plant",0,0 -11OSEILLE,"Oseille - roquette plant",0,0 -11PERSIL,"Persil-Cerfeuil-Coriande plant",0,0 -11RAIFORT,"Raifort plant",0,0 -11SAUGE,"Sauge plant",0,0 -11THYM,"Thym-Origan-Sariette plant",0,0 -11VALERIAN,"Valériane plant",0,0 -11VERVEINE,"Verveine plant",0,0 -12,"** Producteurs",1,0 -12ARTISMON,"Artisans du Monde",0,0 -12BRINCUEI,"Brin de Cueillette",0,0 -12CLAIRE,"Clairedefruits",0,0 -12DELAUBRA,"Ferme des Délices d'Aubrac",0,0 -12DRAIMONT,"Bergerie du Draimont",0,0 -12DURBION,"Gaec du Durbion",0,0 -12DUTHOIT,"DUTHOIT Bertrand",0,0 -12ECOLONIE,"ECOLONIE",0,0 -12FERRYGAE,"FERRY Gaétan",0,0 -12PETITCOL,"Miel PETITCOLIN Mathieu",0,0 -12PROVINCE,"Ferme des 3 Provinces",0,0 -12RELIONRO,"Miel Relion -Roussel",0,0 -12VACCEUX,"Gaec du Vacceux",0,0 -DIVERS,"LIVRE",0,0 -FRUIT,"Panier Fruit",0,0 -ZCDE,"Commande",0,0 -ZDIVERS,"Frais et accessoires",0,0 +"code","famille",code_parent +"01",** ADHERENTS, +"01AB",Abonnements, +"01ABF",Abonnement Fruit, +"01CO",Cotisations, +"02",** LÉGUMES ÉPICES, +"02AROM",Aromates, +"02CARO",Carotte - Panais, +"02CHAM",Champignons, +"02CHOU",Chou, +"02COUR",Courges, +"02EPIC",Epices, +"02LEXT",Extérieurs, +"02LFEU",Feuilles, +"02PATA",Patates, +"02RAVE",Racines, +"02SALA",Salade, +"02TOMA",Tomates, +"03",** FRUITS, +"03AGRU",Agrumes, +"03FDCL",Fruits Déclassés, +"03FEXO",Fruits Exotiques, +"03FFAV",Fruits Favoris, +"03FJAR",Fruits du Jardins, +"03FNOY",Fruits à Noyaux, +"03FPEP",Fruits à Pépins, +"03FSEC",Fruits Secs, +"03MELO",Melon Pastèque, +"03RAIS",Raisins, +"04",** EPICERIE, +"04AJAR",Accessoires Jardins, +"04BIER",Bières, +"04CONL",Conserves Légumes, +"04CONP",Conserves Poissons, +"04CONV",Conserves Viande, +"04EPFR",Epicerie Fraîche, +"04EPSE",Epicerie sèche, +"04FARI",Farines, +"04HEEP",Herbes & Épices, +"04HUVI",Huiles - Vinaigre, +"04JUSF",Jus de Fruits, +"04LSCE",Légumes Secs - Céréales, +"04OEUF",Boite Oeufs, +"04PLAI",Laitages, +"04THE",Thés, +"04VINC",Vins - Crémant, +"04VRAC",Cond. VRAC, +"05",** PLANTS Adhérent, +"05AROM",Aromates A - B, +"05AROM2",Aromates C - H, +"05AROM3",Aromates L - P, +"05AROM4",Aromates R - V, +"05ARTI",Artichaut, +"05AUBE",Aubergine, +"05BETT",Bette, +"05BETTE",Betterave, +"05CELE",Céleri rave, +"05CHOU",Chou, +"05CONC",Concombre, +"05CORN",Cornichon, +"05COUR",Courgette, +"05EPINARD",Epinard, +"05FENO",Fenouil, +"05FRAISIER",Fraisiers plants, +"05HARI",Haricot, +"05MAIS",Mais, +"05MELON",Melon, +"05NAVET",Navet, +"05OIGN",Oignon, +"05PF",Plants de fleurs, +"05PHYSA",Physalis, +"05PL",Plants Divers, +"05POIR",Poireau, +"05POIV",Poivron - Piment, +"05POTI",Courge - Potiron, +"05RHUB",Rhubarbe, +"05SALA",Salade, +"05TOMA",Tomate, +"05ZPRO",Plants Pro, +"06",** PRESTATIONS, +"06FO",Formations, +"06PE",Prestations environnements, +"06PM",Prestations de maraichage, +"07",** RESTAURATION, +"07RE",Repas, +"10",** TRANSFORMATION Jardin, +"10TRAITEUR",Traiteur Jardins, +"10TRANSLEG",Transformation Légumes, +"11",** PLANTS Aromates, +"11ABSINT",Absinthe plant, +"11ACHE",Ache des montagnes plant, +"11AIL",Ail des ours, +"11ANETH",Aneth plant, +"11ANGEL",Angélique plant, +"11BASILIC",Basilic plant, +"11CAMOMI",Camomille romaine plant, +"11CITRONNE",Citronnelle de Madagascar plant, +"11CONSOUDE",Consoude officinale plant, +"11CUMIN",Cumin des prés plant, +"11FINESHER",Ciboul - Estrag - Romarin plant, +"11GUIMAUVE",Guimauve officinale plant, +"11HERBCURR",Herbe à curry plant, +"11HYSOPE",Hysope plant, +"11LAVANDE",Lavande vraie plant, +"11MENTHE",Menthe-Mélisse plant, +"11OSEILLE",Oseille - roquette plant, +"11PERSIL",Persil-Cerfeuil-Coriande plant, +"11RAIFORT",Raifort plant, +"11SAUGE",Sauge plant, +"11THYM",Thym-Origan-Sariette plant, +"11VALERIAN",Valériane plant, +"11VERVEINE",Verveine plant, +"12",** Producteurs, +"12ARTISMON",Artisans du Monde, +"12BRINCUEI",Brin de Cueillette, +"12CLAIRE",Clairedefruits, +"12DELAUBRA",Ferme des Délices d'Aubrac, +"12DRAIMONT",Bergerie du Draimont, +"12DURBION",Gaec du Durbion, +"12DUTHOIT",DUTHOIT Bertrand, +"12ECOLONIE",ECOLONIE, +"12FERRYGAE",FERRY Gaétan, +"12PETITCOL",Miel PETITCOLIN Mathieu, +"12PROVINCE",Ferme des 3 Provinces, +"12RELIONRO",Miel Relion -Roussel, +"12VACCEUX",Gaec du Vacceux, +DIVERS,LIVRE, +FRUIT,Panier Fruit, +ZCDE,Commande, +ZDIVERS,Frais et accessoires, diff --git a/docker-entrypoint-initdb.d/initdb.sql b/docker-entrypoint-initdb.d/initdb.sql index f4dcf43..64b6872 100644 --- a/docker-entrypoint-initdb.d/initdb.sql +++ b/docker-entrypoint-initdb.d/initdb.sql @@ -10,10 +10,9 @@ create table adherent ( \COPY adherent FROM '/tmp/adherent.csv' (FORMAT CSV, header, ENCODING 'UTF8'); create table famille ( - famille text primary key, - intitule text, - type int, - unite int + code text primary key, + famille text, + code_parent text ); \COPY famille FROM '/tmp/famille.csv' (FORMAT CSV, header, ENCODING 'UTF8');