simplify subscribing/unsubscribing podcasts
[mygpo.git] / install / update-33.sql
blobbb81d01cf6f06b96d311fbb35f076b4657e524bf
1 DROP PROCEDURE IF EXISTS update_suggestion;
2 DROP PROCEDURE IF EXISTS update_suggestion_for;
4 CREATE TABLE `suggestion_blacklist` (
5     `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
6     `podcast_id` integer NOT NULL,
7     `user_id` integer NOT NULL,
8     UNIQUE (`podcast_id`, `user_id`)
9 );
11 ALTER TABLE `suggestion_blacklist` ADD CONSTRAINT `podcast_id` FOREIGN KEY (`podcast_id`) REFERENCES `podcast` (`id`);
12 ALTER TABLE `suggestion_blacklist` ADD CONSTRAINT `user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
14 DROP TABLE IF EXISTS suggestion_pod;
15 DROP TABLE IF EXISTS suggestion_user;