1 alter table podcast_tags modify tag varchar(100) character set utf8 collate utf8_general_ci not null;
3 DROP VIEW IF EXISTS episode_toplist;
5 CREATE VIEW episode_toplist AS
6 SELECT episode_id AS id, episode_id, count(episode_id) AS listeners
7 FROM recent_unique_plays
12 CREATE TABLE related_podcasts (
13 id INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
14 ref_podcast_id INTEGER NOT NULL,
15 rel_podcast_id INTEGER NOT NULL,
16 priority INTEGER NOT NULL
19 ALTER TABLE related_podcasts ADD CONSTRAINT ref_podcast_id FOREIGN KEY (ref_podcast_id) REFERENCES podcast (id);
20 ALTER TABLE related_podcasts ADD CONSTRAINT rel_podcast_id FOREIGN KEY (rel_podcast_id) REFERENCES podcast (id);