MyVideos48
Table "episode"
Previous topic Chapter index Next topic

System:

Fields
Field Data type PK FK Not Null Default Collate Check On Conflict
idEpisode integer            
idShow integer            
idFile integer            
idSource integer            
Episode integer              
Title text              
New bool       0      
Mark bool     0      
Lock bool     0      
Season integer              
Rating text              
Plot text              
Aired text              
NfoPath text              
Playcount integer              
DisplaySeason integer              
DisplayEpisode integer              
DateAdded integer              
Runtime text              
Votes text              
VideoSource text              
HasSub bool     0      
SubEpisode integer              
iLastPlayed integer              
strIMDB text              
strTMDB text              
strTVDB text              
iUserRating integer     0      
OriginalTitle text              
userNote                

Indexes
      There are no indexes for table "episode"

Foreign keys
      There are no foreign keys for table "episode"

Checks
      There are no checks for table "episode"

Triggers
Trigger Enabled Events Type When expression
delete_episode DELETE After  

References
      There are no references for table "episode"

Definition:
CREATE TABLE episode (
  idEpisode       integer PRIMARY KEY AUTOINCREMENT,
  idShow          integer NOT NULL,
  idFile          integer NOT NULL,
  idSource        integer NOT NULL,
  Episode         integer,
  Title           text,
  "New"           bool DEFAULT 0,
  Mark            bool NOT NULL DEFAULT 0,
  Lock            bool NOT NULL DEFAULT 0,
  Season          integer,
  Rating          text,
  Plot            text,
  Aired           text,
  NfoPath         text,
  Playcount       integer,
  DisplaySeason   integer,
  DisplayEpisode  integer,
  DateAdded       integer,
  Runtime         text,
  Votes           text,
  VideoSource     text,
  HasSub          bool NOT NULL DEFAULT 0,
  SubEpisode      integer,
  iLastPlayed     integer,
  strIMDB         text,
  strTMDB         text,
  strTVDB         text,
  iUserRating     integer NOT NULL DEFAULT 0,
  OriginalTitle   text,
  userNote        
);

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;


Previous topic Chapter index Next topic
Generated by ""SQLite Maestro Professional"" at 08.07.2021 23:49:20