     "user" character varying(30) NOT NULL
 );
 COMMENT ON TABLE log IS 'Trace de toutes les operations sur la base.';
-CREATE SEQUENCE log_id_seq
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-ALTER SEQUENCE log_id_seq OWNED BY log.id;
-
-
-
+ALTER TABLE ONLY log ADD CONSTRAINT log_pk PRIMARY KEY (id);
 
 CREATE TABLE non_concurrency (
     priority_line_id integer NOT NULL,

COMMENT ON COLUMN stop_area.short_name IS 'Nom identique aux noms des arrets le composant.';
COMMENT ON COLUMN stop_area.long_name IS 'Par defaut, le long_name est identique aux noms des arrets le composant, il peut etre modifie pour developper les abbreviations du nom court.';
COMMENT ON COLUMN stop_area.transfer_duration IS 'Temps en secondes de transfert entre deux arret de cette zone d''arrets.';




CREATE TABLE stop_area_datasource (
    id integer NOT NULL,
    stop_area_id integer NOT NULL,
    datasource_id integer NOT NULL,
    code character varying(20)
);
COMMENT ON TABLE stop_area_datasource IS 'Reference de l''objet dans le referentiel de la datasource.';
CREATE SEQUENCE stop_area_datasource_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;
ALTER SEQUENCE stop_area_datasource_id_seq OWNED BY stop_area_datasource.id;
CREATE SEQUENCE stop_area_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;
ALTER SEQUENCE stop_area_id_seq OWNED BY stop_area.id;




CREATE TABLE stop_history (
    id integer NOT NULL,
    stop_id integer NOT NULL,
    start_date date NOT NULL,
    end_date date,

	is_entrance boolean
);

CREATE TABLE agency (
    id serial,
    name character varying(30),
    url character varying(100),
    timezone character varying(30),
