feat: Enhance CSV import process and data cleanup

- Added support for importing 'periodes' data and adjusted related SQL scripts.
- Introduced a new SQL preparation script to set up the import schema.
- Updated the import_all_csv.sh script to handle new CSV files and tables.
- Implemented checks for required SQL files and improved error handling.
- Modified data types and structures in the import process for better consistency.
- Created a new remove-import-data.sql script to clean up imported data effectively.
- Enhanced the handling of postal codes and addresses in the import logic.
- Added comments and structured the SQL scripts for better readability and maintainability.
This commit is contained in:
Boris Waaub
2026-03-16 13:48:12 +01:00
parent 8481acfe5d
commit c388967ebd
9 changed files with 914 additions and 66 deletions

View File

@@ -119,24 +119,24 @@ CREATE TABLE "import".users (
);
CREATE TABLE "import".tiers (
ID varchar(50) NULL,
CATEGORIE VARCHAR(255),
SECTEUR_AS VARCHAR(255),
COMMUNE VARCHAR(255),
NOM VARCHAR(255),
ACRONYM VARCHAR(64),
PHONENUMBER VARCHAR(20),
PHONENUMBER_2 VARCHAR(20),
EMAIL VARCHAR(255),
PERSONNE_NOM VARCHAR(255),
PERSONNE_prenom VARCHAR(255),
PERSONNE_CIVILITE VARCHAR(20),
id varchar(50) NULL,
categorie VARCHAR(255),
secteur_as VARCHAR(255),
commune VARCHAR(255),
nom VARCHAR(255),
acronym VARCHAR(64),
phonenumber VARCHAR(20),
phonenumber_2 VARCHAR(20),
email VARCHAR(255),
personne_nom VARCHAR(255),
personne_prenom VARCHAR(255),
personne_civilite VARCHAR(20),
adresse TEXT,
CP VARCHAR(10),
TIERS_PARENT VARCHAR(255),
TIERS_PHYSIQUE_VS_MORALE VARCHAR(50),
POINT_DE_CONTACT_SUR_LE_TERRITOIRE TEXT,
COORDONNEES TEXT,
HORAIRES TEXT,
OBSERVATIONS TEXT
cp VARCHAR(10),
tiers_parent VARCHAR(255),
tiers_physique_vs_morale VARCHAR(50),
point_de_contact_sur_le_territoire TEXT,
coordonnees TEXT,
horaires TEXT,
observations TEXT
);