46 lines
1.2 KiB
PL/PgSQL
46 lines
1.2 KiB
PL/PgSQL
BEGIN;
|
|
|
|
CREATE TABLE IF NOT EXISTS finess (
|
|
nofinesset VARCHAR(255),
|
|
nofinessej VARCHAR(255),
|
|
rs VARCHAR(255),
|
|
rslongue VARCHAR(255),
|
|
complrs VARCHAR(255),
|
|
compldistrib VARCHAR(255),
|
|
numvoie VARCHAR(255),
|
|
typvoie VARCHAR(255),
|
|
voie VARCHAR(255),
|
|
compvoie VARCHAR(255),
|
|
lieuditbp VARCHAR(255),
|
|
commune VARCHAR(255),
|
|
departement VARCHAR(255),
|
|
libdepartement VARCHAR(255),
|
|
ligneacheminement VARCHAR(255),
|
|
telephone VARCHAR(255),
|
|
telecopie VARCHAR(255),
|
|
categetab VARCHAR(255),
|
|
libcategetab VARCHAR(255),
|
|
categagretab VARCHAR(255),
|
|
libcategagretab VARCHAR(255),
|
|
siret VARCHAR(255),
|
|
codeape VARCHAR(255),
|
|
codemft VARCHAR(255),
|
|
libmft VARCHAR(255),
|
|
codesph VARCHAR(255),
|
|
libsph VARCHAR(255),
|
|
dateouv DATE DEFAULT '1900-01-01',
|
|
dateautor DATE DEFAULT '1900-01-01',
|
|
datemaj DATE DEFAULT '1900-01-01',
|
|
numuai VARCHAR(255),
|
|
coordxet FLOAT DEFAULT 0,
|
|
coordyet FLOAT DEFAULT 0
|
|
);
|
|
|
|
COPY finess FROM '/docker-entrypoint-initdb.d/finess.csv' DELIMITER ';' CSV HEADER;
|
|
|
|
ALTER TABLE ONLY finess
|
|
ADD CONSTRAINT finess_pkey PRIMARY KEY (nofinesset);
|
|
|
|
COMMIT;
|
|
|
|
ANALYZE finess; |