Base de donnée

De Raildar
Révision de 5 janvier 2014 à 20:10 par Spyou (discuter | contributions) (Page créée avec « Dump du schema au 05/01/2014 : <pre> CREATE TABLE arrets ( id_arret integer NOT NULL, id_gare integer, info text, id_mission integer, minutes_retard i... »)

(diff) ← Version précédente | Voir la version courante (diff) | Version suivante → (diff)
Aller à : navigation, rechercher

Dump du schema au 05/01/2014 :

CREATE TABLE arrets (
    id_arret integer NOT NULL,
    id_gare integer,
    info text,
    id_mission integer,
    minutes_retard integer,
    time_theorique timestamp without time zone
);

CREATE TABLE fournisseurs (
    id_fournisseur integer NOT NULL,
    name text NOT NULL
);

CREATE TABLE gares (
    id_gare integer NOT NULL,
    name_gare text,
    geom_gare geometry(Point,4326),
    stoparea text,
    stoppoint text,
    id_fournisseur integer,
    shortcode character(10),
    id_place integer,
    checked boolean
);

CREATE TABLE lignes (
    id_ligne integer NOT NULL,
    idx_ligne integer,
    name_ligne text,
    code_ligne text,
    last_seen timestamp without time zone DEFAULT now(),
    id_gare_from integer,
    id_gare_to integer
);

CREATE TABLE missions (
    id_mission integer DEFAULT nextval('missions_id_mission_seq'::regclass) NOT NULL,
    id_train integer,
    day_of_circu date NOT NULL,
    en_circulation boolean DEFAULT false,
    passed boolean DEFAULT false,
    canceled boolean DEFAULT false,
    start_time timestamp without time zone,
    end_time timestamp without time zone,
    theo_geom geometry(Point,4326),
    real_geom geometry(Point,4326),
    pos_type integer,
    minutes_for_next_station integer,
    heading integer,
    last_check timestamp without time zone,
    last_update timestamp without time zone
);

CREATE TABLE paths (
    id_path integer NOT NULL,
    id_gare_from integer,
    id_gare_to integer,
    geom geometry(LineString,4326),
    distance integer,
    valid boolean,
    reason text
);

CREATE TABLE places (
    id_place integer NOT NULL,
    ville text,
    postalcode text,
    address text,
    id_region integer
);

CREATE TABLE regions (
    id_region integer NOT NULL,
    name_region text,
    pays_code character(5),
    geom_region geometry(Polygon,4326),
    bbox_region geometry(Polygon,4326)
);

CREATE TABLE trains (
    id_train integer NOT NULL,
    num integer,
    code text,
    last_seen timestamp without time zone DEFAULT now() NOT NULL,
    id_ligne integer,
    brand text
);