-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1482 from betagouv/1465-history
Compléter les historiques de Déclarations
- Loading branch information
Showing
11 changed files
with
465 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
-- Le but de ce fichier est de permettre la recréation des tables Teleicare correspondant | ||
-- au modèle de Declaration Compl'Alim | ||
|
||
|
||
-- int int smallint -> integer | ||
-- vachar -> text | ||
-- bit -> boolean | ||
-- datetime -> text (pour une conversion ensuite) | ||
|
||
CREATE TABLE ICA_ETABLISSEMENT ( | ||
ETAB_IDENT integer PRIMARY KEY, | ||
COG_IDENT integer NULL, | ||
ETAB_IDENT_PARENT integer NULL, | ||
PAYS_IDENT integer NOT NULL, | ||
ETAB_SIRET text NULL, | ||
ETAB_NUMERO_TVA_INTRA text NULL, | ||
ETAB_RAISON_SOCIALE text NOT NULL, | ||
ETAB_ENSEIGNE text NULL, | ||
ETAB_ADRE_VILLE text NULL, | ||
ETAB_ADRE_CP text NULL, | ||
ETAB_ADRE_VOIE text NULL, | ||
ETAB_ADRE_COMP text NULL, | ||
ETAB_ADRE_COMP2 text NULL, | ||
ETAB_ADRE_DIST text NULL, | ||
ETAB_TELEPHONE text NULL, | ||
ETAB_FAX text NULL, | ||
ETAB_COURRIEL text NULL, | ||
ETAB_SITE_INTERNET text NULL, | ||
ETAB_ICA_FACONNIER boolean NULL, | ||
ETAB_ICA_FABRICANT boolean NULL, | ||
ETAB_ICA_CONSEIL boolean NULL, | ||
ETAB_ICA_IMPORTATEUR boolean NULL, | ||
ETAB_ICA_INTRODUCTEUR boolean NULL, | ||
ETAB_ICA_DISTRIBUTEUR boolean NULL, | ||
ETAB_ICA_ENSEIGNE text NULL, | ||
ETAB_ADRE_REGION text NULL, | ||
ETAB_DT_AJOUT_IDENT_PARENT text NULL, | ||
ETAB_NUM_ADH_TELE_PROC text NULL, | ||
ETAB_COMMENTAIRE_IDENT_PARENT text NULL, | ||
ETAB_NOM_DOMAINE text NULL, | ||
ETAB_DATE_ADHESION text NULL, | ||
ETAB_NB_COMPTE_AUTORISE integer NOT NULL | ||
); |
44 changes: 44 additions & 0 deletions
44
data/etl/teleicare_history/sql/declaration_composition_table_creation.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
CREATE TABLE ICA_INGREDIENT ( | ||
INGR_IDENT integer PRIMARY KEY, | ||
VRSDECL_IDENT integer NOT NULL, | ||
FCTINGR_IDENT integer NOT NULL, | ||
TYING_IDENT integer NOT NULL, | ||
INGR_COMMENTAIRES text NULL | ||
); | ||
|
||
|
||
|
||
|
||
CREATE TABLE ICA_MICRO_ORGANISME ( | ||
INGR_IDENT integer PRIMARY KEY, | ||
MORG_IDENT integer NOT NULL, | ||
INGMORG_SOUCHE text NULL, | ||
INGMORG_QUANTITE_PAR_DJR bigint NULL | ||
); | ||
|
||
|
||
|
||
CREATE TABLE ICA_INGREDIENT_AUTRE ( | ||
INGR_IDENT integer PRIMARY KEY, | ||
INGA_IDENT integer NOT NULL | ||
); | ||
|
||
|
||
|
||
CREATE TABLE ICA_PREPARATION ( | ||
INGR_IDENT integer PRIMARY KEY, | ||
PLTE_IDENT integer NOT NULL, | ||
PPLAN_IDENT integer NULL, | ||
UNT_IDENT integer NULL, | ||
TYPPREP_IDENT integer NULL, | ||
PREPA_QTE float NULL | ||
); | ||
|
||
|
||
CREATE TABLE ICA_SUBSTANCE_DECLAREE( | ||
VRSDECL_IDENT integer NOT NULL, | ||
SBSACT_IDENT integer NOT NULL, | ||
SBSACT_COMMENTAIRES text NULL, | ||
SBSACTDECL_QUANTITE_PAR_DJR float NULL, | ||
PRIMARY KEY (VRSDECL_IDENT, SBSACT_IDENT) | ||
); |
Oops, something went wrong.