MyVideos48
Table "seasons"
Previous topic Chapter index Next topic

System:

Fields
Field Data type PK FK Not Null Default Collate Check On Conflict
idSeason integer            
idShow integer              
Season integer              
Title text              
Lock bool     0      
Mark bool     0      
New bool     0      
strTVDB text              
strTMDB text              
strAired text              
strPlot text              

Indexes
Index Fields Primary Unique
ix_seasons idShow, Season  

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

Checks
      There are no checks for table "seasons"

Triggers
Trigger Enabled Events Type When expression
delete_season DELETE After  

References
      There are no references for table "seasons"

Definition:
CREATE TABLE seasons (
  idSeason  integer PRIMARY KEY,
  idShow    integer,
  Season    integer,
  Title     text,
  Lock      bool NOT NULL DEFAULT 0,
  Mark      bool NOT NULL DEFAULT 0,
  "New"     bool NOT NULL DEFAULT 0,
  strTVDB   text,
  strTMDB   text,
  strAired  text,
  strPlot   text
);

CREATE UNIQUE INDEX ix_seasons
  ON seasons
  (idShow, Season);

CREATE TRIGGER delete_season
  AFTER DELETE
  ON seasons
BEGIN
        DELETE FROM art WHERE media_id=old.idSeason AND media_type='season';
        DELETE FROM episode WHERE Season=old.Season AND idShow=old.idShow;
        DELETE FROM uniqueid WHERE media_id=old.idSeason AND media_type='season';
        END;


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