MyVideos48
Table "tvshow"
Previous topic Chapter index Next topic

System:

Fields
Field Data type PK FK Not Null Default Collate Check On Conflict
idShow integer            
idSource integer            
New bool       0      
Mark bool     0      
TVShowPath text            
TVDB text              
Lock bool     0      
EpisodeGuide text              
Plot text              
Premiered text              
MPAA text              
Rating text              
NfoPath text              
Language text              
Ordering integer     0      
Status text              
ThemePath text              
EFanartsPath text              
Runtime text              
Title text              
Votes text              
EpisodeSorting integer     0      
SortTitle text              
strIMDB text              
strTMDB text              
strOriginalTitle text              
iUserRating integer     0      
Certification text              
userNote text              
Tagline text              

Indexes
Index Fields Primary Unique
UniqueTVShowPath TVShowPath  

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

Checks
      There are no checks for table "tvshow"

Triggers
Trigger Enabled Events Type When expression
delete_tvshow DELETE After  

References
      There are no references for table "tvshow"

Definition:
CREATE TABLE tvshow (
  idShow            integer PRIMARY KEY AUTOINCREMENT,
  idSource          integer NOT NULL,
  "New"             bool DEFAULT 0,
  Mark              bool NOT NULL DEFAULT 0,
  TVShowPath        text NOT NULL,
  TVDB              text,
  Lock              bool NOT NULL DEFAULT 0,
  EpisodeGuide      text,
  Plot              text,
  Premiered         text,
  MPAA              text,
  Rating            text,
  NfoPath           text,
  Language          text,
  Ordering          integer NOT NULL DEFAULT 0,
  Status            text,
  ThemePath         text,
  EFanartsPath      text,
  Runtime           text,
  Title             text,
  Votes             text,
  EpisodeSorting    integer NOT NULL DEFAULT 0,
  SortTitle         text,
  strIMDB           text,
  strTMDB           text,
  strOriginalTitle  text,
  iUserRating       integer NOT NULL DEFAULT 0,
  Certification     text,
  userNote          text,
  Tagline           text
);

CREATE UNIQUE INDEX UniqueTVShowPath
  ON tvshow
  (TVShowPath);

CREATE TRIGGER delete_tvshow
  AFTER DELETE
  ON tvshow
BEGIN
        DELETE FROM actorlinktvshow WHERE idShow=old.idShow;
        DELETE FROM art WHERE media_id=old.idShow AND media_type='tvshow';
        DELETE FROM creatorlinktvshow WHERE idShow=old.idShow;
        DELETE FROM countrylinktvshow WHERE idShow=old.idShow;
        DELETE FROM directorlinktvshow WHERE idShow=old.idShow;
        DELETE FROM episode WHERE idShow=old.idShow;
        DELETE FROM genrelinktvshow WHERE idShow=old.idShow;
        DELETE FROM movielinktvshow WHERE idShow=old.idShow;
        DELETE FROM rating WHERE media_id=old.idShow AND media_type='tvshow';
        DELETE FROM seasons WHERE idShow=old.idShow;
        DELETE FROM studiolinktvshow WHERE idShow=old.idShow;
        DELETE FROM taglinks WHERE idMedia=old.idShow AND media_type='tvshow';
        DELETE FROM uniqueid WHERE media_id=old.idShow AND media_type='tvshow';
        END;


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