Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------- SQLite3 Dump File -------------
- "C:\Users\Anonymous\AppData\Local\Packages\Microsoft.Windows.Photos_8wekyb3d8bbwe\LocalState\MediaDb.v1.sqlite"
- -- ------------------------------------------
- -- Dump of "Album"
- -- ------------------------------------------
- CREATE TABLE "Album"(
- "Album_Id" Integer PRIMARY KEY,
- "Album_Name" Text COLLATE NoCaseLinguistic,
- "Album_Type" Integer NOT NULL,
- "Album_State" Integer NOT NULL,
- "Album_QueryType" Integer NOT NULL,
- "Album_QueryBoundsType" Integer NOT NULL,
- "Album_Query" Text,
- "Album_DateCreated" Integer NOT NULL,
- "Album_DateUpdated" Integer,
- "Album_DateUserModified" Integer,
- "Album_DateViewed" Integer,
- "Album_DateShared" Integer,
- "Album_Count" Integer NOT NULL,
- "Album_CoverItemId" Integer,
- "Album_CoverBoundsLeft" Real,
- "Album_CoverBoundsTop" Real,
- "Album_CoverBoundsRight" Real,
- "Album_CoverBoundsBottom" Real,
- "Album_Visibility" Integer NOT NULL,
- "Album_EventStartDate" Integer,
- "Album_EventEndDate" Integer,
- "Album_SummaryStartDate" Integer,
- "Album_SummaryEndDate" Integer,
- "Album_Source" Integer,
- "Album_SourceId" Integer,
- "Album_PublishState" Integer,
- "Album_PendingTelemetryUploadState" Integer DEFAULT 0,
- "Album_SentTelemetryUploadState" Integer DEFAULT 0,
- "Album_ETag" Text,
- "Album_CreationType" Integer DEFAULT 0,
- "Album_Order" Integer DEFAULT 0,
- CONSTRAINT "Album_Item_SET NULL_NO ACTION_Album_CoverItemId__0" FOREIGN KEY ( "Album_CoverItemId" ) REFERENCES "Item"
- ON DELETE Set NULL
- ,
- CONSTRAINT "Album_Source_CASCADE_NO ACTION_Album_SourceId__0" FOREIGN KEY ( "Album_SourceId" ) REFERENCES "Source"
- ON DELETE Cascade
- );
- CREATE INDEX "Album_CoverItemId" ON "Album"( "Album_CoverItemId" );
- CREATE INDEX "Album_SourceId" ON "Album"( "Album_SourceId" );
- CREATE INDEX "Album_State" ON "Album"( "Album_State" );
- CREATE TRIGGER "AlbumAfterInsert_InsertFts"
- AFTER INSERT
- ON "Album"
- FOR EACH ROW
- BEGIN INSERT INTO AlbumNameFts (docid, Album_Name) VALUES (new.Album_Id, new.Album_Name);END;
- CREATE TRIGGER "AlbumAfterUpdate_InsertFts"
- AFTER UPDATE OF "Album_Name"
- ON "Album"
- FOR EACH ROW
- BEGIN INSERT INTO AlbumNameFts(docid, Album_Name) VALUES(new.Album_Id, new.Album_Name);END;
- CREATE TRIGGER "AlbumBeforeDelete_DeleteFts"
- BEFORE DELETE
- ON "Album"
- FOR EACH ROW
- BEGIN DELETE FROM AlbumNameFts WHERE docid = old.Album_Id;END;
- CREATE TRIGGER "AlbumBeforeUpdate_DeleteFts"
- BEFORE UPDATE OF "Album_Name"
- ON "Album"
- FOR EACH ROW
- BEGIN DELETE FROM AlbumNameFts WHERE docid=old.Album_Id;END;
- -- ------------------------------------------
- -- Dump of "AlbumItemLink"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'AlbumItemLink'
- CREATE UNIQUE INDEX "AlbumItemLink_AlbumIdItemId" ON "AlbumItemLink"( "AlbumItemLink_AlbumId", "AlbumItemLink_ItemId" );
- CREATE INDEX "AlbumItemLink_ItemIdAlbumId" ON "AlbumItemLink"( "AlbumItemLink_ItemId", "AlbumItemLink_AlbumId" );
- -- ------------------------------------------
- -- Dump of "AlbumNameFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'AlbumNameFts'
- -- ------------------------------------------
- -- Dump of "AlbumNameFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "AlbumNameFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "AlbumNameFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "AlbumNameFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "AlbumNameFts_segments"
- -- ------------------------------------------
- CREATE TABLE "AlbumNameFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "AlbumNameFts_stat"
- -- ------------------------------------------
- CREATE TABLE "AlbumNameFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "AppGlobalState"
- -- ------------------------------------------
- CREATE TABLE "AppGlobalState"(
- "AppGlobalState_AnalysisVersion" Text,
- "AppGlobalState_DateLastLocalReconciled" Integer,
- "AppGlobalState_CountLastReconciliationQueryResults" Integer,
- "AppGlobalState_DateLastAlbumsMaintenance" Integer,
- "AppGlobalState_DateLastItemDeleted" Integer,
- "AppGlobalState_DateLastCacheCleaned" Integer,
- "AppGlobalState_OneDriveDeltaSyncToken" Text,
- "AppGlobalState_OneDriveFullSyncCompleted" Integer,
- "AppGlobalState_OneDriveAlbumDeltaSyncToken" Text,
- "AppGlobalState_OneDriveKnownFoldersNeedUpgrade" Integer,
- "AppGlobalState_OneDriveItemsResyncing" Integer DEFAULT 0,
- "AppGlobalState_OneDriveAlbumsResyncing" Integer DEFAULT 0,
- "AppGlobalState_TruncateWALFilePending" Integer,
- "AppGlobalState_RichMediaGrovelVersion" Integer DEFAULT 0,
- "AppGlobalState_CurrentAutoEnhanceEnabledState" Integer,
- "AppGlobalState_RunDedupWork" Integer NOT NULL DEFAULT 0,
- "AppGlobalState_OneDriveIdentifyPicturesScope" Integer,
- "AppGlobalState_DeferredUpgradeVersion" Integer,
- "AppGlobalState_CachedLocalCollectionSize" Integer DEFAULT 0,
- "AppGlobalState_NewAlbumsBadgeCount" Integer DEFAULT 0,
- "AppGlobalState_ImportBadgeDisplayState" Integer DEFAULT 0,
- "AppGlobalState_DateLastTagAlbumsMaintenance" Integer,
- "AppGlobalState_DateLastLocationLookupReady" Integer DEFAULT 0,
- "AppGlobalState_DateLastPetAlbumsMaintenance" Integer,
- "AppGlobalState_DateLastCountryTripAlbumsMaintenance" Integer,
- "AppGlobalState_DateLastWeddingAlbumsMaintenance" Integer,
- "AppGlobalState_DateLastSmileAlbumsMaintenance" Integer,
- "AppGlobalState_DateLastDbAnalyze" Integer,
- "AppGlobalState_DateLastDbVacuum" Integer,
- "AppGlobalState_DateLastSeasonalAlbumsMaintenance" Integer,
- "AppGlobalState_XboxLiveItemsResyncing" Integer DEFAULT 0,
- CONSTRAINT "SingleRow" CHECK (rowid = 1) );
- -- ------------------------------------------
- -- Dump of "AppTelemetryState"
- -- ------------------------------------------
- CREATE TABLE "AppTelemetryState"(
- "AppTelemetryState_EventName" Text,
- "AppTelemetryState_EventFireTime" Integer );
- -- ------------------------------------------
- -- Dump of "ApplicationName"
- -- ------------------------------------------
- CREATE TABLE "ApplicationName"(
- "ApplicationName_Id" Integer PRIMARY KEY,
- "ApplicationName_Text" Text );
- CREATE INDEX "ApplicationName_Text" ON "ApplicationName"( "ApplicationName_Text" );
- -- ------------------------------------------
- -- Dump of "Audio"
- -- ------------------------------------------
- CREATE TABLE "Audio"(
- "Audio_Id" Integer PRIMARY KEY,
- "Audio_Url" Text NOT NULL COLLATE NoCaseUnicode,
- "Audio_SampleRate" Integer NOT NULL,
- "Audio_ChannelCount" Integer NOT NULL,
- "Audio_IntegratedLUFS" Real NOT NULL,
- "Audio_WindowInfos" BLOB NOT NULL,
- "Audio_DurationPerWindow" Integer NOT NULL );
- CREATE UNIQUE INDEX "Audio_Url" ON "Audio"( "Audio_Url" );
- -- ------------------------------------------
- -- Dump of "BackgroundTaskTelemetry"
- -- ------------------------------------------
- CREATE TABLE "BackgroundTaskTelemetry"(
- "BackgroundTaskTelemetry_Id" Integer NOT NULL,
- "BackgroundTaskTelemetry_State" Integer NOT NULL,
- "BackgroundTaskTelemetry_Reason" Integer NOT NULL,
- "BackgroundTaskTelemetry_Count" Integer NOT NULL,
- "BackgroundTaskTelemetry_TotalTime" Integer DEFAULT 0,
- "BackgroundTaskTelemetry_MinTime" Integer DEFAULT 0,
- "BackgroundTaskTelemetry_MaxTime" Integer DEFAULT 0,
- "BackgroundTaskTelemetry_CorrelationGuid" Text NOT NULL );
- -- ------------------------------------------
- -- Dump of "Cache"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'Cache'
- -- ------------------------------------------
- -- Dump of "CameraManufacturer"
- -- ------------------------------------------
- CREATE TABLE "CameraManufacturer"(
- "CameraManufacturer_Id" Integer PRIMARY KEY,
- "CameraManufacturer_Text" Text );
- CREATE INDEX "CameraManufacturer_Text" ON "CameraManufacturer"( "CameraManufacturer_Text" );
- -- ------------------------------------------
- -- Dump of "CameraModel"
- -- ------------------------------------------
- CREATE TABLE "CameraModel"(
- "CameraModel_Id" Integer PRIMARY KEY,
- "CameraModel_Text" Text );
- CREATE INDEX "CameraModel_Text" ON "CameraModel"( "CameraModel_Text" );
- -- ------------------------------------------
- -- Dump of "CloudAlbum"
- -- ------------------------------------------
- CREATE TABLE "CloudAlbum"(
- "CloudAlbum_Id" Integer PRIMARY KEY );
- CREATE INDEX "CloudAlbum_CloudId" ON "CloudAlbum"( "CloudAlbum_CloudId" );
- -- ------------------------------------------
- -- Dump of "ConceptTagSuppressedTagList"
- -- ------------------------------------------
- CREATE TABLE "ConceptTagSuppressedTagList"(
- "ConceptTagSuppressedTagList_TagResourceId" Integer );
- -- ------------------------------------------
- -- Dump of "DecisionServiceAction"
- -- ------------------------------------------
- CREATE TABLE "DecisionServiceAction"(
- "DecisionServiceAction_Name" Text NOT NULL,
- "DecisionServiceAction_Json" Text NOT NULL );
- CREATE UNIQUE INDEX "DecisionServiceAction_Name" ON "DecisionServiceAction"( "DecisionServiceAction_Name" );
- -- ------------------------------------------
- -- Dump of "Event"
- -- ------------------------------------------
- CREATE TABLE "Event"(
- "Event_Id" Integer PRIMARY KEY,
- "Event_StartDate" Integer,
- "Event_EndDate" Integer,
- "Event_Size" Integer );
- CREATE UNIQUE INDEX "Event_StartDate" ON "Event"( "Event_StartDate" );
- -- ------------------------------------------
- -- Dump of "ExcludedAlbum"
- -- ------------------------------------------
- CREATE TABLE "ExcludedAlbum"(
- "ExcludedAlbum_Id" Integer PRIMARY KEY,
- "ExcludedAlbum_AlbumId" Integer NOT NULL,
- "ExcludedAlbum_ExcludedForUse" Integer NOT NULL,
- "ExcludedAlbum_ExcludedDate" Integer NOT NULL,
- CONSTRAINT "ExcludedAlbum_Album_CASCADE_NO ACTION_ExcludedAlbum_AlbumId_Album_Id_0" FOREIGN KEY ( "ExcludedAlbum_AlbumId" ) REFERENCES "Album"( "Album_Id" )
- ON DELETE Cascade
- );
- CREATE INDEX "ExcludedAlbum_AlbumId" ON "ExcludedAlbum"( "ExcludedAlbum_AlbumId" );
- CREATE INDEX "ExcludedAlbum_ExcludedForUse" ON "ExcludedAlbum"( "ExcludedAlbum_ExcludedForUse" );
- -- ------------------------------------------
- -- Dump of "ExcludedFace"
- -- ------------------------------------------
- CREATE TABLE "ExcludedFace"(
- "ExcludedFace_Id" Integer PRIMARY KEY );
- CREATE INDEX "ExcludedFace_FaceClusterId" ON "ExcludedFace"( "ExcludedFace_FaceClusterId" );
- CREATE INDEX "ExcludedFace_FaceId" ON "ExcludedFace"( "ExcludedFace_FaceId" );
- -- ------------------------------------------
- -- Dump of "ExcludedImport"
- -- ------------------------------------------
- CREATE TABLE "ExcludedImport"(
- "ExcludedImport_Id" Integer PRIMARY KEY,
- "ExcludedImport_ImportId" Integer NOT NULL,
- "ExcludedImport_ExcludedForUse" Integer NOT NULL,
- "ExcludedImport_ExcludedDate" Integer NOT NULL );
- CREATE INDEX "ExcludedImport_ExcludedForUse" ON "ExcludedImport"( "ExcludedImport_ExcludedForUse" );
- -- ------------------------------------------
- -- Dump of "ExcludedItemTag"
- -- ------------------------------------------
- CREATE TABLE "ExcludedItemTag"(
- "ExcludedItemTag_Id" Integer PRIMARY KEY );
- CREATE INDEX "ExcludedItemTag_ItemId" ON "ExcludedItemTag"( "ExcludedItemTag_ItemId" );
- CREATE INDEX "ExcludedItemTag_TagId" ON "ExcludedItemTag"( "ExcludedItemTag_TagId" );
- -- ------------------------------------------
- -- Dump of "ExcludedTag"
- -- ------------------------------------------
- CREATE TABLE "ExcludedTag"(
- "ExcludedTag_Id" Integer PRIMARY KEY,
- "ExcludedTag_TagId" Integer NOT NULL,
- "ExcludedTag_ExcludedForUse" Integer NOT NULL,
- "ExcludedTag_ExcludedDate" Integer NOT NULL,
- CONSTRAINT "ExcludedTag_Tag_CASCADE_NO ACTION_ExcludedTag_TagId_Tag_Id_0" FOREIGN KEY ( "ExcludedTag_TagId" ) REFERENCES "Tag"( "Tag_Id" )
- ON DELETE Cascade
- );
- CREATE INDEX "ExcludedTag_ExcludedForUse" ON "ExcludedTag"( "ExcludedTag_ExcludedForUse" );
- CREATE INDEX "ExcludedTag_TagId" ON "ExcludedTag"( "ExcludedTag_TagId" );
- -- ------------------------------------------
- -- Dump of "ExtractedText"
- -- ------------------------------------------
- CREATE TABLE "ExtractedText"(
- "ExtractedText_Id" Integer PRIMARY KEY );
- -- ------------------------------------------
- -- Dump of "Face"
- -- ------------------------------------------
- CREATE TABLE "Face"(
- "Face_Id" Integer PRIMARY KEY );
- CREATE INDEX "Face_ExemplarScore" ON "Face"( "Face_ExemplarScore" );
- CREATE INDEX "Face_ItemId" ON "Face"( "Face_ItemId" );
- CREATE INDEX "Face_PersonId" ON "Face"( "Face_PersonId" );
- CREATE INDEX "Face_QualityScore" ON "Face"( "Face_QualityScore" );
- CREATE INDEX "Face_RecoGroupId" ON "Face"( "Face_RecoGroupId" );
- CREATE TRIGGER "addFaceUpdatePerson"
- AFTER INSERT
- ON "Face"
- FOR EACH ROW
- BEGIN UPDATE Person SET Person_ItemCount = Person_ItemCount + 1 WHERE Person_Id = New.Face_PersonId; END;
- CREATE TRIGGER "removeFaceUpdatePerson"
- AFTER DELETE
- ON "Face"
- FOR EACH ROW
- BEGIN UPDATE Person SET Person_ItemCount = Person_ItemCount - 1 WHERE Person_Id = Old.Face_PersonId; END;
- CREATE TRIGGER "updateFaceUpdatePerson"
- BEFORE UPDATE OF "Face_PersonId"
- ON "Face"
- FOR EACH ROW
- BEGIN UPDATE Person SET Person_ItemCount = Person_ItemCount + 1 WHERE Person_Id = New.Face_PersonId; UPDATE Person SET Person_ItemCount = Person_ItemCount - 1 WHERE Person_Id = Old.Face_PersonId; END;
- -- ------------------------------------------
- -- Dump of "FaceCluster"
- -- ------------------------------------------
- CREATE TABLE "FaceCluster"(
- "FaceCluster_Id" Integer PRIMARY KEY,
- "FaceCluster_PersonId" Integer,
- "FaceCluster_BestFaceId" Integer,
- CONSTRAINT "FaceCluster_Person_SET NULL_NO ACTION_FaceCluster_PersonId__0" FOREIGN KEY ( "FaceCluster_PersonId" ) REFERENCES "Person"
- ON DELETE Set NULL
- ,
- CONSTRAINT "FaceCluster_Face_SET NULL_NO ACTION_FaceCluster_BestFaceId__0" FOREIGN KEY ( "FaceCluster_BestFaceId" ) REFERENCES "Face"
- ON DELETE Set NULL
- );
- CREATE INDEX "FaceCluster_BestFaceId" ON "FaceCluster"( "FaceCluster_BestFaceId" );
- CREATE INDEX "FaceCluster_PersonId" ON "FaceCluster"( "FaceCluster_PersonId" );
- -- ------------------------------------------
- -- Dump of "FaceFeature"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'FaceFeature'
- -- ------------------------------------------
- -- Dump of "FileExtensionFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'FileExtensionFts'
- -- ------------------------------------------
- -- Dump of "FileExtensionFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "FileExtensionFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "FileExtensionFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "FileExtensionFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "FileExtensionFts_segments"
- -- ------------------------------------------
- CREATE TABLE "FileExtensionFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "FileExtensionFts_stat"
- -- ------------------------------------------
- CREATE TABLE "FileExtensionFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "FilenameFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'FilenameFts'
- -- ------------------------------------------
- -- Dump of "FilenameFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "FilenameFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "FilenameFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "FilenameFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "FilenameFts_segments"
- -- ------------------------------------------
- CREATE TABLE "FilenameFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "FilenameFts_stat"
- -- ------------------------------------------
- CREATE TABLE "FilenameFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "Folder"
- -- ------------------------------------------
- CREATE TABLE "Folder"(
- "Folder_Id" Integer PRIMARY KEY,
- "Folder_ParentFolderId" Integer,
- "Folder_LibraryRelationship" Integer,
- "Folder_Source" Integer,
- "Folder_SourceId" Integer,
- "Folder_Path" Text COLLATE NoCaseUnicode,
- "Folder_DisplayName" Text COLLATE NoCaseLinguistic,
- "Folder_DateCreated" Integer,
- "Folder_DateModified" Integer,
- "Folder_KnownFolderType" Integer,
- "Folder_SyncWith" Integer,
- "Folder_StorageProviderFileId" Text,
- "Folder_InOneDrivePicturesScope" Integer,
- "Folder_ItemCount" Integer,
- CONSTRAINT "Folder_Folder_CASCADE_NO ACTION_Folder_ParentFolderId__0" FOREIGN KEY ( "Folder_ParentFolderId" ) REFERENCES "Folder"
- ON DELETE Cascade
- ,
- CONSTRAINT "Folder_Source_CASCADE_NO ACTION_Folder_SourceId__0" FOREIGN KEY ( "Folder_SourceId" ) REFERENCES "Source"
- ON DELETE Cascade
- );
- CREATE INDEX "Folder_KnownFolderType" ON "Folder"( "Folder_KnownFolderType" );
- CREATE INDEX "Folder_ParentFolderId" ON "Folder"( "Folder_ParentFolderId" );
- CREATE UNIQUE INDEX "Folder_Path" ON "Folder"( "Folder_Path" );
- CREATE INDEX "Folder_Source" ON "Folder"( "Folder_Source" );
- CREATE INDEX "Folder_SourceId" ON "Folder"( "Folder_SourceId" );
- CREATE INDEX "Folder_StorageProviderFileId" ON "Folder"( "Folder_StorageProviderFileId" );
- CREATE INDEX "Folder_SyncWith" ON "Folder"( "Folder_SyncWith" );
- CREATE TRIGGER "FolderAfterInsert_InsertFts"
- AFTER INSERT
- ON "Folder"
- FOR EACH ROW
- BEGIN INSERT INTO FolderNameFts (docid, Folder_DisplayName) VALUES (new.Folder_Id, new.Folder_DisplayName);END;
- CREATE TRIGGER "FolderAfterUpdate_InsertFts"
- AFTER UPDATE OF "Folder_DisplayName"
- ON "Folder"
- FOR EACH ROW
- WHEN old.Folder_DisplayName IS NOT new.Folder_DisplayName
- BEGIN INSERT INTO FolderNameFts(docid, Folder_DisplayName) VALUES(new.Folder_Id, new.Folder_DisplayName);END;
- CREATE TRIGGER "FolderBeforeDelete_DeleteFts"
- BEFORE DELETE
- ON "Folder"
- FOR EACH ROW
- BEGIN DELETE FROM FolderNameFts WHERE docid = old.Folder_Id;END;
- CREATE TRIGGER "FolderBeforeUpdate_DeleteFts"
- BEFORE UPDATE OF "Folder_DisplayName"
- ON "Folder"
- FOR EACH ROW
- WHEN old.Folder_DisplayName IS NOT new.Folder_DisplayName
- BEGIN DELETE FROM FolderNameFts WHERE docid=old.Folder_Id;END;
- CREATE TRIGGER "localSyncedFolderDeleted"
- AFTER DELETE
- ON "Folder"
- FOR EACH ROW
- WHEN Old.Folder_SyncWith IS NULL AND Old.Folder_Source = 1
- BEGIN UPDATE Folder SET Folder_SyncWith=NULL WHERE Folder_SyncWith=Old.Folder_Id;END;
- -- ------------------------------------------
- -- Dump of "FolderNameFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'FolderNameFts'
- -- ------------------------------------------
- -- Dump of "FolderNameFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "FolderNameFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "FolderNameFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "FolderNameFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "FolderNameFts_segments"
- -- ------------------------------------------
- CREATE TABLE "FolderNameFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "FolderNameFts_stat"
- -- ------------------------------------------
- CREATE TABLE "FolderNameFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "ImageAnalysis"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'ImageAnalysis'
- -- ------------------------------------------
- -- Dump of "Item"
- -- ------------------------------------------
- CREATE TABLE "Item"(
- "Item_Id" Integer PRIMARY KEY,
- "Item_LibraryRelationship" Integer,
- "Item_Source" Integer,
- "Item_SourceId" Integer,
- "Item_MediaType" Integer,
- "Item_DateTaken" Integer,
- "Item_Width" Integer,
- "Item_Height" Integer,
- "Item_EditState" Integer,
- "Item_DateCreated" Integer,
- "Item_DateModified" Integer,
- "Item_ExclusiveDateTaken" Integer,
- "Item_SystemThumbnailCacheId" Integer,
- CONSTRAINT "Item_Source_CASCADE_NO ACTION_Item_SourceId__0" FOREIGN KEY ( "Item_SourceId" ) REFERENCES "Source"
- ON DELETE Cascade
- );
- CREATE INDEX "Item_BurstClusterNumber" ON "Item"( "Item_BurstClusterNumber" );
- CREATE INDEX "Item_DateCreated" ON "Item"( "Item_DateCreated" );
- CREATE INDEX "Item_DateDupFinding" ON "Item"( "Item_DateDupFinding" );
- CREATE INDEX "Item_DateIngested" ON "Item"( "Item_DateIngested" );
- CREATE INDEX "Item_DateTaken" ON "Item"( "Item_DateTaken" );
- CREATE INDEX "Item_EditState" ON "Item"( "Item_EditState" );
- CREATE INDEX "Item_EventId" ON "Item"( "Item_EventId" );
- CREATE INDEX "Item_FileExtension" ON "Item"( "Item_FileExtension" );
- CREATE INDEX "Item_LibraryRelationship" ON "Item"( "Item_LibraryRelationship" );
- CREATE INDEX "Item_LocationId" ON "Item"( "Item_LocationId" );
- CREATE INDEX "Item_MediaType" ON "Item"( "Item_MediaType" );
- CREATE INDEX "Item_MetadataHash" ON "Item"( "Item_MetadataHash" );
- CREATE INDEX "Item_ParentFolderIdFileName" ON "Item"( "Item_ParentFolderId", "Item_FileName" );
- CREATE INDEX "Item_RichMediaSlowGrovelPending" ON "Item"( "Item_RichMediaSlowGrovelPending" );
- CREATE INDEX "Item_SameAs" ON "Item"( "Item_SameAs" );
- CREATE INDEX "Item_Source" ON "Item"( "Item_Source" );
- CREATE INDEX "Item_SourceId" ON "Item"( "Item_SourceId" );
- CREATE INDEX "Item_StorageProviderFileId" ON "Item"( "Item_StorageProviderFileId" );
- CREATE INDEX "Item_SyncWith" ON "Item"( "Item_SyncWith" );
- CREATE INDEX "Item_UserSelectedDupId" ON "Item"( "Item_UserSelectedDupId" );
- CREATE TRIGGER "InsertItemDateTaken_AfterInsertItem"
- AFTER INSERT
- ON "Item"
- FOR EACH ROW
- WHEN new.Item_DateTaken IS NOT NULL
- BEGIN INSERT OR REPLACE INTO ItemDateTaken (ItemDateTaken_ItemId,ItemDateTaken_Year, ItemDateTaken_Month, ItemDateTaken_Day, ItemDateTaken_DayOfWeek ) VALUES (new.Item_Id, strftime('%Y', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch'), strftime('%m', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch'), strftime('%d', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch'), strftime('%w', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch') ); END;
- CREATE TRIGGER "ItemAfterInsert_InsertFts"
- AFTER INSERT
- ON "Item"
- FOR EACH ROW
- BEGIN INSERT INTO FilenameFts (docid, Item_Filename) VALUES (new.Item_Id, new.Item_Filename);INSERT INTO FileExtensionFts (docid, Item_FileExtension) VALUES (new.Item_Id, new.Item_FileExtension);END;
- CREATE TRIGGER "ItemAfterUpdate_InsertFts"
- AFTER UPDATE OF "Item_Filename", "Item_FileExtension"
- ON "Item"
- FOR EACH ROW
- WHEN old.Item_Filename IS NOT new.Item_Filename OR old.Item_FileExtension IS NOT new.Item_FileExtension
- BEGIN INSERT INTO FilenameFts(docid, Item_Filename) VALUES(new.Item_Id, new.Item_Filename);INSERT INTO FileExtensionFts(docid, Item_FileExtension) VALUES(new.Item_Id, new.Item_FileExtension);END;
- CREATE TRIGGER "ItemBeforeDelete_DeleteFts"
- BEFORE DELETE
- ON "Item"
- FOR EACH ROW
- BEGIN DELETE FROM FilenameFts WHERE docid = old.Item_Id;DELETE FROM FileExtensionFts WHERE docid = old.Item_Id;END;
- CREATE TRIGGER "ItemBeforeUpdate_DeleteFts"
- BEFORE UPDATE OF "Item_Filename", "Item_FileExtension"
- ON "Item"
- FOR EACH ROW
- WHEN old.Item_Filename IS NOT new.Item_Filename OR old.Item_FileExtension IS NOT new.Item_FileExtension
- BEGIN DELETE FROM FilenameFts WHERE docid=old.Item_Id;DELETE FROM FileExtensionFts WHERE docid=old.Item_Id;END;
- CREATE TRIGGER "UpdateItemDateTaken_AfterUpdateItem"
- AFTER UPDATE OF "Item_DateTaken"
- ON "Item"
- FOR EACH ROW
- WHEN old.Item_DateTaken IS NOT NULL AND new.Item_DateTaken IS NULL
- BEGIN DELETE FROM ItemDateTaken WHERE ItemDateTaken_ItemId == new.Item_Id;END;
- CREATE TRIGGER "UpdateItemDateTaken_AfterUpdateItem1"
- AFTER UPDATE OF "Item_DateTaken"
- ON "Item"
- FOR EACH ROW
- WHEN old.Item_DateTaken IS NULL AND new.Item_DateTaken IS NOT NULL
- BEGIN INSERT OR REPLACE INTO ItemDateTaken (ItemDateTaken_ItemId,ItemDateTaken_Year, ItemDateTaken_Month, ItemDateTaken_Day, ItemDateTaken_DayOfWeek ) VALUES (new.Item_Id, strftime('%Y', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch'), strftime('%m', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch'), strftime('%d', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch'), strftime('%w', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch') ); END;
- CREATE TRIGGER "UpdateItemDateTaken_AfterUpdateItem2"
- AFTER UPDATE OF "Item_DateTaken"
- ON "Item"
- FOR EACH ROW
- WHEN old.Item_DateTaken IS NOT NULL AND new.Item_DateTaken IS NOT NULL AND old.Item_DateTaken != new.Item_DateTaken
- BEGIN UPDATE ItemDateTaken SET ItemDateTaken_Year = strftime('%Y', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch'), ItemDateTaken_Month = strftime('%m', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch'), ItemDateTaken_Day = strftime('%d', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch'), ItemDateTaken_DayOfWeek = strftime('%w', (new.Item_DateTaken - 116444736000000000) / 10000000, 'unixepoch') WHERE ItemDateTaken_ItemId == new.Item_Id; END;
- CREATE TRIGGER "albumCoverUpdatePendingDelete"
- AFTER UPDATE OF "Item_Source"
- ON "Item"
- FOR EACH ROW
- WHEN New.Item_Source=4
- BEGIN UPDATE Album SET Album_CoverItemId=NULL WHERE Album_CoverItemId=Old.Item_Id;END;
- CREATE TRIGGER "dupGroupDisplayedItemDeletedV3"
- AFTER DELETE
- ON "Item"
- FOR EACH ROW
- WHEN Old.Item_UserSelectedDupId IS NULL AND Old.Item_SameAs IS NOT NULL
- BEGIN UPDATE Item SET Item_UserSelectedDupId=CASE WHEN Item_SameAs IS NULL THEN NULL ELSE Old.Item_SameAs END WHERE Item_UserSelectedDupId=Old.Item_Id;END;
- CREATE TRIGGER "dupGroupDisplayedPrimaryItemDeleted"
- AFTER DELETE
- ON "Item"
- FOR EACH ROW
- WHEN Old.Item_UserSelectedDupId IS NULL AND Old.Item_SameAs IS NULL
- BEGIN UPDATE Item SET Item_UserSelectedDupId=NULL WHERE Item_SameAs=Old.Item_Id OR Item_UserSelectedDupId=Old.Item_Id; END;
- CREATE TRIGGER "dupGroupNonPrimaryItemDeletedV3"
- AFTER DELETE
- ON "Item"
- FOR EACH ROW
- WHEN Old.Item_SameAs IS NOT NULL
- BEGIN UPDATE Item SET Item_SameAs=NULL, Item_DupState=NULL, Item_DateDupFinding=NULL WHERE Item_SameAs=Old.Item_SameAs OR Item_Id=Old.Item_SameAs;END;
- CREATE TRIGGER "dupGroupPrimaryItemDeletedV6"
- AFTER DELETE
- ON "Item"
- FOR EACH ROW
- WHEN Old.Item_SameAs IS NULL
- BEGIN UPDATE Item SET Item_SameAs=NULL, Item_DupState=NULL, Item_DateDupFinding=NULL WHERE Item_SameAs=Old.Item_Id;END;
- CREATE TRIGGER "localOneDriveItemDeleted"
- AFTER DELETE
- ON "Item"
- FOR EACH ROW
- WHEN Old.Item_SyncWith IS NULL
- BEGIN UPDATE Item SET Item_SyncWith=NULL WHERE Item_SyncWith=Old.Item_Id;END;
- CREATE TRIGGER "locationCoverUpdatePendingDelete"
- AFTER UPDATE OF "Item_Source"
- ON "Item"
- FOR EACH ROW
- WHEN New.Item_Source=4
- BEGIN UPDATE Location SET Location_CoverItemId=NULL WHERE Location_CoverItemId=Old.Item_Id;END;
- CREATE TRIGGER "primaryItemWithLocationDeleted"
- AFTER DELETE
- ON "Item"
- FOR EACH ROW
- WHEN Old.Item_LocationId IS NOT NULL AND Old.Item_SameAs IS NULL
- BEGIN UPDATE Location SET Location_ItemsCountExcDupes=MAX(Location_ItemsCountExcDupes-1, 0) WHERE Location_Id=Old.Item_LocationId;END;
- CREATE TRIGGER "updateLastItemDeleteTile"
- AFTER DELETE
- ON "Item"
- FOR EACH ROW
- BEGIN UPDATE AppGlobalState SET AppGlobalState_DateLastItemDeleted = ((julianday('now') - 2305813.5) * 864000000000.0);END;
- -- ------------------------------------------
- -- Dump of "ItemDateTaken"
- -- ------------------------------------------
- CREATE TABLE "ItemDateTaken"(
- "ItemDateTaken_ItemId" Integer PRIMARY KEY,
- "ItemDateTaken_Year" Integer,
- "ItemDateTaken_Month" Integer,
- "ItemDateTaken_Day" Integer,
- "ItemDateTaken_DayOfWeek" Integer );
- CREATE INDEX "ItemDateTaken_Day" ON "ItemDateTaken"( "ItemDateTaken_Day" );
- CREATE INDEX "ItemDateTaken_DayOfWeek" ON "ItemDateTaken"( "ItemDateTaken_DayOfWeek" );
- CREATE INDEX "ItemDateTaken_Month" ON "ItemDateTaken"( "ItemDateTaken_Month" );
- CREATE INDEX "ItemDateTaken_Year" ON "ItemDateTaken"( "ItemDateTaken_Year" );
- -- ------------------------------------------
- -- Dump of "ItemEdit"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'ItemEdit'
- CREATE INDEX "ItemEdit_ItemId" ON "ItemEdit"( "ItemEdit_ItemId" );
- -- ------------------------------------------
- -- Dump of "ItemEngineExemplar"
- -- ------------------------------------------
- CREATE TABLE "ItemEngineExemplar"(
- "ItemEngineExemplar_Id" Integer PRIMARY KEY );
- CREATE UNIQUE INDEX "ItemEngineExemplar_ItemId" ON "ItemEngineExemplar"( "ItemEngineExemplar_ItemId" );
- -- ------------------------------------------
- -- Dump of "ItemEngineStatus"
- -- ------------------------------------------
- CREATE TABLE "ItemEngineStatus"(
- "ItemEngineStatus_Id" Integer PRIMARY KEY );
- CREATE INDEX "ItemEngineStatus_AnalysisDone" ON "ItemEngineStatus"( "ItemEngineStatus_AnalysisDone" );
- CREATE UNIQUE INDEX "ItemEngineStatus_ItemId" ON "ItemEngineStatus"( "ItemEngineStatus_ItemId" );
- CREATE INDEX "ItemEngineStatus_LastRun" ON "ItemEngineStatus"( "ItemEngineStatus_LastRun" );
- -- ------------------------------------------
- -- Dump of "ItemInferredLocationExperimental"
- -- ------------------------------------------
- CREATE TABLE "ItemInferredLocationExperimental"(
- "ItemInferredLocationExperimental_ItemId" Integer PRIMARY KEY,
- "ItemInferredLocationExperimental_InferredLocationId" BLOB,
- CONSTRAINT "ItemInferredLocationExperimental_Location_SET NULL_NO ACTION_ItemInferredLocationExperimental_InferredLocationId__0" FOREIGN KEY ( "ItemInferredLocationExperimental_InferredLocationId" ) REFERENCES "Location"
- ON DELETE Set NULL
- );
- -- ------------------------------------------
- -- Dump of "ItemTags"
- -- ------------------------------------------
- CREATE TABLE "ItemTags"(
- "ItemTags_Id" Integer PRIMARY KEY );
- CREATE INDEX "ItemTags_ItemId" ON "ItemTags"( "ItemTags_ItemId" );
- CREATE UNIQUE INDEX "ItemTags_ItemId_TagId" ON "ItemTags"( "ItemTags_ItemId", "ItemTags_TagId" );
- CREATE INDEX "ItemTags_TagId" ON "ItemTags"( "ItemTags_TagId" );
- -- ------------------------------------------
- -- Dump of "ItemVideoQuality"
- -- ------------------------------------------
- CREATE TABLE "ItemVideoQuality"(
- "ItemVideoQuality_Id" Integer PRIMARY KEY );
- -- ------------------------------------------
- -- Dump of "ItemVideoTags"
- -- ------------------------------------------
- CREATE TABLE "ItemVideoTags"(
- "ItemVideoTags_Id" Integer PRIMARY KEY );
- -- ------------------------------------------
- -- Dump of "LiveTile"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'LiveTile'
- -- ------------------------------------------
- -- Dump of "Location"
- -- ------------------------------------------
- CREATE TABLE "Location"(
- "Location_Id" Integer PRIMARY KEY,
- "Location_Name" Text,
- "Location_LocationRegionId" Integer,
- "Location_LocationCountryId" Integer,
- "Location_ItemsCountExcDupes" Integer DEFAULT 0,
- "Location_CoverItemId" Integer,
- "Location_LocationDistrictId" Integer,
- CONSTRAINT "Location_LocationRegion_SET NULL_NO ACTION_Location_LocationRegionId__0" FOREIGN KEY ( "Location_LocationRegionId" ) REFERENCES "LocationRegion"
- ON DELETE Set NULL
- ,
- CONSTRAINT "Location_LocationCountry_SET NULL_NO ACTION_Location_LocationCountryId__0" FOREIGN KEY ( "Location_LocationCountryId" ) REFERENCES "LocationCountry"
- ON DELETE Set NULL
- ,
- CONSTRAINT "Location_Item_SET NULL_NO ACTION_Location_CoverItemId__0" FOREIGN KEY ( "Location_CoverItemId" ) REFERENCES "Item"
- ON DELETE Set NULL
- ,
- CONSTRAINT "Location_LocationDistrict_SET NULL_NO ACTION_Location_LocationDistrictId__0" FOREIGN KEY ( "Location_LocationDistrictId" ) REFERENCES "LocationDistrict"
- ON DELETE Set NULL
- );
- CREATE INDEX "Location_ItemsCountExcDupes" ON "Location"( "Location_ItemsCountExcDupes" );
- CREATE INDEX "Location_LocationCountryId" ON "Location"( "Location_LocationCountryId" );
- CREATE INDEX "Location_LocationDistrictId" ON "Location"( "Location_LocationDistrictId" );
- CREATE INDEX "Location_LocationRegionId" ON "Location"( "Location_LocationRegionId" );
- CREATE TRIGGER "Location_AfterInsert"
- AFTER INSERT
- ON "Location"
- FOR EACH ROW
- WHEN new.Location_Name != ''
- BEGIN INSERT INTO LocationFts(docid, Location_Name) VALUES(new.Location_Id, new.Location_Name);END;
- CREATE TRIGGER "Location_AfterUpdate"
- AFTER UPDATE OF "Location_Name"
- ON "Location"
- FOR EACH ROW
- WHEN new.Location_Name != ''
- BEGIN INSERT INTO LocationFts(docid, Location_Name) VALUES(new.Location_Id, new.Location_Name);END;
- CREATE TRIGGER "Location_BeforeDelete"
- BEFORE DELETE
- ON "Location"
- FOR EACH ROW
- BEGIN DELETE FROM LocationFts WHERE docid = old.Location_Id;END;
- CREATE TRIGGER "Location_BeforeUpdate"
- BEFORE UPDATE OF "Location_Name"
- ON "Location"
- FOR EACH ROW
- BEGIN DELETE FROM LocationFts WHERE docid=old.Location_Id;END;
- -- ------------------------------------------
- -- Dump of "LocationCountry"
- -- ------------------------------------------
- CREATE TABLE "LocationCountry"(
- "LocationCountry_Id" Integer PRIMARY KEY,
- "LocationCountry_Name" Text );
- CREATE TRIGGER "LocationCountry_AfterInsert"
- AFTER INSERT
- ON "LocationCountry"
- FOR EACH ROW
- BEGIN INSERT INTO LocationCountryFts(docid, LocationCountry_Name) VALUES(new.LocationCountry_Id, new.LocationCountry_Name);END;
- CREATE TRIGGER "LocationCountry_AfterUpdate"
- AFTER UPDATE OF "LocationCountry_Name"
- ON "LocationCountry"
- FOR EACH ROW
- BEGIN INSERT INTO LocationCountryFts(docid, LocationCountry_Name) VALUES(new.LocationCountry_Id, new.LocationCountry_Name);END;
- CREATE TRIGGER "LocationCountry_BeforeDelete"
- BEFORE DELETE
- ON "LocationCountry"
- FOR EACH ROW
- BEGIN DELETE FROM LocationCountryFts WHERE docid = old.LocationCountry_Id;END;
- CREATE TRIGGER "LocationCountry_BeforeUpdate"
- BEFORE UPDATE OF "LocationCountry_Name"
- ON "LocationCountry"
- FOR EACH ROW
- BEGIN DELETE FROM LocationCountryFts WHERE docid=new.LocationCountry_Id;END;
- -- ------------------------------------------
- -- Dump of "LocationCountryFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'LocationCountryFts'
- -- ------------------------------------------
- -- Dump of "LocationCountryFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "LocationCountryFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationCountryFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "LocationCountryFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "LocationCountryFts_segments"
- -- ------------------------------------------
- CREATE TABLE "LocationCountryFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationCountryFts_stat"
- -- ------------------------------------------
- CREATE TABLE "LocationCountryFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationDistrict"
- -- ------------------------------------------
- CREATE TABLE "LocationDistrict"(
- "LocationDistrict_Id" Integer PRIMARY KEY,
- "LocationDistrict_Name" Text,
- "LocationDistrict_LocationRegionId" Integer,
- CONSTRAINT "LocationDistrict_LocationRegion_SET NULL_NO ACTION_LocationDistrict_LocationRegionId__0" FOREIGN KEY ( "LocationDistrict_LocationRegionId" ) REFERENCES "LocationRegion"
- ON DELETE Set NULL
- );
- CREATE TRIGGER "LocationDistrict_AfterInsert"
- AFTER INSERT
- ON "LocationDistrict"
- FOR EACH ROW
- BEGIN INSERT INTO LocationDistrictFts(docid, LocationDistrict_Name) VALUES(new.LocationDistrict_Id, new.LocationDistrict_Name);END;
- CREATE TRIGGER "LocationDistrict_AfterUpdate"
- AFTER UPDATE OF "LocationDistrict_Name"
- ON "LocationDistrict"
- FOR EACH ROW
- BEGIN INSERT INTO LocationDistrictFts(docid, LocationDistrict_Name) VALUES(new.LocationDistrict_Id, new.LocationDistrict_Name);END;
- CREATE TRIGGER "LocationDistrict_BeforeDelete"
- BEFORE DELETE
- ON "LocationDistrict"
- FOR EACH ROW
- BEGIN DELETE FROM LocationDistrictFts WHERE docid = old.LocationDistrict_Id;END;
- CREATE TRIGGER "LocationDistrict_BeforeUpdate"
- BEFORE UPDATE OF "LocationDistrict_Name"
- ON "LocationDistrict"
- FOR EACH ROW
- BEGIN DELETE FROM LocationDistrictFts WHERE docid=old.LocationDistrict_Id;END;
- -- ------------------------------------------
- -- Dump of "LocationDistrictFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'LocationDistrictFts'
- -- ------------------------------------------
- -- Dump of "LocationDistrictFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "LocationDistrictFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationDistrictFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "LocationDistrictFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "LocationDistrictFts_segments"
- -- ------------------------------------------
- CREATE TABLE "LocationDistrictFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationDistrictFts_stat"
- -- ------------------------------------------
- CREATE TABLE "LocationDistrictFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'LocationFts'
- -- ------------------------------------------
- -- Dump of "LocationFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "LocationFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "LocationFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "LocationFts_segments"
- -- ------------------------------------------
- CREATE TABLE "LocationFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationFts_stat"
- -- ------------------------------------------
- CREATE TABLE "LocationFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationGrid"
- -- ------------------------------------------
- CREATE TABLE "LocationGrid"(
- "LocationGrid_Id" Integer PRIMARY KEY,
- "LocationGrid_Latitude" Real,
- "LocationGrid_Longitude" Real,
- "LocationGrid_LocationId" Integer,
- "LocationGrid_ErrorCount" Integer,
- "LocationGrid_LastRun" Integer,
- CONSTRAINT "LocationGrid_Location_CASCADE_NO ACTION_LocationGrid_LocationId__0" FOREIGN KEY ( "LocationGrid_LocationId" ) REFERENCES "Location"
- ON DELETE Cascade
- );
- CREATE INDEX "LocationGrid_LatLong" ON "LocationGrid"( "LocationGrid_Latitude", "LocationGrid_Longitude" );
- -- ------------------------------------------
- -- Dump of "LocationRegion"
- -- ------------------------------------------
- CREATE TABLE "LocationRegion"(
- "LocationRegion_Id" Integer PRIMARY KEY,
- "LocationRegion_Name" Text,
- "LocationRegion_LocationCountryId" Integer,
- CONSTRAINT "LocationRegion_LocationCountry_SET NULL_NO ACTION_LocationRegion_LocationCountryId__0" FOREIGN KEY ( "LocationRegion_LocationCountryId" ) REFERENCES "LocationCountry"
- ON DELETE Set NULL
- );
- CREATE TRIGGER "LocationRegion_AfterInsert"
- AFTER INSERT
- ON "LocationRegion"
- FOR EACH ROW
- BEGIN INSERT INTO LocationRegionFts(docid, LocationRegion_Name) VALUES(new.LocationRegion_Id, new.LocationRegion_Name);END;
- CREATE TRIGGER "LocationRegion_AfterUpdate"
- AFTER UPDATE OF "LocationRegion_Name"
- ON "LocationRegion"
- FOR EACH ROW
- BEGIN INSERT INTO LocationRegionFts(docid, LocationRegion_Name) VALUES(new.LocationRegion_Id, new.LocationRegion_Name);END;
- CREATE TRIGGER "LocationRegion_BeforeDelete"
- BEFORE DELETE
- ON "LocationRegion"
- FOR EACH ROW
- BEGIN DELETE FROM LocationRegionFts WHERE docid = old.LocationRegion_Id;END;
- CREATE TRIGGER "LocationRegion_BeforeUpdate"
- BEFORE UPDATE OF "LocationRegion_Name"
- ON "LocationRegion"
- FOR EACH ROW
- BEGIN DELETE FROM LocationRegionFts WHERE docid=new.LocationRegion_Id;END;
- -- ------------------------------------------
- -- Dump of "LocationRegionFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'LocationRegionFts'
- -- ------------------------------------------
- -- Dump of "LocationRegionFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "LocationRegionFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationRegionFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "LocationRegionFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "LocationRegionFts_segments"
- -- ------------------------------------------
- CREATE TABLE "LocationRegionFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "LocationRegionFts_stat"
- -- ------------------------------------------
- CREATE TABLE "LocationRegionFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "NetworkTelemetry"
- -- ------------------------------------------
- CREATE TABLE "NetworkTelemetry"(
- "NetworkTelemetry_Source" Integer NOT NULL,
- "NetworkTelemetry_RequestType" Integer NOT NULL,
- "NetworkTelemetry_IsBackgroundTaskHost" Integer NOT NULL,
- "NetworkTelemetry_TotalCount" Integer NOT NULL,
- "NetworkTelemetry_ByteSize" Integer NOT NULL,
- PRIMARY KEY ( "NetworkTelemetry_Source", "NetworkTelemetry_RequestType", "NetworkTelemetry_IsBackgroundTaskHost" ) );
- -- ------------------------------------------
- -- Dump of "OCRItem"
- -- ------------------------------------------
- CREATE TABLE "OCRItem"(
- "OCRItem_Id" Integer PRIMARY KEY );
- CREATE INDEX "OCRItem_ItemId" ON "OCRItem"( "OCRItem_ItemId" );
- -- ------------------------------------------
- -- Dump of "OCRItemTextViewFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'OCRItemTextViewFts'
- -- ------------------------------------------
- -- Dump of "OCRItemTextViewFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "OCRItemTextViewFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "OCRItemTextViewFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "OCRItemTextViewFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "OCRItemTextViewFts_segments"
- -- ------------------------------------------
- CREATE TABLE "OCRItemTextViewFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "OCRItemTextViewFts_stat"
- -- ------------------------------------------
- CREATE TABLE "OCRItemTextViewFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "OCRLine"
- -- ------------------------------------------
- CREATE TABLE "OCRLine"(
- "OCRLine_Id" Integer PRIMARY KEY );
- CREATE INDEX "OCRLine_OCRItemId" ON "OCRLine"( "OCRLine_OCRItemId" );
- -- ------------------------------------------
- -- Dump of "OCRWord"
- -- ------------------------------------------
- CREATE TABLE "OCRWord"(
- "OCRWord_Id" Integer PRIMARY KEY );
- CREATE INDEX "OCRWord_OCRLineId" ON "OCRWord"( "OCRWord_OCRLineId" );
- CREATE INDEX "OCRWord_Text" ON "OCRWord"( "OCRWord_Text" );
- -- ------------------------------------------
- -- Dump of "OneDriveStorageAndUpsellInfo"
- -- ------------------------------------------
- CREATE TABLE "OneDriveStorageAndUpsellInfo"(
- "OneDriveStorageAndUpsellInfo_UserId" Text PRIMARY KEY,
- "OneDriveStorageAndUpsellInfo_TotalSpace" Integer DEFAULT 0,
- "OneDriveStorageAndUpsellInfo_UsedSpace" Integer DEFAULT 0,
- "OneDriveStorageAndUpsellInfo_IsHighestPlan" Integer DEFAULT 0,
- "OneDriveStorageAndUpsellInfo_PaidSpace" Integer DEFAULT 0,
- "OneDriveStorageAndUpsellInfo_CountOfClickUpsellLink" Integer DEFAULT 0,
- "OneDriveStorageAndUpsellInfo_TotalSpaceForDisplay" Text,
- "OneDriveStorageAndUpsellInfo_UsedSpaceForDisplay" Text,
- "OneDriveStorageAndUpsellInfo_PriceForDisplay" Text,
- "OneDriveStorageAndUpsellInfo_UpsellUrl" Text,
- "OneDriveStorageAndUpsellInfo_UpsellState" Integer DEFAULT 0,
- "OneDriveStorageAndUpsellInfo_LastGetQuotaTime" Integer DEFAULT 0,
- "OneDriveStorageAndUpsellInfo_LastGetUpsellInfoTime" Integer DEFAULT 0 );
- -- ------------------------------------------
- -- Dump of "PendingUploadItem"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'PendingUploadItem'
- CREATE INDEX "PendingUploadItem_ItemAlbum" ON "PendingUploadItem"( "PendingUploadItem_ItemId" );
- -- ------------------------------------------
- -- Dump of "Person"
- -- ------------------------------------------
- CREATE TABLE "Person"(
- "Person_Id" Integer PRIMARY KEY,
- "Person_CID" Integer,
- "Person_ServiceId" Integer,
- "Person_Name" Text COLLATE NoCaseUnicode,
- "Person_SourceAndId" Text,
- "Person_ItemCount" Integer DEFAULT 0,
- "Person_EmailDigest" BLOB,
- "Person_RepresentativeThumbStream" BLOB,
- "Person_BestFaceId" Integer,
- "Person_Rank" Integer,
- "Person_RecalcBestFace" Integer DEFAULT 1,
- "Person_RecalcRank" Integer DEFAULT 1,
- CONSTRAINT "Person_Face_SET NULL_NO ACTION_Person_BestFaceId__0" FOREIGN KEY ( "Person_BestFaceId" ) REFERENCES "Face"
- ON DELETE Set NULL
- );
- CREATE INDEX "Person_BestFaceId" ON "Person"( "Person_BestFaceId" );
- CREATE INDEX "Person_Rank" ON "Person"( "Person_Rank" );
- CREATE INDEX "Person_RecalcBestFace" ON "Person"( "Person_RecalcBestFace" );
- CREATE INDEX "Person_RecalcRank" ON "Person"( "Person_RecalcRank" );
- CREATE TRIGGER "Person_AfterInsert"
- AFTER INSERT
- ON "Person"
- FOR EACH ROW
- BEGIN INSERT INTO PersonFts(docid, Person_Name) VALUES(new.Person_Id, new.Person_Name);END;
- CREATE TRIGGER "Person_AfterUpdate"
- AFTER UPDATE OF "Person_Name"
- ON "Person"
- FOR EACH ROW
- BEGIN INSERT INTO PersonFts(docid, Person_Name) VALUES(new.Person_Id, new.Person_Name);END;
- CREATE TRIGGER "Person_BeforeDelete"
- BEFORE DELETE
- ON "Person"
- FOR EACH ROW
- BEGIN DELETE FROM PersonFts WHERE docid = old.Person_Id;END;
- CREATE TRIGGER "Person_BeforeUpdate"
- BEFORE UPDATE OF "Person_Name"
- ON "Person"
- FOR EACH ROW
- BEGIN DELETE FROM PersonFts WHERE docid=old.Person_Id;END;
- -- ------------------------------------------
- -- Dump of "PersonFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'PersonFts'
- -- ------------------------------------------
- -- Dump of "PersonFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "PersonFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "PersonFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "PersonFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "PersonFts_segments"
- -- ------------------------------------------
- CREATE TABLE "PersonFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "PersonFts_stat"
- -- ------------------------------------------
- CREATE TABLE "PersonFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "PinnedSearch"
- -- ------------------------------------------
- CREATE TABLE "PinnedSearch"(
- "PinnedSearch_Id" Integer PRIMARY KEY,
- "PinnedSearch_PinnedDate" Integer NOT NULL,
- "PinnedSearch_SearchText" Text );
- CREATE INDEX "PinnedSearch_PinnedDate" ON "PinnedSearch"( "PinnedSearch_PinnedDate" );
- -- ------------------------------------------
- -- Dump of "Project"
- -- ------------------------------------------
- CREATE TABLE "Project"(
- "Project_Id" Integer PRIMARY KEY,
- "Project_AlbumId" Integer,
- "Project_Guid" Text NOT NULL,
- "Project_Name" Text COLLATE NoCaseLinguistic,
- "Project_RpmState" Text,
- "Project_AgmState" Text,
- "Project_DateCreated" Integer NOT NULL,
- "Project_Duration" Integer,
- "Project_StoryBuilderProjectState" BLOB,
- CONSTRAINT "Project_Album_CASCADE_NO ACTION_Project_AlbumId__0" FOREIGN KEY ( "Project_AlbumId" ) REFERENCES "Album"
- ON DELETE Cascade
- );
- CREATE UNIQUE INDEX "Project_AlbumId" ON "Project"( "Project_AlbumId" );
- CREATE UNIQUE INDEX "Project_Guid" ON "Project"( "Project_Guid" );
- -- ------------------------------------------
- -- Dump of "RemoteAlbum"
- -- ------------------------------------------
- CREATE TABLE "RemoteAlbum"(
- "RemoteAlbum_AlbumId" Integer PRIMARY KEY,
- "RemoteAlbum_RemoteId" Text,
- "RemoteAlbum_PresentAtSync" Integer DEFAULT 0,
- "RemoteAlbum_GenericViewUrl" Text,
- "RemoteAlbum_CoverDuringUpload" Text,
- "RemoteAlbum_AlbumType" Integer DEFAULT 0,
- "RemoteAlbum_PhotosCloudId" Text,
- "RemoteAlbum_ETag" Text,
- CONSTRAINT "RemoteAlbum_Album_CASCADE_NO ACTION_RemoteAlbum_AlbumId__0" FOREIGN KEY ( "RemoteAlbum_AlbumId" ) REFERENCES "Album"
- ON DELETE Cascade
- );
- CREATE INDEX "RemoteAlbum_PhotosCloudId" ON "RemoteAlbum"( "RemoteAlbum_PhotosCloudId" );
- -- ------------------------------------------
- -- Dump of "RemoteItem"
- -- ------------------------------------------
- CREATE TABLE "RemoteItem"(
- "RemoteItem_RemoteId" Text,
- "RemoteItem_RemoteParentId" Text,
- "RemoteItem_ItemId" Integer,
- "RemoteItem_FolderId" Integer,
- "RemoteItem_DownloadUrl" Text,
- "RemoteItem_PresentAtSync" Integer DEFAULT 0,
- "RemoteItem_PhotosCloudId" Text,
- CONSTRAINT "RemoteItem_Item_CASCADE_NO ACTION_RemoteItem_ItemId__0" FOREIGN KEY ( "RemoteItem_ItemId" ) REFERENCES "Item"
- ON DELETE Cascade
- ,
- CONSTRAINT "RemoteItem_Folder_CASCADE_NO ACTION_RemoteItem_FolderId__0" FOREIGN KEY ( "RemoteItem_FolderId" ) REFERENCES "Folder"
- ON DELETE Cascade
- ,
- CONSTRAINT "RemoteItemIdOrFolderId" CHECK ((CASE WHEN RemoteItem_ItemId IS NOT NULL THEN 1 ELSE 0 END + CASE WHEN RemoteItem_FolderId IS NOT NULL THEN 1 ELSE 0 END) = 1) );
- CREATE UNIQUE INDEX "RemoteItem_FolderId" ON "RemoteItem"( "RemoteItem_FolderId" );
- CREATE UNIQUE INDEX "RemoteItem_ItemId" ON "RemoteItem"( "RemoteItem_ItemId" );
- CREATE INDEX "RemoteItem_RemoteId" ON "RemoteItem"( "RemoteItem_RemoteId" );
- -- ------------------------------------------
- -- Dump of "RemoteProject"
- -- ------------------------------------------
- CREATE TABLE "RemoteProject"(
- "RemoteProject_Id" Integer PRIMARY KEY,
- "RemoteProject_ProjectGuid" Text NOT NULL,
- "RemoteProject_PhotosCloudId" Text,
- "RemoteProject_PublishState" Integer NOT NULL,
- "RemoteProject_DateLastSynced" Integer,
- "RemoteProject_ETag" Text,
- CONSTRAINT "RemoteProject_Project_CASCADE_NO ACTION_RemoteProject_ProjectGuid_Project_Guid_0" FOREIGN KEY ( "RemoteProject_ProjectGuid" ) REFERENCES "Project"( "Project_Guid" )
- ON DELETE Cascade
- );
- CREATE INDEX "RemoteProject_PhotosCloudId" ON "RemoteProject"( "RemoteProject_PhotosCloudId" );
- CREATE INDEX "RemoteProject_ProjectGuid" ON "RemoteProject"( "RemoteProject_ProjectGuid" );
- -- ------------------------------------------
- -- Dump of "RemoteThumbnail"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'RemoteThumbnail'
- CREATE INDEX "RemoteThumbnail_ItemId" ON "RemoteThumbnail"( "RemoteThumbnail_ItemId" );
- -- ------------------------------------------
- -- Dump of "SalientRect"
- -- ------------------------------------------
- CREATE TABLE "SalientRect"(
- "SalientRect_Id" Integer PRIMARY KEY );
- CREATE INDEX "SalientRect_ItemId" ON "SalientRect"( "SalientRect_ItemId" );
- -- ------------------------------------------
- -- Dump of "SearchAnalysisItemPriority"
- -- ------------------------------------------
- CREATE TABLE "SearchAnalysisItemPriority"(
- "SearchAnalysisItemPriority_Id" Integer PRIMARY KEY,
- "SearchAnalysisItemPriority_ItemId" Integer NOT NULL,
- "SearchAnalysisItemPriority_Priority" Integer NOT NULL DEFAULT 0,
- CONSTRAINT "SearchAnalysisItemPriority_Item_CASCADE_NO ACTION_SearchAnalysisItemPriority_ItemId__0" FOREIGN KEY ( "SearchAnalysisItemPriority_ItemId" ) REFERENCES "Item"
- ON DELETE Cascade
- );
- CREATE UNIQUE INDEX "SearchAnalysisItemPriority_ItemId" ON "SearchAnalysisItemPriority"( "SearchAnalysisItemPriority_ItemId" );
- -- ------------------------------------------
- -- Dump of "Source"
- -- ------------------------------------------
- CREATE TABLE "Source"(
- "Source_Id" Integer PRIMARY KEY,
- "Source_Type" Integer,
- "Source_UserId" Text,
- "Source_UserName" Text,
- "Source_Status" Integer,
- "Source_ProviderType" Integer,
- "Source_UserEnabled" Integer,
- "Source_PhotosCloudUserId" Text );
- -- ------------------------------------------
- -- Dump of "Tag"
- -- ------------------------------------------
- CREATE TABLE "Tag"(
- "Tag_Id" Integer PRIMARY KEY,
- "Tag_ResourceId" Integer,
- "Tag_CreatedDate" Integer );
- CREATE INDEX "Tag_ResourceId" ON "Tag"( "Tag_ResourceId" );
- -- ------------------------------------------
- -- Dump of "TagVariant"
- -- ------------------------------------------
- CREATE TABLE "TagVariant"(
- "TagVariant_Id" Integer PRIMARY KEY,
- "TagVariant_TagResourceId" Integer,
- "TagVariant_Text" Text,
- "TagVariant_IsPrimary" Integer );
- CREATE INDEX "TagVariant_TagResourceId" ON "TagVariant"( "TagVariant_TagResourceId" );
- CREATE TRIGGER "TagVariant_AfterInsert"
- AFTER INSERT
- ON "TagVariant"
- FOR EACH ROW
- BEGIN INSERT INTO TagVariantFts(docid, TagVariant_Text) VALUES(new.TagVariant_Id, new.TagVariant_Text); END;
- CREATE TRIGGER "TagVariant_AfterUpdate"
- AFTER UPDATE OF "TagVariant_Text"
- ON "TagVariant"
- FOR EACH ROW
- BEGIN INSERT INTO TagVariantFts (docid, TagVariant_Text) VALUES(new.TagVariant_Id, new.TagVariant_Text) ; END;
- CREATE TRIGGER "TagVariant_BeforeDelete"
- BEFORE DELETE
- ON "TagVariant"
- FOR EACH ROW
- BEGIN DELETE FROM TagVariantFts WHERE docid = old.TagVariant_Id; END;
- CREATE TRIGGER "TagVariant_BeforeUpdate"
- BEFORE UPDATE OF "TagVariant_Text"
- ON "TagVariant"
- FOR EACH ROW
- BEGIN DELETE FROM TagVariantFts WHERE docid=old.TagVariant_Id; END;
- -- ------------------------------------------
- -- Dump of "TagVariantFts"
- -- ------------------------------------------
- -- Need to add atleast one column to create table 'TagVariantFts'
- -- ------------------------------------------
- -- Dump of "TagVariantFts_docsize"
- -- ------------------------------------------
- CREATE TABLE "TagVariantFts_docsize"(
- "docid" Integer PRIMARY KEY,
- "size" BLOB );
- -- ------------------------------------------
- -- Dump of "TagVariantFts_segdir"
- -- ------------------------------------------
- CREATE TABLE "TagVariantFts_segdir"(
- "level" Integer,
- "idx" Integer,
- "start_block" Integer,
- "leaves_end_block" Integer,
- "end_block" Integer,
- "root" BLOB,
- PRIMARY KEY ( "level", "idx" ) );
- -- ------------------------------------------
- -- Dump of "TagVariantFts_segments"
- -- ------------------------------------------
- CREATE TABLE "TagVariantFts_segments"(
- "blockid" Integer PRIMARY KEY,
- "block" BLOB );
- -- ------------------------------------------
- -- Dump of "TagVariantFts_stat"
- -- ------------------------------------------
- CREATE TABLE "TagVariantFts_stat"(
- "id" Integer PRIMARY KEY,
- "value" BLOB );
- -- ------------------------------------------
- -- Dump of "UserActionAlbumView"
- -- ------------------------------------------
- CREATE TABLE "UserActionAlbumView"(
- "UserActionAlbumView_Id" Integer PRIMARY KEY AUTOINCREMENT,
- "UserActionAlbumView_Date" Integer NOT NULL,
- "UserActionAlbumView_AlbumId" Integer,
- "UserActionAlbumView_ActionOrigin" Integer NOT NULL,
- CONSTRAINT "UserActionAlbumView_Album_SET NULL_NO ACTION_UserActionAlbumView_AlbumId__0" FOREIGN KEY ( "UserActionAlbumView_AlbumId" ) REFERENCES "Album"
- ON DELETE Set NULL
- );
- CREATE INDEX "UserActionAlbumView_AlbumId" ON "UserActionAlbumView"( "UserActionAlbumView_AlbumId" );
- -- ------------------------------------------
- -- Dump of "UserActionImport"
- -- ------------------------------------------
- CREATE TABLE "UserActionImport"(
- "UserActionImport_Id" Integer PRIMARY KEY AUTOINCREMENT,
- "UserActionImport_Date" Integer NOT NULL,
- "UserActionImport_SessionId" Integer NOT NULL,
- "UserActionImport_Destination" Text NOT NULL,
- "UserActionImport_ActionOrigin" Integer NOT NULL,
- "UserActionImport_Manufacturer" Text NOT NULL,
- "UserActionImport_Model" Text NOT NULL,
- "UserActionImport_TotalCount" Integer NOT NULL );
- -- ------------------------------------------
- -- Dump of "UserActionLaunch"
- -- ------------------------------------------
- CREATE TABLE "UserActionLaunch"(
- "UserActionLaunch_Id" Integer PRIMARY KEY AUTOINCREMENT,
- "UserActionLaunch_Date" Integer NOT NULL,
- "UserActionLaunch_EntryPoint" Integer NOT NULL );
- -- ------------------------------------------
- -- Dump of "UserActionPrint"
- -- ------------------------------------------
- CREATE TABLE "UserActionPrint"(
- "UserActionPrint_Id" Integer PRIMARY KEY AUTOINCREMENT,
- "UserActionPrint_Date" Integer NOT NULL,
- "UserActionPrint_ItemId" Integer,
- "UserActionPrint_ActionOrigin" Integer NOT NULL,
- CONSTRAINT "UserActionPrint_Item_SET NULL_NO ACTION_UserActionPrint_ItemId__0" FOREIGN KEY ( "UserActionPrint_ItemId" ) REFERENCES "Item"
- ON DELETE Set NULL
- );
- CREATE INDEX "UserActionPrint_ItemId" ON "UserActionPrint"( "UserActionPrint_ItemId" );
- -- ------------------------------------------
- -- Dump of "UserActionSearch"
- -- ------------------------------------------
- CREATE TABLE "UserActionSearch"(
- "UserActionSearch_Id" Integer PRIMARY KEY AUTOINCREMENT,
- "UserActionSearch_Date" Integer NOT NULL,
- "UserActionSearch_Json" Text NOT NULL,
- "UserActionSearch_Textbox" Text NOT NULL,
- "UserActionSearch_ActionOrigin" Integer NOT NULL,
- "UserActionSearch_RequestOrigin" Integer NOT NULL,
- "UserActionSearch_NumberOfResults" Integer NOT NULL,
- "UserActionSearch_IndexingWasComplete" Integer NOT NULL );
- -- ------------------------------------------
- -- Dump of "UserActionShare"
- -- ------------------------------------------
- CREATE TABLE "UserActionShare"(
- "UserActionShare_Id" Integer PRIMARY KEY AUTOINCREMENT,
- "UserActionShare_Date" Integer NOT NULL,
- "UserActionShare_ItemId" Integer,
- "UserActionShare_ActionOrigin" Integer NOT NULL,
- "UserActionShare_Target" Text NOT NULL,
- "UserActionShare_Result" Integer NOT NULL,
- CONSTRAINT "UserActionShare_Item_SET NULL_NO ACTION_UserActionShare_ItemId__0" FOREIGN KEY ( "UserActionShare_ItemId" ) REFERENCES "Item"
- ON DELETE Set NULL
- );
- CREATE INDEX "UserActionShare_ItemId" ON "UserActionShare"( "UserActionShare_ItemId" );
- -- ------------------------------------------
- -- Dump of "UserActionSlideshow"
- -- ------------------------------------------
- CREATE TABLE "UserActionSlideshow"(
- "UserActionSlideshow_Id" Integer PRIMARY KEY AUTOINCREMENT,
- "UserActionSlideshow_Date" Integer NOT NULL,
- "UserActionSlideshow_AlbumId" Integer,
- "UserActionSlideshow_ItemId" Integer,
- "UserActionSlideshow_ActionOrigin" Integer NOT NULL,
- CONSTRAINT "UserActionSlideshow_Album_SET NULL_NO ACTION_UserActionSlideshow_AlbumId__0" FOREIGN KEY ( "UserActionSlideshow_AlbumId" ) REFERENCES "Album"
- ON DELETE Set NULL
- ,
- CONSTRAINT "UserActionSlideshow_Item_SET NULL_NO ACTION_UserActionSlideshow_ItemId__0" FOREIGN KEY ( "UserActionSlideshow_ItemId" ) REFERENCES "Item"
- ON DELETE Set NULL
- );
- CREATE INDEX "UserActionSlideshow_AlbumId" ON "UserActionSlideshow"( "UserActionSlideshow_AlbumId" );
- CREATE INDEX "UserActionSlideshow_ItemId" ON "UserActionSlideshow"( "UserActionSlideshow_ItemId" );
- -- ------------------------------------------
- -- Dump of "UserActionView"
- -- ------------------------------------------
- CREATE TABLE "UserActionView"(
- "UserActionView_Id" Integer PRIMARY KEY AUTOINCREMENT,
- "UserActionView_Date" Integer NOT NULL,
- "UserActionView_ItemId" Integer,
- "UserActionView_ActionOrigin" Integer NOT NULL,
- CONSTRAINT "UserActionView_Item_SET NULL_NO ACTION_UserActionView_ItemId__0" FOREIGN KEY ( "UserActionView_ItemId" ) REFERENCES "Item"
- ON DELETE Set NULL
- );
- CREATE INDEX "UserActionView_ItemId" ON "UserActionView"( "UserActionView_ItemId" );
- -- ------------------------------------------
- -- Dump of "VideoFaceOccurrence"
- -- ------------------------------------------
- CREATE TABLE "VideoFaceOccurrence"(
- "VideoFaceOccurrence_Id" Integer PRIMARY KEY );
- CREATE VIEW OCRItemTextView AS SELECT rowid, group_concat(OCRLine_Text, ' ') AS OCRItemTextView_Text FROM ( SELECT rowid, OCRItem_ItemId, OCRItem_Id, OCRLine_Id, group_concat(OCRWord_Text, ' ') AS OCRLine_Text FROM ( SELECT OCRItem.OCRItem_ItemId AS rowid, OCRItem_ItemId, OCRItem_Id, OCRLine_IndexOnItem, OCRLine_Id, OCRWord_Text FROM OCRItem JOIN OCRLine ON OCRItem_Id = OCRLine_OCRItemId JOIN OCRWord ON OCRWord_OCRLineId = OCRLine_Id ORDER BY OCRItem_ItemId, OCRLine_IndexOnItem, OCRWord_IndexOnLine ) GROUP BY OCRLine_Id ) GROUP BY OCRItem_Id;
Advertisement
Add Comment
Please, Sign In to add comment