Compare commits

..

1 Commits

Author SHA1 Message Date
Yohann Dedy 69f69ba534 README.md : Ajout modèle BDD 2019-12-01 23:42:18 +01:00
1 changed files with 34 additions and 32 deletions

View File

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