SET client_encoding = 'utf-8';
SET standard_conforming_strings = OFF;
DROP TABLE IF EXISTS "epci" CASCADE;
BEGIN;
CREATE TABLE "epci"();
SELECT AddGeometryColumn('epci','geometrie',4471,'GEOMETRY',2);
CREATE INDEX "epci_geometrie_geom_idx" ON "epci" USING GIST ("geometrie");
ALTER TABLE "epci" ADD COLUMN "cleabs" VARCHAR(24);
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, 208540 characters]	EPCI____0000002150236242	200060465	Communauté d'agglomération	CA du Grand Nord de Mayotte	2018/11/24 00:00:00	2023/03/06 15:02:30.722	\N	\N	SURFACTI0000002205076497
[encoded data, 352352 characters]	EPCI____0000002150236243	200060473	Communauté de communes	CC du Sud	2018/11/24 00:00:00	2022/06/20 10:50:32.043	\N	\N	SURFACTI0000002007748815
[encoded data, 61724 characters]	EPCI____0000002150236220	200050532	Communauté de communes	CC de Petite-Terre	2018/11/24 00:00:00	2022/06/20 10:50:32.043	\N	\N	SURFACTI0000002007748817
[encoded data, 119254 characters]	EPCI____0000002150236238	200059871	Communauté de communes	CC du Centre-Ouest	2018/11/24 00:00:00	2022/06/20 10:50:32.043	\N	\N	SURFACTI0000002007748813
[encoded data, 129192 characters]	EPCI____0000002150236241	200060457	Communauté d'agglomération	CA Dembeni-Mamoudzou	2018/11/24 00:00:00	2022/06/20 10:50:32.043	\N	\N	SURFACTI0000002007748816
\.
END;
COMMIT;
