SET client_encoding = 'utf-8';
SET standard_conforming_strings = OFF;
DROP TABLE IF EXISTS "departement" CASCADE;
BEGIN;
CREATE TABLE "departement"();
SELECT AddGeometryColumn('departement','geometrie',4471,'GEOMETRY',2);
CREATE INDEX "departement_geometrie_geom_idx" ON "departement" USING GIST ("geometrie");
ALTER TABLE "departement" ADD COLUMN "cleabs" VARCHAR(24);
ALTER TABLE "departement" ADD COLUMN "code_insee" VARCHAR(5);
ALTER TABLE "departement" ADD COLUMN "code_insee_de_la_region" VARCHAR(5);
ALTER TABLE "departement" ADD COLUMN "nom_officiel" VARCHAR;
ALTER TABLE "departement" ADD COLUMN "date_creation" timestamp with time zone;
ALTER TABLE "departement" ADD COLUMN "date_modification" timestamp with time zone;
ALTER TABLE "departement" ADD COLUMN "date_d_apparition" date;
ALTER TABLE "departement" ADD COLUMN "date_de_confirmation" date;
ALTER TABLE "departement" ADD COLUMN "liens_vers_autorite_administrative" VARCHAR;
ALTER TABLE "departement" ADD COLUMN "code_siren" VARCHAR(9);
COMMIT;
SET standard_conforming_strings = OFF;
BEGIN;
COPY "departement" ("geometrie", "cleabs", "code_insee", "code_insee_de_la_region", "nom_officiel", "date_creation", "date_modification", "date_d_apparition", "date_de_confirmation", "liens_vers_autorite_administrative", "code_siren") FROM STDIN;
[encoded data, 863872 characters]	DEPARTEM0000002150000438	976	06	Mayotte	2018/11/24 00:00:00	2023/03/06 15:02:30.722	\N	\N	SURFACTI0000001600043846	\N
\.
END;
COMMIT;
