<commit_before>--
-- Creation de la structure de tables ENDIV
--

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
CREATE SCHEMA pgis;
CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA pgis;


-- wrapper de fichiers txt type csv utilisé pour les imports gtfs
CREATE EXTENSION IF NOT EXISTS file_fdw;
COMMENT ON EXTENSION file_fdw IS 'foreign-data wrapper which can be used to access data files in the (server)file system';
CREATE SERVER file_fdw_server FOREIGN DATA WRAPPER file_fdw;


SET default_tablespace = '';
SET default_with_oids = false;
SET search_path = public, pg_catalog, pgis;

DO $$
BEGIN
   execute 'alter database ' || current_database() || ' SET search_path = public, pg_catalog, pgis';
END;
$$;
--creation des types 
CREATE TYPE calendar_type AS ENUM ('jour', 'periode', 'mixte', 'accessibilite', 'brique');
CREATE TYPE calendar_operator AS ENUM ('+', '-', '&');

-- Creation des tables, cles primaires et indexes
CREATE TABLE agency (
    id serial PRIMARY KEY,
    name character varying(30) NOT NULL,
    url character varying(100),
    timezone character varying(30) NOT NULL,
    lang character varying(3),
    phone character varying(20)<commit_msg>RE-creation du type address dans endiv.sql<commit_after>--
-- Creation de la structure de tables ENDIV
--

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
CREATE SCHEMA pgis;
CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA pgis;


-- wrapper de fichiers txt type csv utilisé pour les imports gtfs
CREATE EXTENSION IF NOT EXISTS file_fdw;
COMMENT ON EXTENSION file_fdw IS 'foreign-data wrapper which can be used to access data files in the (server)file system';
CREATE SERVER file_fdw_server FOREIGN DATA WRAPPER file_fdw;


SET default_tablespace = '';
SET default_with_oids = false;
SET search_path = public, pg_catalog, pgis;

DO $$
BEGIN
   execute 'alter database ' || current_database() || ' SET search_path = public, pg_catalog, pgis';
END;
$$;
--creation des types 
CREATE TYPE calendar_type AS ENUM ('jour', 'periode', 'mixte', 'accessibilite', 'brique');
CREATE TYPE calendar_operator AS ENUM ('+', '-', '&');
CREATE TYPE address AS (address character varying, the_geom character varying, is_entrance boolean);

-- Creation des tables, cles primaires et indexes
CREATE TABLE agency (
    id serial PRIMARY KEY,
    name character varying(30) NOT NULL,
    url character varying(100),
    timezone character varying(30) NOT NULL,
    lang character varying(3),
    phone character varying(20)
{'fraction_non_alphanumeric': 0.08421423537702608, 'fraction_numerical': 0.008456659619450317, 'mean_word_length': 4.841563786008231, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7499614', 'n_tokens_mistral': 903, 'n_tokens_neox': 860, 'n_words': 336}