SET client_encoding = 'utf-8';
SET standard_conforming_strings = OFF;
DROP TABLE IF EXISTS "epci" CASCADE;
BEGIN;
CREATE TABLE "epci"();
SELECT AddGeometryColumn('epci','geometrie',2972,'MULTIPOLYGON',2);
CREATE INDEX "epci_geometrie_geom_idx" ON "epci" USING GIST ("geometrie");
ALTER TABLE "epci" ADD COLUMN "cleabs" VARCHAR(24);
ALTER TABLE "epci" ADD CONSTRAINT "epci_cleabs_pkey" PRIMARY KEY ("cleabs");
ALTER TABLE "epci" ADD COLUMN "code_siren" VARCHAR(9);
ALTER TABLE "epci" ADD COLUMN "nature" VARCHAR;
ALTER TABLE "epci" ADD COLUMN "nom_officiel" VARCHAR;
ALTER TABLE "epci" ADD COLUMN "date_creation" timestamp with time zone;
ALTER TABLE "epci" ADD COLUMN "date_modification" timestamp with time zone;
ALTER TABLE "epci" ADD COLUMN "date_d_apparition" date;
ALTER TABLE "epci" ADD COLUMN "date_de_confirmation" date;
ALTER TABLE "epci" ADD COLUMN "liens_vers_autorite_administrative" VARCHAR;
COMMIT;
SET standard_conforming_strings = OFF;
BEGIN;
COPY "epci" ("geometrie", "cleabs", "code_siren", "nature", "nom_officiel", "date_creation", "date_modification", "date_d_apparition", "date_de_confirmation", "liens_vers_autorite_administrative") FROM STDIN;
[encoded data, 364242 characters]	EPCI____0000002150237204	249730045	Communauté d'agglomération	CA du Centre Littoral	2018/11/24 00:00:00	2024/03/08 11:24:35.111	\N	\N	SURFACTI0000001371318488
[encoded data, 370716 characters]	EPCI____0000002150235998	200027548	Communauté de communes	CC des Savanes	2018/11/24 00:00:00	2024/03/08 11:24:35.111	\N	\N	SURFACTI0000002008849216
[encoded data, 434550 characters]	EPCI____0000002150237205	249730052	Communauté de communes	CC de l'Est Guyanais	2018/11/24 00:00:00	2021/09/17 09:06:57.187	\N	\N	SURFACTI0000001372290622
[encoded data, 519310 characters]	EPCI____0000002150237203	249730037	Communauté de communes	CC de l'Ouest Guyanais	2018/11/24 00:00:00	2024/02/09 11:33:33.618	\N	\N	SURFACTI0000001372259985
\.
END;
COMMIT;
