18 lines
359 B
PL/PgSQL
18 lines
359 B
PL/PgSQL
BEGIN;
|
|
|
|
CREATE TABLE IF NOT EXISTS regions (
|
|
code VARCHAR(3),
|
|
chefLieu VARCHAR(5),
|
|
nom VARCHAR(255),
|
|
typeLiaison VARCHAR(255),
|
|
region_zone VARCHAR(255)
|
|
);
|
|
|
|
COPY regions FROM '/docker-entrypoint-initdb.d/regions.csv' DELIMITER ',' CSV;
|
|
|
|
ALTER TABLE ONLY regions
|
|
ADD CONSTRAINT regions_pkey PRIMARY KEY (code);
|
|
|
|
COMMIT;
|
|
|
|
ANALYZE regions; |