System: |
|
Table: |
episode |
Events: |
DELETE |
Type: |
After |
Enabled: |
|
When expression: |
(no value) |
Body: |
|
Definition:
CREATE TRIGGER delete_episode
AFTER DELETE
ON episode
BEGIN
DELETE FROM actorlinkepisode WHERE idEpisode=old.idEpisode;
DELETE FROM art WHERE media_id=old.idEpisode AND media_type='episode';
DELETE FROM directorlinkepisode WHERE idEpisode=old.idEpisode;
DELETE FROM files WHERE idFile=old.idFile;
DELETE FROM rating WHERE media_id=old.idEpisode AND media_type='episode';
DELETE FROM gueststarlinkepisode WHERE idEpisode=old.idEpisode;
DELETE FROM uniqueid WHERE media_id=old.idEpisode AND media_type='episode';
DELETE FROM writerlinkepisode WHERE idEpisode=old.idEpisode;
DELETE FROM TVVStreams WHERE TVEpID=old.idEpisode;
DELETE FROM TVAStreams WHERE TVEpID=old.idEpisode;
DELETE FROM TVSubs WHERE TVEpID=old.idEpisode;
END;