SQLite format 3@ -ââûöñìçâB//‚3tableMetadataNameValueMetadataNameValueCREATE TABLE MetadataNameValue( id INTEGER, name TEXT NOT NULL, value TEXT NOT NULL, PRIMARY KEY(id, name), FOREIGN KEY (id) REFERENCES iMedia(id))AU/indexsqlite_autoindex_MetadataNameValue_1MetadataNameValue}tableMetadataMetadataCREATE TABLE Metadata( id INTEGER, type INTEGER NOT NULL, PRIMARY KEY(id, type), FOREIGN KEY (id) REFERENCES iMedia(id))/Cindexsqlite_autoindex_Metadata_1MetadataL‚stableiMediaiMediaCREATE TABLE iMedia( id INTEGER PRIMARY KEY, url TEXT UNIQUE NOT NULL, type INTEGER NOT NULL, location INTEGER NOT NULL, importance INTEGER NOT NULL, save_until INTERGER NOT NULL)+?indexsqlite           33/Çø½üBL‚stableiMediaiMediaCREATE TABLE iMedia( id INTEGER PRIMARY KEY, url TEXT UNIQUE NOT NULL, type INTEGER NOT NULL, location INTEGER NOT NULL, importance INTEGER NOT NULL, save_until INTERGER NOT NULL)+?indexsqlite_autoindex_iMedia_1iMedia}tableMetadataMetadataCREATE TABLE Metadata( id INTEGER, type INTEGER NOT NULL, PRIMARY KEY(id, type), FOREIGN KEY (id) REFERENCES iMedia(id))/Cindexsqlite_autoindex_Metadata_1MetadataB//‚3tableMetadataNameValueMetadataNameValueCREATE TABLE MetadataNameValue( id INTEGER, name TEXT NOT NULL, value TEXT NOT NULL, PRIMARY KEY(id, name), FOREIGN KEY (id) REFERENCES iMedia(id))AU/indexsqlite_autoindex_MetadataNameValue_1MetadataNameValue ¦¦¢†W##ŒutableMetadataEPGMetadataEPGCREATE TABLE MetadataEPG( id INTEGER, ptTitle TEXT NOT NULL, description TEXT NOT NULL, eiTitle TEXT NOT NULL, eiSeason TEXT NOT NULL, eiNumber TEXT NOT NULL, seriesId INTEGER NOT NULL, programId TEXT NOT NULL, programType TEXT NOT NULL, prCode TEXT NOT NULL, channelId INTEGER NOT NULL, channelNum TEXT NOT NULL, startTime INTEGER NOT NULL, endTime INTEGER NOT NULL, duration INTEGER NOT NULL, tvRating TEXT NOT NULL, tvSubRating INTEGER NOT NULL, isNew BOOLEAN NOT NULL, isStereo BOOLEAN NOT NULL, isDolby BOOLEAN NOT NULL, isSubtitled BOOLEAN NOT NULL, isCc BOOLEAN NOT NULL, isRepeat BOOLEAN NOT NULL, isHDtv BOOLEAN NOT NULL, channelMajor INTEGER NOT NULL, channelMinor INTEGER NOT NULL, stationName TEXT NOT NULL, callsign TEXT NOT NULL, orgAirDate INTEGER, PRIMARY KEY(id), FOREIGN KEY (id) REFERENCES iMedia(id))  ÿÿ§ûƒ%%%† tablePvrMediaInfoPvrMediaInfo CREATE TABLE PvrMediaInfo( id INTEGER, assetName TEXT NOT NULL, bitRate INTEGER NOT NULL, startTime INTEGER NOT NULL, endTime INTEGER NOT NULL, assetDuration INTEGER NOT NULL, isRecording INTEGER NOT NULL, assetMode INTEGER NOT NULL, serverIp TEXT, serverPort INTEGER, fileSize INTEGER NOT NULL,predictFileSize INTEGER NOT NULL,PRIMARY KEY(id), FOREIGN KEY (id) REFERENCES iMedia(id))‚V „{tableMediaInfoMediaInfo CREATE TABLE MediaInfo( id INTEGER PRIMARY KEY, containerType INTEGER NOT NULL, adaptiveStreamingType INTEGER NOT NULL, size INTEGER NOT NULL, modifiedDate INTEGER NOT NULL, mimeType TEXT NOT NULL, duration INTEGER NOT NULL, bitRate INTEGER NOT NULL, title TEXT NOT NULL, FOREIGN KEY (id) REFERENCES iMedia(id))   ¶¶²„G ++ˆEtableMediaStreamInfoMediaStreamInfoCREATE TABLE MediaStreamInfo( id INTEGER, programId INTEGER NOT NULL, indexId INTEGER NOT NULL, streamId INTEGER NOT NULL, type INTEGER NOT NULL, streamType INTEGER NOT NULL, audioType INTEGER NOT NULL, videoType INTEGER NOT NULL, bitRate INTEGER NOT NULL, width INTEGER NOT NULL, height INTEGER NOT NULL, aspectRatioNum INTEGER NOT NULL, aspectRatioDen INTEGER NOT NULL, frameRatioNum INTEGER NOT NULL, frameRatioDen INTEGER NOT NULL, sampleRate INTEGER NOT NULL, noOfAudioChannel INTEGER NOT NULL, FOREIGN KEY (id) REFERENCES iMedia (id))  êê=»@ „P ˆstablePlaylistPlaylistCREATE TABLE Playlist( id INTEGER NOT„P ˆstablePlaylistPlaylistCREATE TABLE Playlist( id INTEGER NOT NULL, request_id INTEGER NOT NULL, sub_request_id INTEGER NOT NULL, playlist_id INTEGER NOT NULL, rec_start_time INTEGER NOT NULL,start_time INTEGER NOT NULL,end_time INTEGER NOT NULL,rec_end_time INTEGER NOT NULL,channel_id INTEGER NOT NULL,request_type INTEGER NOT NULL, save_until INTERGER NOT NULL, playback_stop_time INTEGER NOT NULL, pre_sup_time INTEGER NOT NULL, post_sup_time INTEGER NOT NULL, location INTEGER NOT NULL, ip TEXT NOT NULL, remote_playlist_id INTEGER NOT NULL, FOREIGN KEY (id) REFERENCES iMedia (id))@ 11‚+tableSpaceManagementGrpSpaceManagementGrpCREATE TABLE SpaceManagementGrp ( id INTEGER UNSIGNED NOT NULL, sub_id TEXT NOT NULL, episode_kept INTEGER DEFAULT -1, PRIMARY KEY(id, sub_id))   ››àØ‚2/„%triggerMediaClearTriggeriMediaCREATE TRIGGER MediaClearTrigger BEFORE DELETE ON iMedia BEGIN DELETE FROM Metadata WHERE id=old.id; DELETE FROM MediaInfo WHERE id=old.id; DELETE FROM MediC W1indexsqlite_autoindex_SpaceManagementGrp_1SpaceManagementGrp‚2/„%triggerMediaClearTriggeriMediaCREATE TRIGGER MediaClearTrigger BEFORE DELETE ON iMedia BEGIN DELETE FROM Metadata WHERE id=old.id; DELETE FROM MediaInfo WHERE id=old.id; DELETE FROM MediaStreamInfo WHERE id=old.id; DELETE FROM PvrMediaInfo WHERE id=old.id; DELETE FROM Playlist WHERE id=old.id; ENDh5ƒtriggerMetadataClearTriggerMetadataCREATE TRIGGER MetadataClearTrigger BEFORE DELETE ON Metadata BEGIN DELETE FROM MetadataNameValue WHERE id=old.id AND old.type=1; DELETE FROM MetadataEPG WHERE id=old.id AND old.type=2; END Á(2wÁ3=#‚triggerMetadataEPGInsertTriggerMetadataEPGCREATE TRIGGER MetadataEPGInsertTrigger BEFORE INSERT ON MetadataEPG BEGIN INSERT OR REPLACE INTO Metadata VALUES(new.id, 2); END.;#‚triggerMetadataEPGClearTriggerMetadataEPGCREATE TRIGGER MetadataEPGClearTrigger AFTER DELETE ON MetadataEPG BEGIN DELETE FROM Metadata WHERE id=old.id AND type=2; END‚G/ƒ!triggerMetadataNameValueClearTriggerMetadataNameValueCREATE TRIGGER MetadataNameValueClearTrigger AFTER DELETE ON MetadataNameValue WHEN (SELECT COUNT(*) FROM MetadataNameValue WHERE id=old.id)<=0 BEGIN DELETE FROM Metadata WHERE id=old.id AND type=1; ENDKI/‚'triggerMetadataNameValueInsertTriggerMetadataNameValueCREATE TRIGGER MetadataNameValueInsertTrigger BEFORE INSERT ON MetadataNameValue BEGIN INSERT OR REPLACE INTO Metadata VALUES(new.id, 1); END