Compare commits

..

1 Commits

Author SHA1 Message Date
Yohann Dedy 3b5aa9c7e0 README.md : Ajout modèle BDD 2019-12-01 23:43:54 +01:00
1 changed files with 32 additions and 34 deletions

View File

@ -14,41 +14,39 @@
## Tables de la base RFScraper ## Tables de la base RFScraper
''' CREATE TABLE station(
CREATE TABLE station( id serial PRIMARY KEY,
id serial PRIMARY KEY, url text UNIQUE NOT NULL
url text UNIQUE NOT NULL );
);
CREATE TABLE emission(
CREATE TABLE emission( id serial PRIMARY KEY,
id serial PRIMARY KEY, nom text NOT NULL,
nom text NOT NULL, url_page text NOT NULL,
url_page text NOT NULL, url_rss text,
url_rss text, genre text,
genre text, producteur text,
producteur text, station_id INTEGER REFERENCES station(id)
station_id INTEGER REFERENCES station(id) );
);
CREATE TABLE episode(
CREATE TABLE episode( id serial PRIMARY KEY,
id serial PRIMARY KEY, titre text NOT NULL,
titre text NOT NULL, date_diffusion date,
date_diffusion date, description_lead text,
description_lead text, description_full text,
description_full text, id_episode_site int UNIQUE NOT NULL,
id_episode_site int UNIQUE NOT NULL, emission_id INTEGER REFERENCES emission(id)
emission_id INTEGER REFERENCES emission(id) );
);
CREATE TABLE media(
CREATE TABLE media( id serial PRIMARY KEY,
id serial PRIMARY KEY, url_file text NOT NULL,
url_file text NOT NULL, filename_orig text NOT NULL,
filename_orig text NOT NULL, filename_local text,
filename_local text, size integer NOT NULL,
size integer NOT NULL, date_modif date NOT NULL,
date_modif date NOT NULL,
md5 text, md5 text,
duration real, duration real,
episode_id INTEGER REFERENCES episode(id) episode_id INTEGER REFERENCES episode(id)
); );
'''