Preserve manuscript sources and persistent author state in project backups

This commit is contained in:
Nick Beckley 2026-11-04 00:26:05 +00:00
parent f12ad4362a
commit dbb2e2dcee
13 changed files with 2188 additions and 31 deletions

View File

@ -1,6 +1,6 @@
Table,ProjectOwnershipEvidence,BackupCollection,Classification,RestoreVerified,AssetsVerified
AppUser,Global/user/independent,,Account/billing/system execution state; excluded from portable project backup,Pending,Pending
AssetAliases,ProjectID or FK descendant,,Pending classification,Pending,Pending
AssetAliases,ProjectID or FK descendant,AssetAliases,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
AssetCustodyEventCharacters,ProjectID or FK descendant,AssetCustodyCharacters,Serialized; field completeness unverified,Pending,Pending
AssetCustodyEvents,ProjectID or FK descendant,AssetCustodyEvents,Serialized; field completeness unverified,Pending,Pending
AssetCustodyEventTypes,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
@ -10,12 +10,12 @@ AssetEvents,ProjectID or FK descendant,AssetEvents,Serialized; field completenes
AssetEventTypes,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
AssetKinds,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
AssetStates,ProjectID or FK descendant,AssetStates,Serialized; field completeness unverified,Pending,Pending
AuthorPlotSeeds,ProjectID or FK descendant,,Pending classification,Pending,Pending
AuthorPlotSeeds,ProjectID or FK descendant,AuthorPlotSeeds,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
Books,ProjectID or FK descendant,Books,Serialized; era/locale omission repaired by migration 213 (isolated only),Unicode title and era/locale initial import comparison passed; other fields pending,Pending
ChapterGoals,ProjectID or FK descendant,ChapterGoals,Serialized; field completeness unverified,Pending,Pending
ChapterPurposeTypes,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
Chapters,ProjectID or FK descendant,Chapters,Serialized; field completeness unverified,Pending,Pending
CharacterAliases,ProjectID or FK descendant,,Pending classification,Pending,Pending
CharacterAliases,ProjectID or FK descendant,CharacterAliases,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
CharacterAttributeEvents,ProjectID or FK descendant,CharacterAttributeEvents,Serialized; field completeness unverified,Pending,Pending
CharacterAttributeTypes,ProjectID or FK descendant,CharacterAttributeTypes,Serialized; field completeness unverified,Pending,Pending
CharacterEnrichmentEvidence,ProjectID or FK descendant,,Pending classification,Pending,Pending
@ -28,7 +28,7 @@ CharacterRelationships,ProjectID or FK descendant,CharacterRelationships,Seriali
CharacterRoleInSceneTypes,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
Characters,ProjectID or FK descendant,Characters,Serialized; field completeness unverified,Pending,Pending
CharacterSexValues,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
ContinuityWarningAcknowledgements,ProjectID or FK descendant,,Pending classification,Pending,Pending
ContinuityWarningAcknowledgements,ProjectID or FK descendant,ContinuityWarningAcknowledgements,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
ContinuityWarnings,ProjectID or FK descendant,ContinuityWarnings,Serialized; field completeness unverified,Pending,Pending
CoreImportBasicLocationCandidates,ProjectID or FK descendant,,Pending classification,Pending,Pending
CoreImportBasicLocationEvidence,ProjectID or FK descendant,,Pending classification,Pending,Pending
@ -47,13 +47,13 @@ GenreMetricPresets,Global/user/independent,GenreMetricPresets,Serialized; field
GivenNames,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
IllustrationLibraryItems,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
KnowledgeStates,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
LocationAliases,ProjectID or FK descendant,,Pending classification,Pending,Pending
LocationAliases,ProjectID or FK descendant,LocationAliases,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
LocationRelationships,ProjectID or FK descendant,LocationRelationships,Serialized; field completeness unverified,Pending,Pending
LocationRelationshipTypes,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
Locations,ProjectID or FK descendant,Locations,Serialized; field completeness unverified,Pending,Pending
LocationTypes,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
ManuscriptDocuments,ProjectID or FK descendant,,Pending classification,Pending,Pending
ManuscriptStructuralChapterSources,ProjectID or FK descendant,,Authoritative persisted manuscript text omitted; source/schema evidence; SQL case pending,Pending,Pending
ManuscriptDocuments,ProjectID or FK descendant,ManuscriptDocuments,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
ManuscriptStructuralChapterSources,ProjectID or FK descendant,ManuscriptStructuralChapterSources,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
MapFeatures,ProjectID or FK descendant,MapFeatures,Serialized; initial isolated semantic import comparison passed,Initial import graph compared; same-project restore and broader cases pending,Pending
MapJourneyNotes,ProjectID or FK descendant,MapJourneyNotes,Serialized; field completeness unverified,Pending,Pending
MapReferenceImages,ProjectID or FK descendant,MapReferenceImages,Serialized; initial isolated semantic import comparison passed,Initial import graph compared; same-project restore and broader cases pending,Exact normalized bytes and remapped image placement passed
@ -66,7 +66,7 @@ OnboardingManuscriptBuildChapterMap,ProjectID or FK descendant,,Pending classifi
OnboardingManuscriptBuildCharacterMap,ProjectID or FK descendant,,Pending classification,Pending,Pending
OnboardingManuscriptBuilds,ProjectID or FK descendant,,Pending classification,Pending,Pending
OnboardingManuscriptBuildSceneMap,ProjectID or FK descendant,,Pending classification,Pending,Pending
PlotEventTargetPlotLines,ProjectID or FK descendant,,Pending classification,Pending,Pending
PlotEventTargetPlotLines,ProjectID or FK descendant,PlotEventTargetPlotLines,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
PlotEventTypes,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
PlotImportance,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
PlotLines,ProjectID or FK descendant,PlotLines,Serialized; field completeness unverified,Pending,Pending
@ -101,7 +101,7 @@ SceneDependencies,ProjectID or FK descendant,SceneDependencies,Serialized; field
SceneDependencyTypes,Global/user/independent,,Reference/user/system; scope review pending,Pending,Pending
SceneFloorPlanOccupancy,ProjectID or FK descendant,SceneFloorPlanOccupancy,Serialized; field completeness unverified,Pending,Pending
SceneLocationSuggestions,ProjectID or FK descendant,,Pending classification,Pending,Pending
SceneManuscriptSources,ProjectID or FK descendant,,Authoritative persisted manuscript text omitted; source/schema evidence; SQL case pending,Pending,Pending
SceneManuscriptSources,ProjectID or FK descendant,SceneManuscriptSources,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
SceneMetricTypes,ProjectID or FK descendant,SceneMetricTypes,Serialized; field completeness unverified,Pending,Pending
SceneMetricValues,ProjectID or FK descendant,SceneMetricValues,Serialized; field completeness unverified,Pending,Pending
SceneNotes,ProjectID or FK descendant,SceneNotes,Serialized; field completeness unverified,Pending,Pending
@ -163,6 +163,6 @@ WarningTypes,Global/user/independent,,Reference/user/system; scope review pendin
WholeBookPlotSynthesisRuns,ProjectID or FK descendant,,Pending classification,Pending,Pending
WordCompanionSceneAssets,ProjectID or FK descendant,,Pending classification,Pending,Pending
WordCompanionSceneLocations,ProjectID or FK descendant,,Pending classification,Pending,Pending
WritingPlans,ProjectID or FK descendant,,Persistent writer state omitted; synthetic source plan imports as zero plans,Confirmed omission; repair pending,Pending
WritingScheduleItems,ProjectID or FK descendant,,Persistent writer state omitted; synthetic source plan imports as zero plans,Confirmed omission; repair pending,Pending
WritingPlans,ProjectID or FK descendant,WritingPlans,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
WritingScheduleItems,ProjectID or FK descendant,WritingScheduleItems,Version 1.2 persisted state; initial isolated content/reference comparison passed,Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending,Text/JSON state (no external file bytes)
WritingSolverVersions,Global/user/independent,,Account/billing/system execution state; excluded from portable project backup,Pending,Pending

1 Table ProjectOwnershipEvidence BackupCollection Classification RestoreVerified AssetsVerified
2 AppUser Global/user/independent Account/billing/system execution state; excluded from portable project backup Pending Pending
3 AssetAliases ProjectID or FK descendant AssetAliases Pending classification Version 1.2 persisted state; initial isolated content/reference comparison passed Pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
4 AssetCustodyEventCharacters ProjectID or FK descendant AssetCustodyCharacters Serialized; field completeness unverified Pending Pending
5 AssetCustodyEvents ProjectID or FK descendant AssetCustodyEvents Serialized; field completeness unverified Pending Pending
6 AssetCustodyEventTypes Global/user/independent Reference/user/system; scope review pending Pending Pending
10 AssetEventTypes Global/user/independent Reference/user/system; scope review pending Pending Pending
11 AssetKinds Global/user/independent Reference/user/system; scope review pending Pending Pending
12 AssetStates ProjectID or FK descendant AssetStates Serialized; field completeness unverified Pending Pending
13 AuthorPlotSeeds ProjectID or FK descendant AuthorPlotSeeds Pending classification Version 1.2 persisted state; initial isolated content/reference comparison passed Pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
14 Books ProjectID or FK descendant Books Serialized; era/locale omission repaired by migration 213 (isolated only) Unicode title and era/locale initial import comparison passed; other fields pending Pending
15 ChapterGoals ProjectID or FK descendant ChapterGoals Serialized; field completeness unverified Pending Pending
16 ChapterPurposeTypes Global/user/independent Reference/user/system; scope review pending Pending Pending
17 Chapters ProjectID or FK descendant Chapters Serialized; field completeness unverified Pending Pending
18 CharacterAliases ProjectID or FK descendant CharacterAliases Pending classification Version 1.2 persisted state; initial isolated content/reference comparison passed Pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
19 CharacterAttributeEvents ProjectID or FK descendant CharacterAttributeEvents Serialized; field completeness unverified Pending Pending
20 CharacterAttributeTypes ProjectID or FK descendant CharacterAttributeTypes Serialized; field completeness unverified Pending Pending
21 CharacterEnrichmentEvidence ProjectID or FK descendant Pending classification Pending Pending
28 CharacterRoleInSceneTypes Global/user/independent Reference/user/system; scope review pending Pending Pending
29 Characters ProjectID or FK descendant Characters Serialized; field completeness unverified Pending Pending
30 CharacterSexValues Global/user/independent Reference/user/system; scope review pending Pending Pending
31 ContinuityWarningAcknowledgements ProjectID or FK descendant ContinuityWarningAcknowledgements Pending classification Version 1.2 persisted state; initial isolated content/reference comparison passed Pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
32 ContinuityWarnings ProjectID or FK descendant ContinuityWarnings Serialized; field completeness unverified Pending Pending
33 CoreImportBasicLocationCandidates ProjectID or FK descendant Pending classification Pending Pending
34 CoreImportBasicLocationEvidence ProjectID or FK descendant Pending classification Pending Pending
47 GivenNames Global/user/independent Reference/user/system; scope review pending Pending Pending
48 IllustrationLibraryItems Global/user/independent Reference/user/system; scope review pending Pending Pending
49 KnowledgeStates Global/user/independent Reference/user/system; scope review pending Pending Pending
50 LocationAliases ProjectID or FK descendant LocationAliases Pending classification Version 1.2 persisted state; initial isolated content/reference comparison passed Pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
51 LocationRelationships ProjectID or FK descendant LocationRelationships Serialized; field completeness unverified Pending Pending
52 LocationRelationshipTypes Global/user/independent Reference/user/system; scope review pending Pending Pending
53 Locations ProjectID or FK descendant Locations Serialized; field completeness unverified Pending Pending
54 LocationTypes Global/user/independent Reference/user/system; scope review pending Pending Pending
55 ManuscriptDocuments ProjectID or FK descendant ManuscriptDocuments Pending classification Version 1.2 persisted state; initial isolated content/reference comparison passed Pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
56 ManuscriptStructuralChapterSources ProjectID or FK descendant ManuscriptStructuralChapterSources Authoritative persisted manuscript text omitted; source/schema evidence; SQL case pending Version 1.2 persisted state; initial isolated content/reference comparison passed Pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
57 MapFeatures ProjectID or FK descendant MapFeatures Serialized; initial isolated semantic import comparison passed Initial import graph compared; same-project restore and broader cases pending Pending
58 MapJourneyNotes ProjectID or FK descendant MapJourneyNotes Serialized; field completeness unverified Pending Pending
59 MapReferenceImages ProjectID or FK descendant MapReferenceImages Serialized; initial isolated semantic import comparison passed Initial import graph compared; same-project restore and broader cases pending Exact normalized bytes and remapped image placement passed
66 OnboardingManuscriptBuildCharacterMap ProjectID or FK descendant Pending classification Pending Pending
67 OnboardingManuscriptBuilds ProjectID or FK descendant Pending classification Pending Pending
68 OnboardingManuscriptBuildSceneMap ProjectID or FK descendant Pending classification Pending Pending
69 PlotEventTargetPlotLines ProjectID or FK descendant PlotEventTargetPlotLines Pending classification Version 1.2 persisted state; initial isolated content/reference comparison passed Pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
70 PlotEventTypes Global/user/independent Reference/user/system; scope review pending Pending Pending
71 PlotImportance Global/user/independent Reference/user/system; scope review pending Pending Pending
72 PlotLines ProjectID or FK descendant PlotLines Serialized; field completeness unverified Pending Pending
101 SceneDependencyTypes Global/user/independent Reference/user/system; scope review pending Pending Pending
102 SceneFloorPlanOccupancy ProjectID or FK descendant SceneFloorPlanOccupancy Serialized; field completeness unverified Pending Pending
103 SceneLocationSuggestions ProjectID or FK descendant Pending classification Pending Pending
104 SceneManuscriptSources ProjectID or FK descendant SceneManuscriptSources Authoritative persisted manuscript text omitted; source/schema evidence; SQL case pending Version 1.2 persisted state; initial isolated content/reference comparison passed Pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
105 SceneMetricTypes ProjectID or FK descendant SceneMetricTypes Serialized; field completeness unverified Pending Pending
106 SceneMetricValues ProjectID or FK descendant SceneMetricValues Serialized; field completeness unverified Pending Pending
107 SceneNotes ProjectID or FK descendant SceneNotes Serialized; field completeness unverified Pending Pending
163 WholeBookPlotSynthesisRuns ProjectID or FK descendant Pending classification Pending Pending
164 WordCompanionSceneAssets ProjectID or FK descendant Pending classification Pending Pending
165 WordCompanionSceneLocations ProjectID or FK descendant Pending classification Pending Pending
166 WritingPlans ProjectID or FK descendant WritingPlans Persistent writer state omitted; synthetic source plan imports as zero plans Version 1.2 persisted state; initial isolated content/reference comparison passed Confirmed omission; repair pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
167 WritingScheduleItems ProjectID or FK descendant WritingScheduleItems Persistent writer state omitted; synthetic source plan imports as zero plans Version 1.2 persisted state; initial isolated content/reference comparison passed Confirmed omission; repair pending Import-as-new and actual same-project restore/safety/SQL rollback passed; broader all-entity matrix pending Pending Text/JSON state (no external file bytes)
168 WritingSolverVersions Global/user/independent Account/billing/system execution state; excluded from portable project backup Pending Pending

View File

@ -0,0 +1,819 @@
Table,Collection,Column,SqlType,Nullable,Computed,WritableModelProperty,Classification
AssetAliases,AssetAliases,AssetAliasID,int,False,False,True,Represented; projection and semantic comparison still required
AssetAliases,AssetAliases,StoryAssetID,int,False,False,True,Represented; projection and semantic comparison still required
AssetAliases,AssetAliases,Alias,nvarchar,False,False,True,Represented; projection and semantic comparison still required
AssetAliases,AssetAliases,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
AssetAliases,AssetAliases,CreatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
AssetCustodyEventCharacters,AssetCustodyCharacters,AssetCustodyEventCharacterID,int,False,False,True,Represented; projection and semantic comparison still required
AssetCustodyEventCharacters,AssetCustodyCharacters,AssetCustodyEventID,int,False,False,True,Represented; projection and semantic comparison still required
AssetCustodyEventCharacters,AssetCustodyCharacters,CharacterID,int,True,False,True,Represented; projection and semantic comparison still required
AssetCustodyEventCharacters,AssetCustodyCharacters,CharacterNameText,nvarchar,True,False,True,Represented; projection and semantic comparison still required
AssetCustodyEventCharacters,AssetCustodyCharacters,CustodyRoleID,int,False,False,True,Represented; projection and semantic comparison still required
AssetCustodyEvents,AssetCustodyEvents,AssetCustodyEventID,int,False,False,True,Represented; projection and semantic comparison still required
AssetCustodyEvents,AssetCustodyEvents,StoryAssetID,int,False,False,True,Represented; projection and semantic comparison still required
AssetCustodyEvents,AssetCustodyEvents,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
AssetCustodyEvents,AssetCustodyEvents,AssetCustodyEventTypeID,int,False,False,True,Represented; projection and semantic comparison still required
AssetCustodyEvents,AssetCustodyEvents,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
AssetCustodyEvents,AssetCustodyEvents,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
AssetCustodyEvents,AssetCustodyEvents,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,AssetDependencyID,int,False,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,SourceAssetID,int,False,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,TargetAssetID,int,False,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,AssetDependencyTypeID,int,False,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,SourceRequiredStateID,int,True,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,TargetBlockedStateID,int,True,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
AssetDependencies,AssetDependencies,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,AssetEventID,int,False,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,StoryAssetID,int,False,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,AssetEventTypeID,int,False,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,FromStateID,int,True,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,ToStateID,int,True,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,EventTitle,nvarchar,False,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,EventDescription,nvarchar,True,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
AssetEvents,AssetEvents,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
AssetStates,AssetStates,AssetStateID,int,False,False,True,Represented; projection and semantic comparison still required
AssetStates,AssetStates,ProjectID,int,True,False,True,Represented; projection and semantic comparison still required
AssetStates,AssetStates,AssetKindID,int,True,False,True,Represented; projection and semantic comparison still required
AssetStates,AssetStates,StateName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
AssetStates,AssetStates,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
AssetStates,AssetStates,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
AssetStates,AssetStates,IsResolvedState,bit,False,False,True,Represented; projection and semantic comparison still required
AssetStates,AssetStates,IsActive,bit,False,False,True,Represented; projection and semantic comparison still required
AuthorPlotSeeds,AuthorPlotSeeds,AuthorPlotSeedID,int,False,False,True,Represented; projection and semantic comparison still required
AuthorPlotSeeds,AuthorPlotSeeds,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
AuthorPlotSeeds,AuthorPlotSeeds,BookID,int,False,False,True,Represented; projection and semantic comparison still required
AuthorPlotSeeds,AuthorPlotSeeds,Description,nvarchar,False,False,True,Represented; projection and semantic comparison still required
AuthorPlotSeeds,AuthorPlotSeeds,Status,nvarchar,False,False,True,Represented; projection and semantic comparison still required
AuthorPlotSeeds,AuthorPlotSeeds,MatchedPlotLineID,int,True,False,True,Represented; projection and semantic comparison still required
AuthorPlotSeeds,AuthorPlotSeeds,Source,nvarchar,False,False,True,Represented; projection and semantic comparison still required
AuthorPlotSeeds,AuthorPlotSeeds,CreatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
AuthorPlotSeeds,AuthorPlotSeeds,UpdatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
Books,Books,BookID,int,False,False,True,Represented; projection and semantic comparison still required
Books,Books,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
Books,Books,BookTitle,nvarchar,False,False,True,Represented; projection and semantic comparison still required
Books,Books,BookNumber,int,False,False,True,Represented; projection and semantic comparison still required
Books,Books,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Books,Books,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
Books,Books,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Books,Books,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Books,Books,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
Books,Books,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
Books,Books,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Books,Books,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Books,Books,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Books,Books,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Books,Books,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Books,Books,Subtitle,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Books,Books,Tagline,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Books,Books,ShortDescription,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Books,Books,Status,nvarchar,False,False,True,Represented; projection and semantic comparison still required
Books,Books,TargetWordCount,int,True,False,True,Represented; projection and semantic comparison still required
Books,Books,WritingStartDate,date,True,False,True,Represented; projection and semantic comparison still required
Books,Books,TargetCompletionDate,date,True,False,True,Represented; projection and semantic comparison still required
Books,Books,PublicationDate,date,True,False,True,Represented; projection and semantic comparison still required
Books,Books,CoverThumbnailPath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Books,Books,CoverStandardPath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Books,Books,UsesExplicitScenes,bit,False,False,True,Represented; projection and semantic comparison still required
Books,Books,StoryEra,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Books,Books,PrimaryLocaleCode,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,ChapterGoalID,int,False,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,ChapterID,int,False,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,GoalSummary,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,EmotionalGoal,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,ReaderTakeaway,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,MustInclude,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,RisksOrConcerns,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
ChapterGoals,ChapterGoals,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ChapterID,int,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,BookID,int,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ChapterNumber,decimal,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ChapterTitle,nvarchar,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,POVCharacterID,int,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,Summary,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,RevisionStatusID,int,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,IsLinkedToManuscript,bit,False,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ManuscriptDocumentID,int,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ExternalReference,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,LinkedUtc,datetime2,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,ChapterPurposeID,int,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,POVSource,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,POVConfidence,decimal,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,POVEvidence,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Chapters,Chapters,POVSuggestedName,nvarchar,True,False,True,Represented; projection and semantic comparison still required
CharacterAliases,CharacterAliases,CharacterAliasID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterAliases,CharacterAliases,CharacterID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterAliases,CharacterAliases,Alias,nvarchar,False,False,True,Represented; projection and semantic comparison still required
CharacterAliases,CharacterAliases,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
CharacterAliases,CharacterAliases,CreatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeEvents,CharacterAttributeEvents,CharacterAttributeEventID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeEvents,CharacterAttributeEvents,CharacterID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeEvents,CharacterAttributeEvents,CharacterAttributeTypeID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeEvents,CharacterAttributeEvents,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeEvents,CharacterAttributeEvents,AttributeValue,nvarchar,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeEvents,CharacterAttributeEvents,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
CharacterAttributeEvents,CharacterAttributeEvents,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeEvents,CharacterAttributeEvents,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeTypes,CharacterAttributeTypes,CharacterAttributeTypeID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeTypes,CharacterAttributeTypes,ProjectID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterAttributeTypes,CharacterAttributeTypes,AttributeName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeTypes,CharacterAttributeTypes,DataType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeTypes,CharacterAttributeTypes,IsNormallyStable,bit,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeTypes,CharacterAttributeTypes,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
CharacterAttributeTypes,CharacterAttributeTypes,IsActive,bit,False,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,CharacterKnowledgeID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,CharacterID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,StoryAssetID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,PlotThreadID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,KnowledgeStateID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,SourceEventID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
CharacterKnowledge,CharacterKnowledge,SourceReviewKey,nvarchar,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,CharacterRelationshipID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,CharacterAID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,CharacterBID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,RelationshipTypeID,int,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,IsPermanent,bit,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,StartSceneID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,EndSceneID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,IsKnownToReader,bit,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,IsInitialRelationship,bit,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,InitialBookID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,ReaderInitiallyKnows,bit,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,InitialRelationshipStateID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,InitialIntensity,int,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,IsReciprocal,bit,False,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
CharacterRelationships,CharacterRelationships,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,CharacterID,int,False,False,True,Represented; projection and semantic comparison still required
Characters,Characters,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
Characters,Characters,CharacterName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
Characters,Characters,ShortName,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,Sex,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,BirthDate,date,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,AgeAtSeriesStart,int,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,AgeReferenceSceneID,int,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,Height,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,EyeColour,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,CharacterImportance,int,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,DefaultDescription,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Characters,Characters,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Characters,Characters,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
Characters,Characters,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,ShowInQuickAddBar,bit,False,False,True,Represented; projection and semantic comparison still required
Characters,Characters,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,ImagePath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,ThumbnailPath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,AvatarSourceCharacterImageID,int,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,AvatarImagePath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,AvatarThumbnailPath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Characters,Characters,SexValueID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgementID,int,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,WarningType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,SceneID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,CharacterID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,AssetID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,AcknowledgedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,AcknowledgedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,SceneIDKey,int,False,True,False,Computed database value
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,CharacterIDKey,int,False,True,False,Computed database value
ContinuityWarningAcknowledgements,ContinuityWarningAcknowledgements,AssetIDKey,int,False,True,False,Computed database value
ContinuityWarnings,ContinuityWarnings,ContinuityWarningID,int,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,ValidationRunID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,BookID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,ChapterID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,SceneID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,EntityType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,EntityID,int,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,WarningTypeID,int,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,WarningSeverityID,int,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,Message,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,Details,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,IsDismissed,bit,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,IsIntentional,bit,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ContinuityWarnings,ContinuityWarnings,LastDetectedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,FloorPlanBlockID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,FloorPlanFloorID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,LocationID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,X,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,Y,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,WidthCells,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,HeightCells,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,BlockType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,LabelOverride,nvarchar,True,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
FloorPlanBlocks,FloorPlanBlocks,ModifiedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,FloorPlanFloorID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,FloorPlanID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,Name,nvarchar,False,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,GridWidth,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,GridHeight,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,ModifiedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,LocationID,int,True,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,BackgroundImagePath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,BackgroundImageOriginalFileName,nvarchar,True,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,BackgroundOpacity,decimal,True,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,BackgroundScale,decimal,True,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,BackgroundOffsetX,decimal,True,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,BackgroundOffsetY,decimal,True,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,BackgroundLocked,bit,False,False,True,Represented; projection and semantic comparison still required
FloorPlanFloors,FloorPlanFloors,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
FloorPlans,FloorPlans,FloorPlanID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlans,FloorPlans,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlans,FloorPlans,Name,nvarchar,False,False,True,Represented; projection and semantic comparison still required
FloorPlans,FloorPlans,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
FloorPlans,FloorPlans,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
FloorPlans,FloorPlans,ModifiedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
FloorPlans,FloorPlans,LocationID,int,True,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,FloorPlanTransitionID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,FloorPlanFloorID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,FromLocationID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,ToLocationID,int,False,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,TransitionType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,IsLocked,bit,False,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,DisplayLabel,nvarchar,True,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,ModifiedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
FloorPlanTransitions,FloorPlanTransitions,PositionWithinLocation,nvarchar,False,False,True,Represented; projection and semantic comparison still required
GenreMetricPresetMetrics,GenreMetricPresetMetrics,GenreMetricPresetID,int,False,False,True,Represented; projection and semantic comparison still required
GenreMetricPresetMetrics,GenreMetricPresetMetrics,MetricTypeID,int,False,False,True,Represented; projection and semantic comparison still required
GenreMetricPresetMetrics,GenreMetricPresetMetrics,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
GenreMetricPresets,GenreMetricPresets,GenreMetricPresetID,int,False,False,True,Represented; projection and semantic comparison still required
GenreMetricPresets,GenreMetricPresets,PresetKey,nvarchar,False,False,True,Represented; projection and semantic comparison still required
GenreMetricPresets,GenreMetricPresets,PresetName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
GenreMetricPresets,GenreMetricPresets,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
GenreMetricPresets,GenreMetricPresets,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
GenreMetricPresets,GenreMetricPresets,IsActive,bit,False,False,True,Represented; projection and semantic comparison still required
LocationAliases,LocationAliases,LocationAliasID,int,False,False,True,Represented; projection and semantic comparison still required
LocationAliases,LocationAliases,LocationID,int,False,False,True,Represented; projection and semantic comparison still required
LocationAliases,LocationAliases,Alias,nvarchar,False,False,True,Represented; projection and semantic comparison still required
LocationAliases,LocationAliases,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
LocationAliases,LocationAliases,CreatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,LocationRelationshipID,int,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,FromLocationID,int,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,ToLocationID,int,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,LocationRelationshipTypeID,int,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,IsBidirectional,bit,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,Strength,int,True,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,CanHearNormalSpeech,bit,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,CanHearLoudNoise,bit,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,CanSeeMovement,bit,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,CanSeeClearly,bit,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,CanTravelDirectly,bit,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
LocationRelationships,LocationRelationships,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
Locations,Locations,LocationID,int,False,False,True,Represented; projection and semantic comparison still required
Locations,Locations,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
Locations,Locations,ParentLocationID,int,True,False,True,Represented; projection and semantic comparison still required
Locations,Locations,LocationName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
Locations,Locations,LocationTypeID,int,True,False,True,Represented; projection and semantic comparison still required
Locations,Locations,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Locations,Locations,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Locations,Locations,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Locations,Locations,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
Locations,Locations,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
Locations,Locations,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Locations,Locations,ShowInQuickAddBar,bit,False,False,True,Represented; projection and semantic comparison still required
Locations,Locations,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Locations,Locations,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Locations,Locations,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Locations,Locations,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Locations,Locations,ExcludeFromCompanionDetection,bit,False,False,True,Represented; projection and semantic comparison still required
Locations,Locations,DetectionPriority,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,ManuscriptDocumentID,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,BookID,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,DocumentGuid,uniqueidentifier,False,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,BindingVersion,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,CreatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,LastSyncUtc,datetime2,True,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,LastOpenedUtc,datetime2,True,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,IsActive,bit,False,False,True,Represented; projection and semantic comparison still required
ManuscriptDocuments,ManuscriptDocuments,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,ChapterID,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,BookID,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,SourceText,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,SourceWordCount,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,SourceCharacterCount,int,False,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,ParagraphMapJson,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,CreatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,UpdatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,StructuralParsedJson,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,DefaultPovName,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ManuscriptStructuralChapterSources,ManuscriptStructuralChapterSources,ExplicitNarratorName,nvarchar,True,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,MapID,int,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,FeatureID,uniqueidentifier,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,Name,nvarchar,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,Type,nvarchar,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,GeometryClass,nvarchar,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,Layer,nvarchar,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,X,float,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,Y,float,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,Width,float,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,Height,float,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,Rotation,float,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,ZOrder,int,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,IsPlaced,bit,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,IsProvisional,bit,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,IsLocked,bit,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,ShowLabel,bit,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,LabelX,float,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,LabelY,float,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,LocationID,int,True,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,FloorPlanID,int,True,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,StartFeatureID,uniqueidentifier,True,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,EndFeatureID,uniqueidentifier,True,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,GeometryJson,nvarchar,False,False,True,Represented; projection and semantic comparison still required
MapFeatures,MapFeatures,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
MapJourneyNotes,MapJourneyNotes,MapID,int,False,False,True,Represented; projection and semantic comparison still required
MapJourneyNotes,MapJourneyNotes,CharacterID,int,False,False,True,Represented; projection and semantic comparison still required
MapJourneyNotes,MapJourneyNotes,FromSceneID,int,False,False,True,Represented; projection and semantic comparison still required
MapJourneyNotes,MapJourneyNotes,ToSceneID,int,False,False,True,Represented; projection and semantic comparison still required
MapJourneyNotes,MapJourneyNotes,RouteFeatureID,uniqueidentifier,True,False,True,Represented; projection and semantic comparison still required
MapJourneyNotes,MapJourneyNotes,TravelMethod,nvarchar,True,False,True,Represented; projection and semantic comparison still required
MapJourneyNotes,MapJourneyNotes,TypicalMinutes,int,True,False,True,Represented; projection and semantic comparison still required
MapReferenceImages,MapReferenceImages,ImageID,uniqueidentifier,False,False,True,Represented; projection and semantic comparison still required
MapReferenceImages,MapReferenceImages,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
MapReferenceImages,MapReferenceImages,OriginalFileName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
MapReferenceImages,MapReferenceImages,ContentType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
MapReferenceImages,MapReferenceImages,Width,int,False,False,True,Represented; projection and semantic comparison still required
MapReferenceImages,MapReferenceImages,Height,int,False,False,True,Represented; projection and semantic comparison still required
MapReferenceImages,MapReferenceImages,ImageData,varbinary,False,False,True,Represented; projection and semantic comparison still required
MapReferenceImages,MapReferenceImages,FileSizeBytes,bigint,True,True,True,Computed database value
MapReferenceImages,MapReferenceImages,ContentHash,binary,True,True,False,Computed database value
MapRelationships,MapRelationships,MapID,int,False,False,True,Represented; projection and semantic comparison still required
MapRelationships,MapRelationships,RelationshipID,uniqueidentifier,False,False,True,Represented; projection and semantic comparison still required
MapRelationships,MapRelationships,SourceID,uniqueidentifier,False,False,True,Represented; projection and semantic comparison still required
MapRelationships,MapRelationships,TargetID,uniqueidentifier,False,False,True,Represented; projection and semantic comparison still required
MapRelationships,MapRelationships,Direction,nvarchar,True,False,True,Represented; projection and semantic comparison still required
MapRelationships,MapRelationships,RelativeDistance,nvarchar,True,False,True,Represented; projection and semantic comparison still required
MapRelationships,MapRelationships,MeasuredDistance,decimal,True,False,True,Represented; projection and semantic comparison still required
MapRelationships,MapRelationships,Unit,nvarchar,True,False,True,Represented; projection and semantic comparison still required
MapRelationships,MapRelationships,TypicalTravelTime,nvarchar,True,False,True,Represented; projection and semantic comparison still required
MapRelationships,MapRelationships,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
PlotEventTargetPlotLines,PlotEventTargetPlotLines,PlotEventID,int,False,False,True,Represented; projection and semantic comparison still required
PlotEventTargetPlotLines,PlotEventTargetPlotLines,PlotLineID,int,False,False,True,Represented; projection and semantic comparison still required
PlotEventTargetPlotLines,PlotEventTargetPlotLines,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,PlotLineID,int,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,BookID,int,True,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,PlotLineName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,PlotLineTypeID,int,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,ParentPlotLineID,int,True,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,Colour,nvarchar,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,IsVisibleOnTimeline,bit,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,PlotImportanceID,int,False,False,True,Represented; projection and semantic comparison still required
PlotLines,PlotLines,EmergesFromPlotLineID,int,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,PlotThreadID,int,False,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,PlotLineID,int,False,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,ThreadTitle,nvarchar,False,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,ThreadTypeID,int,False,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,ThreadStatusID,int,False,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,Importance,int,False,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,Summary,nvarchar,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,IntroducedSceneID,int,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,PlannedResolutionSceneID,int,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,ActualResolutionSceneID,int,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
PlotThreads,PlotThreads,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Projects,Project,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
Projects,Project,ProjectName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
Projects,Project,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Projects,Project,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Projects,Project,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Projects,Project,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
Projects,Project,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
Projects,Project,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Projects,Project,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Projects,Project,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Projects,Project,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Projects,Project,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
ProjectTimelineMetricSettings,TimelineMetricSettings,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineMetricSettings,TimelineMetricSettings,MetricTypeID,int,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineMetricSettings,TimelineMetricSettings,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineMetricSettings,TimelineMetricSettings,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,ProjectTimelineSettingsID,int,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,ShowSceneCards,bit,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,ShowMetricShape,bit,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,ShowPlotLines,bit,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,ShowStoryAssets,bit,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,ShowCharacterAppearances,bit,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,ShowWarnings,bit,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ProjectTimelineSettings,TimelineSettings,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ProjectUserAccess,ProjectAccess,ProjectUserAccessID,int,False,False,True,Represented; projection and semantic comparison still required
ProjectUserAccess,ProjectAccess,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
ProjectUserAccess,ProjectAccess,UserID,int,False,False,True,Represented; projection and semantic comparison still required
ProjectUserAccess,ProjectAccess,AccessRole,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ProjectUserAccess,ProjectAccess,InvitedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
ProjectUserAccess,ProjectAccess,InvitedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
ProjectUserAccess,ProjectAccess,AcceptedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
ProjectUserAccess,ProjectAccess,IsActive,bit,False,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,RelationshipEventID,int,False,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,CharacterRelationshipID,int,False,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,RelationshipStateID,int,False,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,Intensity,int,True,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,IsKnownToOtherCharacter,bit,False,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
RelationshipEvents,RelationshipEvents,SourceReviewKey,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,ScenarioID,int,False,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,BookID,int,True,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,ScenarioName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,BaseCreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,IsAppliedToMain,bit,False,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
Scenarios,Scenarios,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ScenarioSceneOrder,ScenarioSceneOrder,ScenarioSceneOrderID,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioSceneOrder,ScenarioSceneOrder,ScenarioID,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioSceneOrder,ScenarioSceneOrder,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioSceneOrder,ScenarioSceneOrder,ProposedChapterID,int,True,False,True,Represented; projection and semantic comparison still required
ScenarioSceneOrder,ScenarioSceneOrder,ProposedSortOrder,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioSceneOrder,ScenarioSceneOrder,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ScenarioSceneOrder,ScenarioSceneOrder,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ScenarioSceneOrder,ScenarioSceneOrder,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ScenarioValidationRuns,ScenarioValidationRuns,ScenarioValidationRunID,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioValidationRuns,ScenarioValidationRuns,ScenarioID,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioValidationRuns,ScenarioValidationRuns,StartedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ScenarioValidationRuns,ScenarioValidationRuns,CompletedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
ScenarioValidationRuns,ScenarioValidationRuns,WarningCount,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,ScenarioWarningID,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,ScenarioValidationRunID,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,ScenarioID,int,False,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,SceneID,int,True,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,EntityType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,EntityID,int,True,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,WarningTypeName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,SeverityName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,Message,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,Details,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ScenarioWarnings,ScenarioWarnings,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneAssetLocations,SceneAssetLocations,SceneAssetLocationID,int,False,False,True,Represented; projection and semantic comparison still required
SceneAssetLocations,SceneAssetLocations,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneAssetLocations,SceneAssetLocations,StoryAssetID,int,False,False,True,Represented; projection and semantic comparison still required
SceneAssetLocations,SceneAssetLocations,LocationID,int,False,False,True,Represented; projection and semantic comparison still required
SceneAssetLocations,SceneAssetLocations,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneAssetLocations,SceneAssetLocations,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneAssetLocations,SceneAssetLocations,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,SceneAttachmentID,int,False,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,SceneAttachmentTypeID,int,False,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,Title,nvarchar,False,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,FilePath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,ExternalUrl,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
SceneAttachments,SceneAttachments,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,SceneCharacterID,int,False,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,CharacterID,int,False,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,RoleInSceneTypeID,int,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,PresenceTypeID,int,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,LocationID,int,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,EntryLocationID,int,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,ExitLocationID,int,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,AppearanceNotes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,OutfitDescription,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,PhysicalCondition,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,EmotionalState,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,KnowledgeNotes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,MatchSource,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,MatchedText,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,OccurrenceCount,int,True,False,True,Represented; projection and semantic comparison still required
SceneCharacters,SceneCharacters,FirstOccurrenceIndex,int,True,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,SceneChecklistItemID,int,False,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,ItemText,nvarchar,False,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,IsCompleted,bit,False,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,SortOrder,int,True,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
SceneChecklistItems,SceneChecklistItems,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,SceneDependencyID,int,False,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,SourceSceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,TargetSceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,SceneDependencyTypeID,int,False,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,ProjectID,int,True,False,True,Represented; projection and semantic comparison still required
SceneDependencies,SceneDependencies,IsHardDependency,bit,False,False,True,Represented; projection and semantic comparison still required
SceneFloorPlanOccupancy,SceneFloorPlanOccupancy,SceneFloorPlanOccupancyID,int,False,False,True,Represented; projection and semantic comparison still required
SceneFloorPlanOccupancy,SceneFloorPlanOccupancy,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneFloorPlanOccupancy,SceneFloorPlanOccupancy,FloorPlanID,int,False,False,True,Represented; projection and semantic comparison still required
SceneFloorPlanOccupancy,SceneFloorPlanOccupancy,FloorPlanFloorID,int,True,False,True,Represented; projection and semantic comparison still required
SceneFloorPlanOccupancy,SceneFloorPlanOccupancy,CharacterID,int,True,False,True,Represented; projection and semantic comparison still required
SceneFloorPlanOccupancy,SceneFloorPlanOccupancy,StoryAssetID,int,True,False,True,Represented; projection and semantic comparison still required
SceneFloorPlanOccupancy,SceneFloorPlanOccupancy,LocationID,int,False,False,True,Represented; projection and semantic comparison still required
SceneFloorPlanOccupancy,SceneFloorPlanOccupancy,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneFloorPlanOccupancy,SceneFloorPlanOccupancy,ModifiedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,BookID,int,False,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,ChapterID,int,False,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,SourceText,nvarchar,False,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,SourceWordCount,int,False,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,SourceCharacterCount,int,False,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,SourceStartParagraph,int,True,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,SourceEndParagraph,int,True,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,WordStartParagraphIndex,int,True,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,WordEndParagraphIndex,int,True,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,SourceKind,nvarchar,False,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,CreatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneManuscriptSources,SceneManuscriptSources,UpdatedUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneMetricTypes,SceneMetricTypes,MetricTypeID,int,False,False,True,Represented; projection and semantic comparison still required
SceneMetricTypes,SceneMetricTypes,ProjectID,int,True,False,True,Represented; projection and semantic comparison still required
SceneMetricTypes,SceneMetricTypes,MetricName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
SceneMetricTypes,SceneMetricTypes,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneMetricTypes,SceneMetricTypes,MinValue,int,False,False,True,Represented; projection and semantic comparison still required
SceneMetricTypes,SceneMetricTypes,MaxValue,int,False,False,True,Represented; projection and semantic comparison still required
SceneMetricTypes,SceneMetricTypes,DefaultValue,int,False,False,True,Represented; projection and semantic comparison still required
SceneMetricTypes,SceneMetricTypes,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
SceneMetricTypes,SceneMetricTypes,IsActive,bit,False,False,True,Represented; projection and semantic comparison still required
SceneMetricValues,SceneMetricValues,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneMetricValues,SceneMetricValues,MetricTypeID,int,False,False,True,Represented; projection and semantic comparison still required
SceneMetricValues,SceneMetricValues,Value,int,False,False,True,Represented; projection and semantic comparison still required
SceneMetricValues,SceneMetricValues,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,SceneNoteID,int,False,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,SceneNoteTypeID,int,False,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,NoteTitle,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,NoteText,nvarchar,False,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,SortOrder,int,True,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,IsPinned,bit,False,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,IsResolved,bit,False,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
SceneNotes,SceneNotes,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
SceneOutcomes,SceneOutcomes,SceneOutcomeID,int,False,False,True,Represented; projection and semantic comparison still required
SceneOutcomes,SceneOutcomes,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneOutcomes,SceneOutcomes,OutcomeDescription,nvarchar,False,False,True,Represented; projection and semantic comparison still required
SceneOutcomes,SceneOutcomes,OutcomeTypeID,int,True,False,True,Represented; projection and semantic comparison still required
SceneOutcomes,SceneOutcomes,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneOutcomes,SceneOutcomes,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ScenePurposes,ScenePurposes,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
ScenePurposes,ScenePurposes,ScenePurposeTypeID,int,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ChapterID,int,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,SceneNumber,decimal,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,SceneTitle,nvarchar,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,Summary,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,POVCharacterID,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,PrimaryLocationID,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,SortOrder,int,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,TimeModeID,int,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,StartDateTime,datetime2,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,EndDateTime,datetime2,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,DurationAmount,decimal,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,DurationUnitID,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,RelativeTimeText,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,TimeConfidenceID,int,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ScenePurposeNotes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,SceneOutcomeNotes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,RevisionStatusID,int,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,FloorPlanID,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,InitialFloorPlanFloorID,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,IsLinkedToManuscript,bit,False,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ManuscriptDocumentID,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ExternalReference,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,LinkedUtc,datetime2,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ImportSource,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,ImportRunID,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,SourceStartParagraph,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,SourceEndParagraph,int,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,StructuralSummary,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,SceneTitleSource,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,POVSource,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,POVConfidence,decimal,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,POVEvidence,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,POVSuggestedName,nvarchar,True,False,True,Represented; projection and semantic comparison still required
Scenes,Scenes,StructuralSetting,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,SceneWorkflowID,int,False,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,DraftStatus,nvarchar,False,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,EstimatedWordCount,int,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,ActualWordCount,int,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,DraftedDate,date,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,LastWorkedOn,date,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,ReadyForDraft,bit,False,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,ReadyForRevision,bit,False,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,ReadyForPolish,bit,False,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,IsBlocked,bit,False,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,BlockedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,Priority,int,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
SceneWorkflow,SceneWorkflow,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,StoryAssetID,int,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,AssetName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,AssetKindID,int,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,Description,nvarchar,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,Importance,int,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,CurrentStateID,int,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,CurrentLocationID,int,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,IsResolved,bit,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,ArchivedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,ArchivedReason,nvarchar,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,ShowInQuickAddBar,bit,False,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,ImagePath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
StoryAssets,StoryAssets,ThumbnailPath,nvarchar,True,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,MapID,int,False,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,ParentMapID,int,True,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,ParentFeatureID,uniqueidentifier,True,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,Name,nvarchar,False,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,Kind,nvarchar,False,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,Revision,int,False,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,ModifiedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,AppearanceJson,nvarchar,False,False,True,Represented; projection and semantic comparison still required
StoryMaps,StoryMaps,ReferenceJson,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,ThreadEventID,int,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,PlotThreadID,int,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,EventTypeID,int,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,EventTitle,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,EventDescription,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,CreatedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,ModifiedByUserID,int,True,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,CreatedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,ModifiedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,PlotEventTypeID,int,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,TargetPlotLineID,int,True,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,Source,nvarchar,False,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,SourceReferenceID,int,True,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,SourceKey,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ThreadEvents,ThreadEvents,Confidence,decimal,True,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,TimelineViewPresetID,int,False,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,BookID,int,True,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,PresetName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,FilterJson,nvarchar,False,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,VisibilityJson,nvarchar,False,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,FocusType,nvarchar,True,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,FocusID,int,True,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,CreatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,UpdatedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
TimelineViewPresets,TimelineViewPresets,IsArchived,bit,False,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,UserFileID,bigint,False,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,UserID,int,False,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,ProjectID,int,True,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,EntityType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,EntityID,int,False,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,FileName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,OriginalFileName,nvarchar,True,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,ContentType,nvarchar,True,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,FileSizeBytes,bigint,False,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,StoragePath,nvarchar,False,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,UploadedDateUTC,datetime2,False,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,DeletedDateUTC,datetime2,True,False,True,Represented; projection and semantic comparison still required
UserFile,UserFiles,IsDeleted,bit,False,False,True,Represented; projection and semantic comparison still required
ValidationRuns,ValidationRuns,ValidationRunID,int,False,False,True,Represented; projection and semantic comparison still required
ValidationRuns,ValidationRuns,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
ValidationRuns,ValidationRuns,BookID,int,True,False,True,Represented; projection and semantic comparison still required
ValidationRuns,ValidationRuns,StartedDate,datetime2,False,False,True,Represented; projection and semantic comparison still required
ValidationRuns,ValidationRuns,CompletedDate,datetime2,True,False,True,Represented; projection and semantic comparison still required
ValidationRuns,ValidationRuns,TriggeredBy,nvarchar,True,False,True,Represented; projection and semantic comparison still required
ValidationRuns,ValidationRuns,ScopeDescription,nvarchar,True,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,WritingPlanID,int,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,UserID,int,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,ProjectID,int,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,BookID,int,True,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,PlanName,nvarchar,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,GoalType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,StartDate,date,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,DeadlineDate,date,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,AvailableDaysJson,nvarchar,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,SessionLengthMinutes,int,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,IncludeBlockedScenes,bit,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,RebalanceMode,nvarchar,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,IsActive,bit,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,CreatedDateUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
WritingPlans,WritingPlans,ModifiedDateUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,WritingScheduleItemID,int,False,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,WritingPlanID,int,False,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,SceneID,int,False,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,ScheduledDate,date,False,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,TaskType,nvarchar,False,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,EstimatedMinutes,int,True,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,TargetWords,int,True,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,ScheduleStatus,nvarchar,False,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,CompletedDateUtc,datetime2,True,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,Notes,nvarchar,True,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,CreatedDateUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
WritingScheduleItems,WritingScheduleItems,ModifiedDateUtc,datetime2,False,False,True,Represented; projection and semantic comparison still required
1 Table Collection Column SqlType Nullable Computed WritableModelProperty Classification
2 AssetAliases AssetAliases AssetAliasID int False False True Represented; projection and semantic comparison still required
3 AssetAliases AssetAliases StoryAssetID int False False True Represented; projection and semantic comparison still required
4 AssetAliases AssetAliases Alias nvarchar False False True Represented; projection and semantic comparison still required
5 AssetAliases AssetAliases SortOrder int False False True Represented; projection and semantic comparison still required
6 AssetAliases AssetAliases CreatedUtc datetime2 False False True Represented; projection and semantic comparison still required
7 AssetCustodyEventCharacters AssetCustodyCharacters AssetCustodyEventCharacterID int False False True Represented; projection and semantic comparison still required
8 AssetCustodyEventCharacters AssetCustodyCharacters AssetCustodyEventID int False False True Represented; projection and semantic comparison still required
9 AssetCustodyEventCharacters AssetCustodyCharacters CharacterID int True False True Represented; projection and semantic comparison still required
10 AssetCustodyEventCharacters AssetCustodyCharacters CharacterNameText nvarchar True False True Represented; projection and semantic comparison still required
11 AssetCustodyEventCharacters AssetCustodyCharacters CustodyRoleID int False False True Represented; projection and semantic comparison still required
12 AssetCustodyEvents AssetCustodyEvents AssetCustodyEventID int False False True Represented; projection and semantic comparison still required
13 AssetCustodyEvents AssetCustodyEvents StoryAssetID int False False True Represented; projection and semantic comparison still required
14 AssetCustodyEvents AssetCustodyEvents SceneID int False False True Represented; projection and semantic comparison still required
15 AssetCustodyEvents AssetCustodyEvents AssetCustodyEventTypeID int False False True Represented; projection and semantic comparison still required
16 AssetCustodyEvents AssetCustodyEvents Description nvarchar True False True Represented; projection and semantic comparison still required
17 AssetCustodyEvents AssetCustodyEvents CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
18 AssetCustodyEvents AssetCustodyEvents UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
19 AssetDependencies AssetDependencies AssetDependencyID int False False True Represented; projection and semantic comparison still required
20 AssetDependencies AssetDependencies SourceAssetID int False False True Represented; projection and semantic comparison still required
21 AssetDependencies AssetDependencies TargetAssetID int False False True Represented; projection and semantic comparison still required
22 AssetDependencies AssetDependencies AssetDependencyTypeID int False False True Represented; projection and semantic comparison still required
23 AssetDependencies AssetDependencies SourceRequiredStateID int True False True Represented; projection and semantic comparison still required
24 AssetDependencies AssetDependencies TargetBlockedStateID int True False True Represented; projection and semantic comparison still required
25 AssetDependencies AssetDependencies Description nvarchar True False True Represented; projection and semantic comparison still required
26 AssetDependencies AssetDependencies CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
27 AssetDependencies AssetDependencies UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
28 AssetDependencies AssetDependencies IsArchived bit False False True Represented; projection and semantic comparison still required
29 AssetEvents AssetEvents AssetEventID int False False True Represented; projection and semantic comparison still required
30 AssetEvents AssetEvents StoryAssetID int False False True Represented; projection and semantic comparison still required
31 AssetEvents AssetEvents SceneID int False False True Represented; projection and semantic comparison still required
32 AssetEvents AssetEvents AssetEventTypeID int False False True Represented; projection and semantic comparison still required
33 AssetEvents AssetEvents FromStateID int True False True Represented; projection and semantic comparison still required
34 AssetEvents AssetEvents ToStateID int True False True Represented; projection and semantic comparison still required
35 AssetEvents AssetEvents EventTitle nvarchar False False True Represented; projection and semantic comparison still required
36 AssetEvents AssetEvents EventDescription nvarchar True False True Represented; projection and semantic comparison still required
37 AssetEvents AssetEvents CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
38 AssetEvents AssetEvents UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
39 AssetEvents AssetEvents CreatedByUserID int True False True Represented; projection and semantic comparison still required
40 AssetEvents AssetEvents ModifiedByUserID int True False True Represented; projection and semantic comparison still required
41 AssetEvents AssetEvents CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
42 AssetEvents AssetEvents ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
43 AssetStates AssetStates AssetStateID int False False True Represented; projection and semantic comparison still required
44 AssetStates AssetStates ProjectID int True False True Represented; projection and semantic comparison still required
45 AssetStates AssetStates AssetKindID int True False True Represented; projection and semantic comparison still required
46 AssetStates AssetStates StateName nvarchar False False True Represented; projection and semantic comparison still required
47 AssetStates AssetStates SortOrder int False False True Represented; projection and semantic comparison still required
48 AssetStates AssetStates Description nvarchar True False True Represented; projection and semantic comparison still required
49 AssetStates AssetStates IsResolvedState bit False False True Represented; projection and semantic comparison still required
50 AssetStates AssetStates IsActive bit False False True Represented; projection and semantic comparison still required
51 AuthorPlotSeeds AuthorPlotSeeds AuthorPlotSeedID int False False True Represented; projection and semantic comparison still required
52 AuthorPlotSeeds AuthorPlotSeeds ProjectID int False False True Represented; projection and semantic comparison still required
53 AuthorPlotSeeds AuthorPlotSeeds BookID int False False True Represented; projection and semantic comparison still required
54 AuthorPlotSeeds AuthorPlotSeeds Description nvarchar False False True Represented; projection and semantic comparison still required
55 AuthorPlotSeeds AuthorPlotSeeds Status nvarchar False False True Represented; projection and semantic comparison still required
56 AuthorPlotSeeds AuthorPlotSeeds MatchedPlotLineID int True False True Represented; projection and semantic comparison still required
57 AuthorPlotSeeds AuthorPlotSeeds Source nvarchar False False True Represented; projection and semantic comparison still required
58 AuthorPlotSeeds AuthorPlotSeeds CreatedUtc datetime2 False False True Represented; projection and semantic comparison still required
59 AuthorPlotSeeds AuthorPlotSeeds UpdatedUtc datetime2 False False True Represented; projection and semantic comparison still required
60 Books Books BookID int False False True Represented; projection and semantic comparison still required
61 Books Books ProjectID int False False True Represented; projection and semantic comparison still required
62 Books Books BookTitle nvarchar False False True Represented; projection and semantic comparison still required
63 Books Books BookNumber int False False True Represented; projection and semantic comparison still required
64 Books Books Description nvarchar True False True Represented; projection and semantic comparison still required
65 Books Books SortOrder int False False True Represented; projection and semantic comparison still required
66 Books Books CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
67 Books Books UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
68 Books Books IsArchived bit False False True Represented; projection and semantic comparison still required
69 Books Books ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
70 Books Books ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
71 Books Books CreatedByUserID int True False True Represented; projection and semantic comparison still required
72 Books Books ModifiedByUserID int True False True Represented; projection and semantic comparison still required
73 Books Books CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
74 Books Books ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
75 Books Books Subtitle nvarchar True False True Represented; projection and semantic comparison still required
76 Books Books Tagline nvarchar True False True Represented; projection and semantic comparison still required
77 Books Books ShortDescription nvarchar True False True Represented; projection and semantic comparison still required
78 Books Books Status nvarchar False False True Represented; projection and semantic comparison still required
79 Books Books TargetWordCount int True False True Represented; projection and semantic comparison still required
80 Books Books WritingStartDate date True False True Represented; projection and semantic comparison still required
81 Books Books TargetCompletionDate date True False True Represented; projection and semantic comparison still required
82 Books Books PublicationDate date True False True Represented; projection and semantic comparison still required
83 Books Books CoverThumbnailPath nvarchar True False True Represented; projection and semantic comparison still required
84 Books Books CoverStandardPath nvarchar True False True Represented; projection and semantic comparison still required
85 Books Books UsesExplicitScenes bit False False True Represented; projection and semantic comparison still required
86 Books Books StoryEra nvarchar True False True Represented; projection and semantic comparison still required
87 Books Books PrimaryLocaleCode nvarchar True False True Represented; projection and semantic comparison still required
88 ChapterGoals ChapterGoals ChapterGoalID int False False True Represented; projection and semantic comparison still required
89 ChapterGoals ChapterGoals ChapterID int False False True Represented; projection and semantic comparison still required
90 ChapterGoals ChapterGoals GoalSummary nvarchar True False True Represented; projection and semantic comparison still required
91 ChapterGoals ChapterGoals EmotionalGoal nvarchar True False True Represented; projection and semantic comparison still required
92 ChapterGoals ChapterGoals ReaderTakeaway nvarchar True False True Represented; projection and semantic comparison still required
93 ChapterGoals ChapterGoals MustInclude nvarchar True False True Represented; projection and semantic comparison still required
94 ChapterGoals ChapterGoals RisksOrConcerns nvarchar True False True Represented; projection and semantic comparison still required
95 ChapterGoals ChapterGoals CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
96 ChapterGoals ChapterGoals UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
97 ChapterGoals ChapterGoals CreatedByUserID int True False True Represented; projection and semantic comparison still required
98 ChapterGoals ChapterGoals ModifiedByUserID int True False True Represented; projection and semantic comparison still required
99 ChapterGoals ChapterGoals CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
100 ChapterGoals ChapterGoals ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
101 Chapters Chapters ChapterID int False False True Represented; projection and semantic comparison still required
102 Chapters Chapters BookID int False False True Represented; projection and semantic comparison still required
103 Chapters Chapters ChapterNumber decimal False False True Represented; projection and semantic comparison still required
104 Chapters Chapters ChapterTitle nvarchar False False True Represented; projection and semantic comparison still required
105 Chapters Chapters POVCharacterID int True False True Represented; projection and semantic comparison still required
106 Chapters Chapters Summary nvarchar True False True Represented; projection and semantic comparison still required
107 Chapters Chapters SortOrder int False False True Represented; projection and semantic comparison still required
108 Chapters Chapters RevisionStatusID int False False True Represented; projection and semantic comparison still required
109 Chapters Chapters CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
110 Chapters Chapters UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
111 Chapters Chapters IsArchived bit False False True Represented; projection and semantic comparison still required
112 Chapters Chapters ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
113 Chapters Chapters ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
114 Chapters Chapters CreatedByUserID int True False True Represented; projection and semantic comparison still required
115 Chapters Chapters ModifiedByUserID int True False True Represented; projection and semantic comparison still required
116 Chapters Chapters CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
117 Chapters Chapters ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
118 Chapters Chapters IsLinkedToManuscript bit False False True Represented; projection and semantic comparison still required
119 Chapters Chapters ManuscriptDocumentID int True False True Represented; projection and semantic comparison still required
120 Chapters Chapters ExternalReference nvarchar True False True Represented; projection and semantic comparison still required
121 Chapters Chapters LinkedUtc datetime2 True False True Represented; projection and semantic comparison still required
122 Chapters Chapters ChapterPurposeID int True False True Represented; projection and semantic comparison still required
123 Chapters Chapters POVSource nvarchar True False True Represented; projection and semantic comparison still required
124 Chapters Chapters POVConfidence decimal True False True Represented; projection and semantic comparison still required
125 Chapters Chapters POVEvidence nvarchar True False True Represented; projection and semantic comparison still required
126 Chapters Chapters POVSuggestedName nvarchar True False True Represented; projection and semantic comparison still required
127 CharacterAliases CharacterAliases CharacterAliasID int False False True Represented; projection and semantic comparison still required
128 CharacterAliases CharacterAliases CharacterID int False False True Represented; projection and semantic comparison still required
129 CharacterAliases CharacterAliases Alias nvarchar False False True Represented; projection and semantic comparison still required
130 CharacterAliases CharacterAliases SortOrder int False False True Represented; projection and semantic comparison still required
131 CharacterAliases CharacterAliases CreatedUtc datetime2 False False True Represented; projection and semantic comparison still required
132 CharacterAttributeEvents CharacterAttributeEvents CharacterAttributeEventID int False False True Represented; projection and semantic comparison still required
133 CharacterAttributeEvents CharacterAttributeEvents CharacterID int False False True Represented; projection and semantic comparison still required
134 CharacterAttributeEvents CharacterAttributeEvents CharacterAttributeTypeID int False False True Represented; projection and semantic comparison still required
135 CharacterAttributeEvents CharacterAttributeEvents SceneID int False False True Represented; projection and semantic comparison still required
136 CharacterAttributeEvents CharacterAttributeEvents AttributeValue nvarchar False False True Represented; projection and semantic comparison still required
137 CharacterAttributeEvents CharacterAttributeEvents Description nvarchar True False True Represented; projection and semantic comparison still required
138 CharacterAttributeEvents CharacterAttributeEvents CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
139 CharacterAttributeEvents CharacterAttributeEvents UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
140 CharacterAttributeTypes CharacterAttributeTypes CharacterAttributeTypeID int False False True Represented; projection and semantic comparison still required
141 CharacterAttributeTypes CharacterAttributeTypes ProjectID int True False True Represented; projection and semantic comparison still required
142 CharacterAttributeTypes CharacterAttributeTypes AttributeName nvarchar False False True Represented; projection and semantic comparison still required
143 CharacterAttributeTypes CharacterAttributeTypes DataType nvarchar False False True Represented; projection and semantic comparison still required
144 CharacterAttributeTypes CharacterAttributeTypes IsNormallyStable bit False False True Represented; projection and semantic comparison still required
145 CharacterAttributeTypes CharacterAttributeTypes SortOrder int False False True Represented; projection and semantic comparison still required
146 CharacterAttributeTypes CharacterAttributeTypes IsActive bit False False True Represented; projection and semantic comparison still required
147 CharacterKnowledge CharacterKnowledge CharacterKnowledgeID int False False True Represented; projection and semantic comparison still required
148 CharacterKnowledge CharacterKnowledge CharacterID int False False True Represented; projection and semantic comparison still required
149 CharacterKnowledge CharacterKnowledge StoryAssetID int True False True Represented; projection and semantic comparison still required
150 CharacterKnowledge CharacterKnowledge PlotThreadID int True False True Represented; projection and semantic comparison still required
151 CharacterKnowledge CharacterKnowledge SceneID int False False True Represented; projection and semantic comparison still required
152 CharacterKnowledge CharacterKnowledge KnowledgeStateID int False False True Represented; projection and semantic comparison still required
153 CharacterKnowledge CharacterKnowledge SourceEventID int True False True Represented; projection and semantic comparison still required
154 CharacterKnowledge CharacterKnowledge Description nvarchar True False True Represented; projection and semantic comparison still required
155 CharacterKnowledge CharacterKnowledge CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
156 CharacterKnowledge CharacterKnowledge UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
157 CharacterKnowledge CharacterKnowledge SourceReviewKey nvarchar True False True Represented; projection and semantic comparison still required
158 CharacterRelationships CharacterRelationships CharacterRelationshipID int False False True Represented; projection and semantic comparison still required
159 CharacterRelationships CharacterRelationships ProjectID int False False True Represented; projection and semantic comparison still required
160 CharacterRelationships CharacterRelationships CharacterAID int False False True Represented; projection and semantic comparison still required
161 CharacterRelationships CharacterRelationships CharacterBID int False False True Represented; projection and semantic comparison still required
162 CharacterRelationships CharacterRelationships RelationshipTypeID int False False True Represented; projection and semantic comparison still required
163 CharacterRelationships CharacterRelationships IsPermanent bit False False True Represented; projection and semantic comparison still required
164 CharacterRelationships CharacterRelationships StartSceneID int True False True Represented; projection and semantic comparison still required
165 CharacterRelationships CharacterRelationships EndSceneID int True False True Represented; projection and semantic comparison still required
166 CharacterRelationships CharacterRelationships IsKnownToReader bit False False True Represented; projection and semantic comparison still required
167 CharacterRelationships CharacterRelationships Notes nvarchar True False True Represented; projection and semantic comparison still required
168 CharacterRelationships CharacterRelationships CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
169 CharacterRelationships CharacterRelationships UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
170 CharacterRelationships CharacterRelationships IsArchived bit False False True Represented; projection and semantic comparison still required
171 CharacterRelationships CharacterRelationships ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
172 CharacterRelationships CharacterRelationships ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
173 CharacterRelationships CharacterRelationships IsInitialRelationship bit False False True Represented; projection and semantic comparison still required
174 CharacterRelationships CharacterRelationships InitialBookID int True False True Represented; projection and semantic comparison still required
175 CharacterRelationships CharacterRelationships ReaderInitiallyKnows bit False False True Represented; projection and semantic comparison still required
176 CharacterRelationships CharacterRelationships InitialRelationshipStateID int True False True Represented; projection and semantic comparison still required
177 CharacterRelationships CharacterRelationships InitialIntensity int True False True Represented; projection and semantic comparison still required
178 CharacterRelationships CharacterRelationships IsReciprocal bit False False True Represented; projection and semantic comparison still required
179 CharacterRelationships CharacterRelationships CreatedByUserID int True False True Represented; projection and semantic comparison still required
180 CharacterRelationships CharacterRelationships ModifiedByUserID int True False True Represented; projection and semantic comparison still required
181 CharacterRelationships CharacterRelationships CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
182 CharacterRelationships CharacterRelationships ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
183 Characters Characters CharacterID int False False True Represented; projection and semantic comparison still required
184 Characters Characters ProjectID int False False True Represented; projection and semantic comparison still required
185 Characters Characters CharacterName nvarchar False False True Represented; projection and semantic comparison still required
186 Characters Characters ShortName nvarchar True False True Represented; projection and semantic comparison still required
187 Characters Characters Sex nvarchar True False True Represented; projection and semantic comparison still required
188 Characters Characters BirthDate date True False True Represented; projection and semantic comparison still required
189 Characters Characters AgeAtSeriesStart int True False True Represented; projection and semantic comparison still required
190 Characters Characters AgeReferenceSceneID int True False True Represented; projection and semantic comparison still required
191 Characters Characters Height nvarchar True False True Represented; projection and semantic comparison still required
192 Characters Characters EyeColour nvarchar True False True Represented; projection and semantic comparison still required
193 Characters Characters CharacterImportance int True False True Represented; projection and semantic comparison still required
194 Characters Characters DefaultDescription nvarchar True False True Represented; projection and semantic comparison still required
195 Characters Characters CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
196 Characters Characters UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
197 Characters Characters IsArchived bit False False True Represented; projection and semantic comparison still required
198 Characters Characters ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
199 Characters Characters ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
200 Characters Characters ShowInQuickAddBar bit False False True Represented; projection and semantic comparison still required
201 Characters Characters CreatedByUserID int True False True Represented; projection and semantic comparison still required
202 Characters Characters ModifiedByUserID int True False True Represented; projection and semantic comparison still required
203 Characters Characters CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
204 Characters Characters ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
205 Characters Characters ImagePath nvarchar True False True Represented; projection and semantic comparison still required
206 Characters Characters ThumbnailPath nvarchar True False True Represented; projection and semantic comparison still required
207 Characters Characters AvatarSourceCharacterImageID int True False True Represented; projection and semantic comparison still required
208 Characters Characters AvatarImagePath nvarchar True False True Represented; projection and semantic comparison still required
209 Characters Characters AvatarThumbnailPath nvarchar True False True Represented; projection and semantic comparison still required
210 Characters Characters SexValueID int True False True Represented; projection and semantic comparison still required
211 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements ContinuityWarningAcknowledgementID int False False True Represented; projection and semantic comparison still required
212 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements ProjectID int False False True Represented; projection and semantic comparison still required
213 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements WarningType nvarchar False False True Represented; projection and semantic comparison still required
214 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements SceneID int True False True Represented; projection and semantic comparison still required
215 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements CharacterID int True False True Represented; projection and semantic comparison still required
216 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements AssetID int True False True Represented; projection and semantic comparison still required
217 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements AcknowledgedDate datetime2 False False True Represented; projection and semantic comparison still required
218 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements AcknowledgedByUserID int True False True Represented; projection and semantic comparison still required
219 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements Notes nvarchar True False True Represented; projection and semantic comparison still required
220 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements SceneIDKey int False True False Computed database value
221 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements CharacterIDKey int False True False Computed database value
222 ContinuityWarningAcknowledgements ContinuityWarningAcknowledgements AssetIDKey int False True False Computed database value
223 ContinuityWarnings ContinuityWarnings ContinuityWarningID int False False True Represented; projection and semantic comparison still required
224 ContinuityWarnings ContinuityWarnings ValidationRunID int True False True Represented; projection and semantic comparison still required
225 ContinuityWarnings ContinuityWarnings ProjectID int False False True Represented; projection and semantic comparison still required
226 ContinuityWarnings ContinuityWarnings BookID int True False True Represented; projection and semantic comparison still required
227 ContinuityWarnings ContinuityWarnings ChapterID int True False True Represented; projection and semantic comparison still required
228 ContinuityWarnings ContinuityWarnings SceneID int True False True Represented; projection and semantic comparison still required
229 ContinuityWarnings ContinuityWarnings EntityType nvarchar False False True Represented; projection and semantic comparison still required
230 ContinuityWarnings ContinuityWarnings EntityID int True False True Represented; projection and semantic comparison still required
231 ContinuityWarnings ContinuityWarnings WarningTypeID int False False True Represented; projection and semantic comparison still required
232 ContinuityWarnings ContinuityWarnings WarningSeverityID int False False True Represented; projection and semantic comparison still required
233 ContinuityWarnings ContinuityWarnings Message nvarchar False False True Represented; projection and semantic comparison still required
234 ContinuityWarnings ContinuityWarnings Details nvarchar True False True Represented; projection and semantic comparison still required
235 ContinuityWarnings ContinuityWarnings IsDismissed bit False False True Represented; projection and semantic comparison still required
236 ContinuityWarnings ContinuityWarnings IsIntentional bit False False True Represented; projection and semantic comparison still required
237 ContinuityWarnings ContinuityWarnings CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
238 ContinuityWarnings ContinuityWarnings LastDetectedDate datetime2 False False True Represented; projection and semantic comparison still required
239 FloorPlanBlocks FloorPlanBlocks FloorPlanBlockID int False False True Represented; projection and semantic comparison still required
240 FloorPlanBlocks FloorPlanBlocks FloorPlanFloorID int False False True Represented; projection and semantic comparison still required
241 FloorPlanBlocks FloorPlanBlocks LocationID int False False True Represented; projection and semantic comparison still required
242 FloorPlanBlocks FloorPlanBlocks X int False False True Represented; projection and semantic comparison still required
243 FloorPlanBlocks FloorPlanBlocks Y int False False True Represented; projection and semantic comparison still required
244 FloorPlanBlocks FloorPlanBlocks WidthCells int False False True Represented; projection and semantic comparison still required
245 FloorPlanBlocks FloorPlanBlocks HeightCells int False False True Represented; projection and semantic comparison still required
246 FloorPlanBlocks FloorPlanBlocks BlockType nvarchar False False True Represented; projection and semantic comparison still required
247 FloorPlanBlocks FloorPlanBlocks LabelOverride nvarchar True False True Represented; projection and semantic comparison still required
248 FloorPlanBlocks FloorPlanBlocks Notes nvarchar True False True Represented; projection and semantic comparison still required
249 FloorPlanBlocks FloorPlanBlocks CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
250 FloorPlanBlocks FloorPlanBlocks ModifiedDate datetime2 True False True Represented; projection and semantic comparison still required
251 FloorPlanFloors FloorPlanFloors FloorPlanFloorID int False False True Represented; projection and semantic comparison still required
252 FloorPlanFloors FloorPlanFloors FloorPlanID int False False True Represented; projection and semantic comparison still required
253 FloorPlanFloors FloorPlanFloors Name nvarchar False False True Represented; projection and semantic comparison still required
254 FloorPlanFloors FloorPlanFloors SortOrder int False False True Represented; projection and semantic comparison still required
255 FloorPlanFloors FloorPlanFloors GridWidth int False False True Represented; projection and semantic comparison still required
256 FloorPlanFloors FloorPlanFloors GridHeight int False False True Represented; projection and semantic comparison still required
257 FloorPlanFloors FloorPlanFloors CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
258 FloorPlanFloors FloorPlanFloors ModifiedDate datetime2 True False True Represented; projection and semantic comparison still required
259 FloorPlanFloors FloorPlanFloors LocationID int True False True Represented; projection and semantic comparison still required
260 FloorPlanFloors FloorPlanFloors BackgroundImagePath nvarchar True False True Represented; projection and semantic comparison still required
261 FloorPlanFloors FloorPlanFloors BackgroundImageOriginalFileName nvarchar True False True Represented; projection and semantic comparison still required
262 FloorPlanFloors FloorPlanFloors BackgroundOpacity decimal True False True Represented; projection and semantic comparison still required
263 FloorPlanFloors FloorPlanFloors BackgroundScale decimal True False True Represented; projection and semantic comparison still required
264 FloorPlanFloors FloorPlanFloors BackgroundOffsetX decimal True False True Represented; projection and semantic comparison still required
265 FloorPlanFloors FloorPlanFloors BackgroundOffsetY decimal True False True Represented; projection and semantic comparison still required
266 FloorPlanFloors FloorPlanFloors BackgroundLocked bit False False True Represented; projection and semantic comparison still required
267 FloorPlanFloors FloorPlanFloors Description nvarchar True False True Represented; projection and semantic comparison still required
268 FloorPlans FloorPlans FloorPlanID int False False True Represented; projection and semantic comparison still required
269 FloorPlans FloorPlans ProjectID int False False True Represented; projection and semantic comparison still required
270 FloorPlans FloorPlans Name nvarchar False False True Represented; projection and semantic comparison still required
271 FloorPlans FloorPlans Description nvarchar True False True Represented; projection and semantic comparison still required
272 FloorPlans FloorPlans CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
273 FloorPlans FloorPlans ModifiedDate datetime2 True False True Represented; projection and semantic comparison still required
274 FloorPlans FloorPlans LocationID int True False True Represented; projection and semantic comparison still required
275 FloorPlanTransitions FloorPlanTransitions FloorPlanTransitionID int False False True Represented; projection and semantic comparison still required
276 FloorPlanTransitions FloorPlanTransitions FloorPlanFloorID int False False True Represented; projection and semantic comparison still required
277 FloorPlanTransitions FloorPlanTransitions FromLocationID int False False True Represented; projection and semantic comparison still required
278 FloorPlanTransitions FloorPlanTransitions ToLocationID int False False True Represented; projection and semantic comparison still required
279 FloorPlanTransitions FloorPlanTransitions TransitionType nvarchar False False True Represented; projection and semantic comparison still required
280 FloorPlanTransitions FloorPlanTransitions Notes nvarchar True False True Represented; projection and semantic comparison still required
281 FloorPlanTransitions FloorPlanTransitions IsLocked bit False False True Represented; projection and semantic comparison still required
282 FloorPlanTransitions FloorPlanTransitions DisplayLabel nvarchar True False True Represented; projection and semantic comparison still required
283 FloorPlanTransitions FloorPlanTransitions CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
284 FloorPlanTransitions FloorPlanTransitions ModifiedDate datetime2 True False True Represented; projection and semantic comparison still required
285 FloorPlanTransitions FloorPlanTransitions PositionWithinLocation nvarchar False False True Represented; projection and semantic comparison still required
286 GenreMetricPresetMetrics GenreMetricPresetMetrics GenreMetricPresetID int False False True Represented; projection and semantic comparison still required
287 GenreMetricPresetMetrics GenreMetricPresetMetrics MetricTypeID int False False True Represented; projection and semantic comparison still required
288 GenreMetricPresetMetrics GenreMetricPresetMetrics SortOrder int False False True Represented; projection and semantic comparison still required
289 GenreMetricPresets GenreMetricPresets GenreMetricPresetID int False False True Represented; projection and semantic comparison still required
290 GenreMetricPresets GenreMetricPresets PresetKey nvarchar False False True Represented; projection and semantic comparison still required
291 GenreMetricPresets GenreMetricPresets PresetName nvarchar False False True Represented; projection and semantic comparison still required
292 GenreMetricPresets GenreMetricPresets Description nvarchar True False True Represented; projection and semantic comparison still required
293 GenreMetricPresets GenreMetricPresets SortOrder int False False True Represented; projection and semantic comparison still required
294 GenreMetricPresets GenreMetricPresets IsActive bit False False True Represented; projection and semantic comparison still required
295 LocationAliases LocationAliases LocationAliasID int False False True Represented; projection and semantic comparison still required
296 LocationAliases LocationAliases LocationID int False False True Represented; projection and semantic comparison still required
297 LocationAliases LocationAliases Alias nvarchar False False True Represented; projection and semantic comparison still required
298 LocationAliases LocationAliases SortOrder int False False True Represented; projection and semantic comparison still required
299 LocationAliases LocationAliases CreatedUtc datetime2 False False True Represented; projection and semantic comparison still required
300 LocationRelationships LocationRelationships LocationRelationshipID int False False True Represented; projection and semantic comparison still required
301 LocationRelationships LocationRelationships FromLocationID int False False True Represented; projection and semantic comparison still required
302 LocationRelationships LocationRelationships ToLocationID int False False True Represented; projection and semantic comparison still required
303 LocationRelationships LocationRelationships LocationRelationshipTypeID int False False True Represented; projection and semantic comparison still required
304 LocationRelationships LocationRelationships IsBidirectional bit False False True Represented; projection and semantic comparison still required
305 LocationRelationships LocationRelationships Strength int True False True Represented; projection and semantic comparison still required
306 LocationRelationships LocationRelationships CanHearNormalSpeech bit False False True Represented; projection and semantic comparison still required
307 LocationRelationships LocationRelationships CanHearLoudNoise bit False False True Represented; projection and semantic comparison still required
308 LocationRelationships LocationRelationships CanSeeMovement bit False False True Represented; projection and semantic comparison still required
309 LocationRelationships LocationRelationships CanSeeClearly bit False False True Represented; projection and semantic comparison still required
310 LocationRelationships LocationRelationships CanTravelDirectly bit False False True Represented; projection and semantic comparison still required
311 LocationRelationships LocationRelationships Notes nvarchar True False True Represented; projection and semantic comparison still required
312 LocationRelationships LocationRelationships CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
313 LocationRelationships LocationRelationships UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
314 LocationRelationships LocationRelationships IsArchived bit False False True Represented; projection and semantic comparison still required
315 Locations Locations LocationID int False False True Represented; projection and semantic comparison still required
316 Locations Locations ProjectID int False False True Represented; projection and semantic comparison still required
317 Locations Locations ParentLocationID int True False True Represented; projection and semantic comparison still required
318 Locations Locations LocationName nvarchar False False True Represented; projection and semantic comparison still required
319 Locations Locations LocationTypeID int True False True Represented; projection and semantic comparison still required
320 Locations Locations Description nvarchar True False True Represented; projection and semantic comparison still required
321 Locations Locations CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
322 Locations Locations UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
323 Locations Locations IsArchived bit False False True Represented; projection and semantic comparison still required
324 Locations Locations ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
325 Locations Locations ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
326 Locations Locations ShowInQuickAddBar bit False False True Represented; projection and semantic comparison still required
327 Locations Locations CreatedByUserID int True False True Represented; projection and semantic comparison still required
328 Locations Locations ModifiedByUserID int True False True Represented; projection and semantic comparison still required
329 Locations Locations CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
330 Locations Locations ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
331 Locations Locations ExcludeFromCompanionDetection bit False False True Represented; projection and semantic comparison still required
332 Locations Locations DetectionPriority int False False True Represented; projection and semantic comparison still required
333 ManuscriptDocuments ManuscriptDocuments ManuscriptDocumentID int False False True Represented; projection and semantic comparison still required
334 ManuscriptDocuments ManuscriptDocuments BookID int False False True Represented; projection and semantic comparison still required
335 ManuscriptDocuments ManuscriptDocuments ProjectID int False False True Represented; projection and semantic comparison still required
336 ManuscriptDocuments ManuscriptDocuments DocumentGuid uniqueidentifier False False True Represented; projection and semantic comparison still required
337 ManuscriptDocuments ManuscriptDocuments BindingVersion int False False True Represented; projection and semantic comparison still required
338 ManuscriptDocuments ManuscriptDocuments CreatedUtc datetime2 False False True Represented; projection and semantic comparison still required
339 ManuscriptDocuments ManuscriptDocuments LastSyncUtc datetime2 True False True Represented; projection and semantic comparison still required
340 ManuscriptDocuments ManuscriptDocuments LastOpenedUtc datetime2 True False True Represented; projection and semantic comparison still required
341 ManuscriptDocuments ManuscriptDocuments IsActive bit False False True Represented; projection and semantic comparison still required
342 ManuscriptDocuments ManuscriptDocuments CreatedByUserID int True False True Represented; projection and semantic comparison still required
343 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources ChapterID int False False True Represented; projection and semantic comparison still required
344 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources ProjectID int False False True Represented; projection and semantic comparison still required
345 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources BookID int False False True Represented; projection and semantic comparison still required
346 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources SourceText nvarchar False False True Represented; projection and semantic comparison still required
347 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources SourceWordCount int False False True Represented; projection and semantic comparison still required
348 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources SourceCharacterCount int False False True Represented; projection and semantic comparison still required
349 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources ParagraphMapJson nvarchar True False True Represented; projection and semantic comparison still required
350 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources CreatedUtc datetime2 False False True Represented; projection and semantic comparison still required
351 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources UpdatedUtc datetime2 False False True Represented; projection and semantic comparison still required
352 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources StructuralParsedJson nvarchar True False True Represented; projection and semantic comparison still required
353 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources DefaultPovName nvarchar True False True Represented; projection and semantic comparison still required
354 ManuscriptStructuralChapterSources ManuscriptStructuralChapterSources ExplicitNarratorName nvarchar True False True Represented; projection and semantic comparison still required
355 MapFeatures MapFeatures MapID int False False True Represented; projection and semantic comparison still required
356 MapFeatures MapFeatures FeatureID uniqueidentifier False False True Represented; projection and semantic comparison still required
357 MapFeatures MapFeatures Name nvarchar False False True Represented; projection and semantic comparison still required
358 MapFeatures MapFeatures Type nvarchar False False True Represented; projection and semantic comparison still required
359 MapFeatures MapFeatures GeometryClass nvarchar False False True Represented; projection and semantic comparison still required
360 MapFeatures MapFeatures Layer nvarchar False False True Represented; projection and semantic comparison still required
361 MapFeatures MapFeatures X float False False True Represented; projection and semantic comparison still required
362 MapFeatures MapFeatures Y float False False True Represented; projection and semantic comparison still required
363 MapFeatures MapFeatures Width float False False True Represented; projection and semantic comparison still required
364 MapFeatures MapFeatures Height float False False True Represented; projection and semantic comparison still required
365 MapFeatures MapFeatures Rotation float False False True Represented; projection and semantic comparison still required
366 MapFeatures MapFeatures ZOrder int False False True Represented; projection and semantic comparison still required
367 MapFeatures MapFeatures IsPlaced bit False False True Represented; projection and semantic comparison still required
368 MapFeatures MapFeatures IsProvisional bit False False True Represented; projection and semantic comparison still required
369 MapFeatures MapFeatures IsLocked bit False False True Represented; projection and semantic comparison still required
370 MapFeatures MapFeatures ShowLabel bit False False True Represented; projection and semantic comparison still required
371 MapFeatures MapFeatures LabelX float False False True Represented; projection and semantic comparison still required
372 MapFeatures MapFeatures LabelY float False False True Represented; projection and semantic comparison still required
373 MapFeatures MapFeatures LocationID int True False True Represented; projection and semantic comparison still required
374 MapFeatures MapFeatures FloorPlanID int True False True Represented; projection and semantic comparison still required
375 MapFeatures MapFeatures StartFeatureID uniqueidentifier True False True Represented; projection and semantic comparison still required
376 MapFeatures MapFeatures EndFeatureID uniqueidentifier True False True Represented; projection and semantic comparison still required
377 MapFeatures MapFeatures GeometryJson nvarchar False False True Represented; projection and semantic comparison still required
378 MapFeatures MapFeatures Notes nvarchar True False True Represented; projection and semantic comparison still required
379 MapJourneyNotes MapJourneyNotes MapID int False False True Represented; projection and semantic comparison still required
380 MapJourneyNotes MapJourneyNotes CharacterID int False False True Represented; projection and semantic comparison still required
381 MapJourneyNotes MapJourneyNotes FromSceneID int False False True Represented; projection and semantic comparison still required
382 MapJourneyNotes MapJourneyNotes ToSceneID int False False True Represented; projection and semantic comparison still required
383 MapJourneyNotes MapJourneyNotes RouteFeatureID uniqueidentifier True False True Represented; projection and semantic comparison still required
384 MapJourneyNotes MapJourneyNotes TravelMethod nvarchar True False True Represented; projection and semantic comparison still required
385 MapJourneyNotes MapJourneyNotes TypicalMinutes int True False True Represented; projection and semantic comparison still required
386 MapReferenceImages MapReferenceImages ImageID uniqueidentifier False False True Represented; projection and semantic comparison still required
387 MapReferenceImages MapReferenceImages ProjectID int False False True Represented; projection and semantic comparison still required
388 MapReferenceImages MapReferenceImages OriginalFileName nvarchar False False True Represented; projection and semantic comparison still required
389 MapReferenceImages MapReferenceImages ContentType nvarchar False False True Represented; projection and semantic comparison still required
390 MapReferenceImages MapReferenceImages Width int False False True Represented; projection and semantic comparison still required
391 MapReferenceImages MapReferenceImages Height int False False True Represented; projection and semantic comparison still required
392 MapReferenceImages MapReferenceImages ImageData varbinary False False True Represented; projection and semantic comparison still required
393 MapReferenceImages MapReferenceImages FileSizeBytes bigint True True True Computed database value
394 MapReferenceImages MapReferenceImages ContentHash binary True True False Computed database value
395 MapRelationships MapRelationships MapID int False False True Represented; projection and semantic comparison still required
396 MapRelationships MapRelationships RelationshipID uniqueidentifier False False True Represented; projection and semantic comparison still required
397 MapRelationships MapRelationships SourceID uniqueidentifier False False True Represented; projection and semantic comparison still required
398 MapRelationships MapRelationships TargetID uniqueidentifier False False True Represented; projection and semantic comparison still required
399 MapRelationships MapRelationships Direction nvarchar True False True Represented; projection and semantic comparison still required
400 MapRelationships MapRelationships RelativeDistance nvarchar True False True Represented; projection and semantic comparison still required
401 MapRelationships MapRelationships MeasuredDistance decimal True False True Represented; projection and semantic comparison still required
402 MapRelationships MapRelationships Unit nvarchar True False True Represented; projection and semantic comparison still required
403 MapRelationships MapRelationships TypicalTravelTime nvarchar True False True Represented; projection and semantic comparison still required
404 MapRelationships MapRelationships Notes nvarchar True False True Represented; projection and semantic comparison still required
405 PlotEventTargetPlotLines PlotEventTargetPlotLines PlotEventID int False False True Represented; projection and semantic comparison still required
406 PlotEventTargetPlotLines PlotEventTargetPlotLines PlotLineID int False False True Represented; projection and semantic comparison still required
407 PlotEventTargetPlotLines PlotEventTargetPlotLines CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
408 PlotLines PlotLines PlotLineID int False False True Represented; projection and semantic comparison still required
409 PlotLines PlotLines ProjectID int False False True Represented; projection and semantic comparison still required
410 PlotLines PlotLines BookID int True False True Represented; projection and semantic comparison still required
411 PlotLines PlotLines PlotLineName nvarchar False False True Represented; projection and semantic comparison still required
412 PlotLines PlotLines PlotLineTypeID int False False True Represented; projection and semantic comparison still required
413 PlotLines PlotLines Description nvarchar True False True Represented; projection and semantic comparison still required
414 PlotLines PlotLines ParentPlotLineID int True False True Represented; projection and semantic comparison still required
415 PlotLines PlotLines SortOrder int False False True Represented; projection and semantic comparison still required
416 PlotLines PlotLines Colour nvarchar False False True Represented; projection and semantic comparison still required
417 PlotLines PlotLines IsVisibleOnTimeline bit False False True Represented; projection and semantic comparison still required
418 PlotLines PlotLines CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
419 PlotLines PlotLines UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
420 PlotLines PlotLines IsArchived bit False False True Represented; projection and semantic comparison still required
421 PlotLines PlotLines ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
422 PlotLines PlotLines ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
423 PlotLines PlotLines CreatedByUserID int True False True Represented; projection and semantic comparison still required
424 PlotLines PlotLines ModifiedByUserID int True False True Represented; projection and semantic comparison still required
425 PlotLines PlotLines CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
426 PlotLines PlotLines ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
427 PlotLines PlotLines PlotImportanceID int False False True Represented; projection and semantic comparison still required
428 PlotLines PlotLines EmergesFromPlotLineID int True False True Represented; projection and semantic comparison still required
429 PlotThreads PlotThreads PlotThreadID int False False True Represented; projection and semantic comparison still required
430 PlotThreads PlotThreads PlotLineID int False False True Represented; projection and semantic comparison still required
431 PlotThreads PlotThreads ThreadTitle nvarchar False False True Represented; projection and semantic comparison still required
432 PlotThreads PlotThreads ThreadTypeID int False False True Represented; projection and semantic comparison still required
433 PlotThreads PlotThreads ThreadStatusID int False False True Represented; projection and semantic comparison still required
434 PlotThreads PlotThreads Importance int False False True Represented; projection and semantic comparison still required
435 PlotThreads PlotThreads Summary nvarchar True False True Represented; projection and semantic comparison still required
436 PlotThreads PlotThreads IntroducedSceneID int True False True Represented; projection and semantic comparison still required
437 PlotThreads PlotThreads PlannedResolutionSceneID int True False True Represented; projection and semantic comparison still required
438 PlotThreads PlotThreads ActualResolutionSceneID int True False True Represented; projection and semantic comparison still required
439 PlotThreads PlotThreads CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
440 PlotThreads PlotThreads UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
441 PlotThreads PlotThreads IsArchived bit False False True Represented; projection and semantic comparison still required
442 PlotThreads PlotThreads ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
443 PlotThreads PlotThreads ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
444 PlotThreads PlotThreads CreatedByUserID int True False True Represented; projection and semantic comparison still required
445 PlotThreads PlotThreads ModifiedByUserID int True False True Represented; projection and semantic comparison still required
446 PlotThreads PlotThreads CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
447 PlotThreads PlotThreads ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
448 Projects Project ProjectID int False False True Represented; projection and semantic comparison still required
449 Projects Project ProjectName nvarchar False False True Represented; projection and semantic comparison still required
450 Projects Project Description nvarchar True False True Represented; projection and semantic comparison still required
451 Projects Project CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
452 Projects Project UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
453 Projects Project IsArchived bit False False True Represented; projection and semantic comparison still required
454 Projects Project ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
455 Projects Project ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
456 Projects Project CreatedByUserID int True False True Represented; projection and semantic comparison still required
457 Projects Project ModifiedByUserID int True False True Represented; projection and semantic comparison still required
458 Projects Project CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
459 Projects Project ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
460 ProjectTimelineMetricSettings TimelineMetricSettings ProjectID int False False True Represented; projection and semantic comparison still required
461 ProjectTimelineMetricSettings TimelineMetricSettings MetricTypeID int False False True Represented; projection and semantic comparison still required
462 ProjectTimelineMetricSettings TimelineMetricSettings SortOrder int False False True Represented; projection and semantic comparison still required
463 ProjectTimelineMetricSettings TimelineMetricSettings CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
464 ProjectTimelineSettings TimelineSettings ProjectTimelineSettingsID int False False True Represented; projection and semantic comparison still required
465 ProjectTimelineSettings TimelineSettings ProjectID int False False True Represented; projection and semantic comparison still required
466 ProjectTimelineSettings TimelineSettings ShowSceneCards bit False False True Represented; projection and semantic comparison still required
467 ProjectTimelineSettings TimelineSettings ShowMetricShape bit False False True Represented; projection and semantic comparison still required
468 ProjectTimelineSettings TimelineSettings ShowPlotLines bit False False True Represented; projection and semantic comparison still required
469 ProjectTimelineSettings TimelineSettings ShowStoryAssets bit False False True Represented; projection and semantic comparison still required
470 ProjectTimelineSettings TimelineSettings ShowCharacterAppearances bit False False True Represented; projection and semantic comparison still required
471 ProjectTimelineSettings TimelineSettings ShowWarnings bit False False True Represented; projection and semantic comparison still required
472 ProjectTimelineSettings TimelineSettings CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
473 ProjectTimelineSettings TimelineSettings UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
474 ProjectUserAccess ProjectAccess ProjectUserAccessID int False False True Represented; projection and semantic comparison still required
475 ProjectUserAccess ProjectAccess ProjectID int False False True Represented; projection and semantic comparison still required
476 ProjectUserAccess ProjectAccess UserID int False False True Represented; projection and semantic comparison still required
477 ProjectUserAccess ProjectAccess AccessRole nvarchar False False True Represented; projection and semantic comparison still required
478 ProjectUserAccess ProjectAccess InvitedByUserID int True False True Represented; projection and semantic comparison still required
479 ProjectUserAccess ProjectAccess InvitedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
480 ProjectUserAccess ProjectAccess AcceptedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
481 ProjectUserAccess ProjectAccess IsActive bit False False True Represented; projection and semantic comparison still required
482 RelationshipEvents RelationshipEvents RelationshipEventID int False False True Represented; projection and semantic comparison still required
483 RelationshipEvents RelationshipEvents CharacterRelationshipID int False False True Represented; projection and semantic comparison still required
484 RelationshipEvents RelationshipEvents SceneID int False False True Represented; projection and semantic comparison still required
485 RelationshipEvents RelationshipEvents RelationshipStateID int False False True Represented; projection and semantic comparison still required
486 RelationshipEvents RelationshipEvents Intensity int True False True Represented; projection and semantic comparison still required
487 RelationshipEvents RelationshipEvents IsKnownToOtherCharacter bit False False True Represented; projection and semantic comparison still required
488 RelationshipEvents RelationshipEvents Description nvarchar True False True Represented; projection and semantic comparison still required
489 RelationshipEvents RelationshipEvents CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
490 RelationshipEvents RelationshipEvents UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
491 RelationshipEvents RelationshipEvents CreatedByUserID int True False True Represented; projection and semantic comparison still required
492 RelationshipEvents RelationshipEvents ModifiedByUserID int True False True Represented; projection and semantic comparison still required
493 RelationshipEvents RelationshipEvents CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
494 RelationshipEvents RelationshipEvents ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
495 RelationshipEvents RelationshipEvents SourceReviewKey nvarchar True False True Represented; projection and semantic comparison still required
496 Scenarios Scenarios ScenarioID int False False True Represented; projection and semantic comparison still required
497 Scenarios Scenarios ProjectID int False False True Represented; projection and semantic comparison still required
498 Scenarios Scenarios BookID int True False True Represented; projection and semantic comparison still required
499 Scenarios Scenarios ScenarioName nvarchar False False True Represented; projection and semantic comparison still required
500 Scenarios Scenarios Description nvarchar True False True Represented; projection and semantic comparison still required
501 Scenarios Scenarios BaseCreatedDate datetime2 False False True Represented; projection and semantic comparison still required
502 Scenarios Scenarios IsAppliedToMain bit False False True Represented; projection and semantic comparison still required
503 Scenarios Scenarios IsArchived bit False False True Represented; projection and semantic comparison still required
504 Scenarios Scenarios CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
505 Scenarios Scenarios UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
506 Scenarios Scenarios ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
507 Scenarios Scenarios ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
508 ScenarioSceneOrder ScenarioSceneOrder ScenarioSceneOrderID int False False True Represented; projection and semantic comparison still required
509 ScenarioSceneOrder ScenarioSceneOrder ScenarioID int False False True Represented; projection and semantic comparison still required
510 ScenarioSceneOrder ScenarioSceneOrder SceneID int False False True Represented; projection and semantic comparison still required
511 ScenarioSceneOrder ScenarioSceneOrder ProposedChapterID int True False True Represented; projection and semantic comparison still required
512 ScenarioSceneOrder ScenarioSceneOrder ProposedSortOrder int False False True Represented; projection and semantic comparison still required
513 ScenarioSceneOrder ScenarioSceneOrder Notes nvarchar True False True Represented; projection and semantic comparison still required
514 ScenarioSceneOrder ScenarioSceneOrder CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
515 ScenarioSceneOrder ScenarioSceneOrder UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
516 ScenarioValidationRuns ScenarioValidationRuns ScenarioValidationRunID int False False True Represented; projection and semantic comparison still required
517 ScenarioValidationRuns ScenarioValidationRuns ScenarioID int False False True Represented; projection and semantic comparison still required
518 ScenarioValidationRuns ScenarioValidationRuns StartedDate datetime2 False False True Represented; projection and semantic comparison still required
519 ScenarioValidationRuns ScenarioValidationRuns CompletedDate datetime2 True False True Represented; projection and semantic comparison still required
520 ScenarioValidationRuns ScenarioValidationRuns WarningCount int False False True Represented; projection and semantic comparison still required
521 ScenarioWarnings ScenarioWarnings ScenarioWarningID int False False True Represented; projection and semantic comparison still required
522 ScenarioWarnings ScenarioWarnings ScenarioValidationRunID int False False True Represented; projection and semantic comparison still required
523 ScenarioWarnings ScenarioWarnings ScenarioID int False False True Represented; projection and semantic comparison still required
524 ScenarioWarnings ScenarioWarnings SceneID int True False True Represented; projection and semantic comparison still required
525 ScenarioWarnings ScenarioWarnings EntityType nvarchar False False True Represented; projection and semantic comparison still required
526 ScenarioWarnings ScenarioWarnings EntityID int True False True Represented; projection and semantic comparison still required
527 ScenarioWarnings ScenarioWarnings WarningTypeName nvarchar False False True Represented; projection and semantic comparison still required
528 ScenarioWarnings ScenarioWarnings SeverityName nvarchar False False True Represented; projection and semantic comparison still required
529 ScenarioWarnings ScenarioWarnings Message nvarchar False False True Represented; projection and semantic comparison still required
530 ScenarioWarnings ScenarioWarnings Details nvarchar True False True Represented; projection and semantic comparison still required
531 ScenarioWarnings ScenarioWarnings CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
532 SceneAssetLocations SceneAssetLocations SceneAssetLocationID int False False True Represented; projection and semantic comparison still required
533 SceneAssetLocations SceneAssetLocations SceneID int False False True Represented; projection and semantic comparison still required
534 SceneAssetLocations SceneAssetLocations StoryAssetID int False False True Represented; projection and semantic comparison still required
535 SceneAssetLocations SceneAssetLocations LocationID int False False True Represented; projection and semantic comparison still required
536 SceneAssetLocations SceneAssetLocations Description nvarchar True False True Represented; projection and semantic comparison still required
537 SceneAssetLocations SceneAssetLocations CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
538 SceneAssetLocations SceneAssetLocations UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
539 SceneAttachments SceneAttachments SceneAttachmentID int False False True Represented; projection and semantic comparison still required
540 SceneAttachments SceneAttachments SceneID int False False True Represented; projection and semantic comparison still required
541 SceneAttachments SceneAttachments SceneAttachmentTypeID int False False True Represented; projection and semantic comparison still required
542 SceneAttachments SceneAttachments Title nvarchar False False True Represented; projection and semantic comparison still required
543 SceneAttachments SceneAttachments FilePath nvarchar True False True Represented; projection and semantic comparison still required
544 SceneAttachments SceneAttachments ExternalUrl nvarchar True False True Represented; projection and semantic comparison still required
545 SceneAttachments SceneAttachments Notes nvarchar True False True Represented; projection and semantic comparison still required
546 SceneAttachments SceneAttachments CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
547 SceneAttachments SceneAttachments UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
548 SceneAttachments SceneAttachments CreatedByUserID int True False True Represented; projection and semantic comparison still required
549 SceneAttachments SceneAttachments ModifiedByUserID int True False True Represented; projection and semantic comparison still required
550 SceneAttachments SceneAttachments CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
551 SceneAttachments SceneAttachments ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
552 SceneCharacters SceneCharacters SceneCharacterID int False False True Represented; projection and semantic comparison still required
553 SceneCharacters SceneCharacters SceneID int False False True Represented; projection and semantic comparison still required
554 SceneCharacters SceneCharacters CharacterID int False False True Represented; projection and semantic comparison still required
555 SceneCharacters SceneCharacters RoleInSceneTypeID int True False True Represented; projection and semantic comparison still required
556 SceneCharacters SceneCharacters PresenceTypeID int True False True Represented; projection and semantic comparison still required
557 SceneCharacters SceneCharacters LocationID int True False True Represented; projection and semantic comparison still required
558 SceneCharacters SceneCharacters EntryLocationID int True False True Represented; projection and semantic comparison still required
559 SceneCharacters SceneCharacters ExitLocationID int True False True Represented; projection and semantic comparison still required
560 SceneCharacters SceneCharacters AppearanceNotes nvarchar True False True Represented; projection and semantic comparison still required
561 SceneCharacters SceneCharacters OutfitDescription nvarchar True False True Represented; projection and semantic comparison still required
562 SceneCharacters SceneCharacters PhysicalCondition nvarchar True False True Represented; projection and semantic comparison still required
563 SceneCharacters SceneCharacters EmotionalState nvarchar True False True Represented; projection and semantic comparison still required
564 SceneCharacters SceneCharacters KnowledgeNotes nvarchar True False True Represented; projection and semantic comparison still required
565 SceneCharacters SceneCharacters CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
566 SceneCharacters SceneCharacters UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
567 SceneCharacters SceneCharacters MatchSource nvarchar True False True Represented; projection and semantic comparison still required
568 SceneCharacters SceneCharacters MatchedText nvarchar True False True Represented; projection and semantic comparison still required
569 SceneCharacters SceneCharacters OccurrenceCount int True False True Represented; projection and semantic comparison still required
570 SceneCharacters SceneCharacters FirstOccurrenceIndex int True False True Represented; projection and semantic comparison still required
571 SceneChecklistItems SceneChecklistItems SceneChecklistItemID int False False True Represented; projection and semantic comparison still required
572 SceneChecklistItems SceneChecklistItems SceneID int False False True Represented; projection and semantic comparison still required
573 SceneChecklistItems SceneChecklistItems ItemText nvarchar False False True Represented; projection and semantic comparison still required
574 SceneChecklistItems SceneChecklistItems IsCompleted bit False False True Represented; projection and semantic comparison still required
575 SceneChecklistItems SceneChecklistItems SortOrder int True False True Represented; projection and semantic comparison still required
576 SceneChecklistItems SceneChecklistItems CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
577 SceneChecklistItems SceneChecklistItems UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
578 SceneChecklistItems SceneChecklistItems CreatedByUserID int True False True Represented; projection and semantic comparison still required
579 SceneChecklistItems SceneChecklistItems ModifiedByUserID int True False True Represented; projection and semantic comparison still required
580 SceneChecklistItems SceneChecklistItems CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
581 SceneChecklistItems SceneChecklistItems ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
582 SceneDependencies SceneDependencies SceneDependencyID int False False True Represented; projection and semantic comparison still required
583 SceneDependencies SceneDependencies SourceSceneID int False False True Represented; projection and semantic comparison still required
584 SceneDependencies SceneDependencies TargetSceneID int False False True Represented; projection and semantic comparison still required
585 SceneDependencies SceneDependencies SceneDependencyTypeID int False False True Represented; projection and semantic comparison still required
586 SceneDependencies SceneDependencies Description nvarchar True False True Represented; projection and semantic comparison still required
587 SceneDependencies SceneDependencies CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
588 SceneDependencies SceneDependencies UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
589 SceneDependencies SceneDependencies IsArchived bit False False True Represented; projection and semantic comparison still required
590 SceneDependencies SceneDependencies ProjectID int True False True Represented; projection and semantic comparison still required
591 SceneDependencies SceneDependencies IsHardDependency bit False False True Represented; projection and semantic comparison still required
592 SceneFloorPlanOccupancy SceneFloorPlanOccupancy SceneFloorPlanOccupancyID int False False True Represented; projection and semantic comparison still required
593 SceneFloorPlanOccupancy SceneFloorPlanOccupancy SceneID int False False True Represented; projection and semantic comparison still required
594 SceneFloorPlanOccupancy SceneFloorPlanOccupancy FloorPlanID int False False True Represented; projection and semantic comparison still required
595 SceneFloorPlanOccupancy SceneFloorPlanOccupancy FloorPlanFloorID int True False True Represented; projection and semantic comparison still required
596 SceneFloorPlanOccupancy SceneFloorPlanOccupancy CharacterID int True False True Represented; projection and semantic comparison still required
597 SceneFloorPlanOccupancy SceneFloorPlanOccupancy StoryAssetID int True False True Represented; projection and semantic comparison still required
598 SceneFloorPlanOccupancy SceneFloorPlanOccupancy LocationID int False False True Represented; projection and semantic comparison still required
599 SceneFloorPlanOccupancy SceneFloorPlanOccupancy CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
600 SceneFloorPlanOccupancy SceneFloorPlanOccupancy ModifiedDate datetime2 True False True Represented; projection and semantic comparison still required
601 SceneManuscriptSources SceneManuscriptSources SceneID int False False True Represented; projection and semantic comparison still required
602 SceneManuscriptSources SceneManuscriptSources ProjectID int False False True Represented; projection and semantic comparison still required
603 SceneManuscriptSources SceneManuscriptSources BookID int False False True Represented; projection and semantic comparison still required
604 SceneManuscriptSources SceneManuscriptSources ChapterID int False False True Represented; projection and semantic comparison still required
605 SceneManuscriptSources SceneManuscriptSources SourceText nvarchar False False True Represented; projection and semantic comparison still required
606 SceneManuscriptSources SceneManuscriptSources SourceWordCount int False False True Represented; projection and semantic comparison still required
607 SceneManuscriptSources SceneManuscriptSources SourceCharacterCount int False False True Represented; projection and semantic comparison still required
608 SceneManuscriptSources SceneManuscriptSources SourceStartParagraph int True False True Represented; projection and semantic comparison still required
609 SceneManuscriptSources SceneManuscriptSources SourceEndParagraph int True False True Represented; projection and semantic comparison still required
610 SceneManuscriptSources SceneManuscriptSources WordStartParagraphIndex int True False True Represented; projection and semantic comparison still required
611 SceneManuscriptSources SceneManuscriptSources WordEndParagraphIndex int True False True Represented; projection and semantic comparison still required
612 SceneManuscriptSources SceneManuscriptSources SourceKind nvarchar False False True Represented; projection and semantic comparison still required
613 SceneManuscriptSources SceneManuscriptSources CreatedUtc datetime2 False False True Represented; projection and semantic comparison still required
614 SceneManuscriptSources SceneManuscriptSources UpdatedUtc datetime2 False False True Represented; projection and semantic comparison still required
615 SceneMetricTypes SceneMetricTypes MetricTypeID int False False True Represented; projection and semantic comparison still required
616 SceneMetricTypes SceneMetricTypes ProjectID int True False True Represented; projection and semantic comparison still required
617 SceneMetricTypes SceneMetricTypes MetricName nvarchar False False True Represented; projection and semantic comparison still required
618 SceneMetricTypes SceneMetricTypes Description nvarchar True False True Represented; projection and semantic comparison still required
619 SceneMetricTypes SceneMetricTypes MinValue int False False True Represented; projection and semantic comparison still required
620 SceneMetricTypes SceneMetricTypes MaxValue int False False True Represented; projection and semantic comparison still required
621 SceneMetricTypes SceneMetricTypes DefaultValue int False False True Represented; projection and semantic comparison still required
622 SceneMetricTypes SceneMetricTypes SortOrder int False False True Represented; projection and semantic comparison still required
623 SceneMetricTypes SceneMetricTypes IsActive bit False False True Represented; projection and semantic comparison still required
624 SceneMetricValues SceneMetricValues SceneID int False False True Represented; projection and semantic comparison still required
625 SceneMetricValues SceneMetricValues MetricTypeID int False False True Represented; projection and semantic comparison still required
626 SceneMetricValues SceneMetricValues Value int False False True Represented; projection and semantic comparison still required
627 SceneMetricValues SceneMetricValues Notes nvarchar True False True Represented; projection and semantic comparison still required
628 SceneNotes SceneNotes SceneNoteID int False False True Represented; projection and semantic comparison still required
629 SceneNotes SceneNotes SceneID int False False True Represented; projection and semantic comparison still required
630 SceneNotes SceneNotes SceneNoteTypeID int False False True Represented; projection and semantic comparison still required
631 SceneNotes SceneNotes NoteTitle nvarchar True False True Represented; projection and semantic comparison still required
632 SceneNotes SceneNotes NoteText nvarchar False False True Represented; projection and semantic comparison still required
633 SceneNotes SceneNotes SortOrder int True False True Represented; projection and semantic comparison still required
634 SceneNotes SceneNotes IsPinned bit False False True Represented; projection and semantic comparison still required
635 SceneNotes SceneNotes IsResolved bit False False True Represented; projection and semantic comparison still required
636 SceneNotes SceneNotes CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
637 SceneNotes SceneNotes UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
638 SceneNotes SceneNotes CreatedByUserID int True False True Represented; projection and semantic comparison still required
639 SceneNotes SceneNotes ModifiedByUserID int True False True Represented; projection and semantic comparison still required
640 SceneNotes SceneNotes CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
641 SceneNotes SceneNotes ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
642 SceneOutcomes SceneOutcomes SceneOutcomeID int False False True Represented; projection and semantic comparison still required
643 SceneOutcomes SceneOutcomes SceneID int False False True Represented; projection and semantic comparison still required
644 SceneOutcomes SceneOutcomes OutcomeDescription nvarchar False False True Represented; projection and semantic comparison still required
645 SceneOutcomes SceneOutcomes OutcomeTypeID int True False True Represented; projection and semantic comparison still required
646 SceneOutcomes SceneOutcomes CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
647 SceneOutcomes SceneOutcomes UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
648 ScenePurposes ScenePurposes SceneID int False False True Represented; projection and semantic comparison still required
649 ScenePurposes ScenePurposes ScenePurposeTypeID int False False True Represented; projection and semantic comparison still required
650 Scenes Scenes SceneID int False False True Represented; projection and semantic comparison still required
651 Scenes Scenes ChapterID int False False True Represented; projection and semantic comparison still required
652 Scenes Scenes SceneNumber decimal False False True Represented; projection and semantic comparison still required
653 Scenes Scenes SceneTitle nvarchar False False True Represented; projection and semantic comparison still required
654 Scenes Scenes Summary nvarchar True False True Represented; projection and semantic comparison still required
655 Scenes Scenes POVCharacterID int True False True Represented; projection and semantic comparison still required
656 Scenes Scenes PrimaryLocationID int True False True Represented; projection and semantic comparison still required
657 Scenes Scenes SortOrder int False False True Represented; projection and semantic comparison still required
658 Scenes Scenes TimeModeID int False False True Represented; projection and semantic comparison still required
659 Scenes Scenes StartDateTime datetime2 True False True Represented; projection and semantic comparison still required
660 Scenes Scenes EndDateTime datetime2 True False True Represented; projection and semantic comparison still required
661 Scenes Scenes DurationAmount decimal True False True Represented; projection and semantic comparison still required
662 Scenes Scenes DurationUnitID int True False True Represented; projection and semantic comparison still required
663 Scenes Scenes RelativeTimeText nvarchar True False True Represented; projection and semantic comparison still required
664 Scenes Scenes TimeConfidenceID int False False True Represented; projection and semantic comparison still required
665 Scenes Scenes ScenePurposeNotes nvarchar True False True Represented; projection and semantic comparison still required
666 Scenes Scenes SceneOutcomeNotes nvarchar True False True Represented; projection and semantic comparison still required
667 Scenes Scenes RevisionStatusID int False False True Represented; projection and semantic comparison still required
668 Scenes Scenes CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
669 Scenes Scenes UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
670 Scenes Scenes IsArchived bit False False True Represented; projection and semantic comparison still required
671 Scenes Scenes ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
672 Scenes Scenes ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
673 Scenes Scenes CreatedByUserID int True False True Represented; projection and semantic comparison still required
674 Scenes Scenes ModifiedByUserID int True False True Represented; projection and semantic comparison still required
675 Scenes Scenes CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
676 Scenes Scenes ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
677 Scenes Scenes FloorPlanID int True False True Represented; projection and semantic comparison still required
678 Scenes Scenes InitialFloorPlanFloorID int True False True Represented; projection and semantic comparison still required
679 Scenes Scenes IsLinkedToManuscript bit False False True Represented; projection and semantic comparison still required
680 Scenes Scenes ManuscriptDocumentID int True False True Represented; projection and semantic comparison still required
681 Scenes Scenes ExternalReference nvarchar True False True Represented; projection and semantic comparison still required
682 Scenes Scenes LinkedUtc datetime2 True False True Represented; projection and semantic comparison still required
683 Scenes Scenes ImportSource nvarchar True False True Represented; projection and semantic comparison still required
684 Scenes Scenes ImportRunID int True False True Represented; projection and semantic comparison still required
685 Scenes Scenes SourceStartParagraph int True False True Represented; projection and semantic comparison still required
686 Scenes Scenes SourceEndParagraph int True False True Represented; projection and semantic comparison still required
687 Scenes Scenes StructuralSummary nvarchar True False True Represented; projection and semantic comparison still required
688 Scenes Scenes SceneTitleSource nvarchar True False True Represented; projection and semantic comparison still required
689 Scenes Scenes POVSource nvarchar True False True Represented; projection and semantic comparison still required
690 Scenes Scenes POVConfidence decimal True False True Represented; projection and semantic comparison still required
691 Scenes Scenes POVEvidence nvarchar True False True Represented; projection and semantic comparison still required
692 Scenes Scenes POVSuggestedName nvarchar True False True Represented; projection and semantic comparison still required
693 Scenes Scenes StructuralSetting nvarchar True False True Represented; projection and semantic comparison still required
694 SceneWorkflow SceneWorkflow SceneWorkflowID int False False True Represented; projection and semantic comparison still required
695 SceneWorkflow SceneWorkflow SceneID int False False True Represented; projection and semantic comparison still required
696 SceneWorkflow SceneWorkflow DraftStatus nvarchar False False True Represented; projection and semantic comparison still required
697 SceneWorkflow SceneWorkflow EstimatedWordCount int True False True Represented; projection and semantic comparison still required
698 SceneWorkflow SceneWorkflow ActualWordCount int True False True Represented; projection and semantic comparison still required
699 SceneWorkflow SceneWorkflow DraftedDate date True False True Represented; projection and semantic comparison still required
700 SceneWorkflow SceneWorkflow LastWorkedOn date True False True Represented; projection and semantic comparison still required
701 SceneWorkflow SceneWorkflow ReadyForDraft bit False False True Represented; projection and semantic comparison still required
702 SceneWorkflow SceneWorkflow ReadyForRevision bit False False True Represented; projection and semantic comparison still required
703 SceneWorkflow SceneWorkflow ReadyForPolish bit False False True Represented; projection and semantic comparison still required
704 SceneWorkflow SceneWorkflow IsBlocked bit False False True Represented; projection and semantic comparison still required
705 SceneWorkflow SceneWorkflow BlockedReason nvarchar True False True Represented; projection and semantic comparison still required
706 SceneWorkflow SceneWorkflow Priority int True False True Represented; projection and semantic comparison still required
707 SceneWorkflow SceneWorkflow CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
708 SceneWorkflow SceneWorkflow UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
709 SceneWorkflow SceneWorkflow CreatedByUserID int True False True Represented; projection and semantic comparison still required
710 SceneWorkflow SceneWorkflow ModifiedByUserID int True False True Represented; projection and semantic comparison still required
711 SceneWorkflow SceneWorkflow CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
712 SceneWorkflow SceneWorkflow ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
713 StoryAssets StoryAssets StoryAssetID int False False True Represented; projection and semantic comparison still required
714 StoryAssets StoryAssets ProjectID int False False True Represented; projection and semantic comparison still required
715 StoryAssets StoryAssets AssetName nvarchar False False True Represented; projection and semantic comparison still required
716 StoryAssets StoryAssets AssetKindID int False False True Represented; projection and semantic comparison still required
717 StoryAssets StoryAssets Description nvarchar True False True Represented; projection and semantic comparison still required
718 StoryAssets StoryAssets Importance int False False True Represented; projection and semantic comparison still required
719 StoryAssets StoryAssets CurrentStateID int True False True Represented; projection and semantic comparison still required
720 StoryAssets StoryAssets CurrentLocationID int True False True Represented; projection and semantic comparison still required
721 StoryAssets StoryAssets IsResolved bit False False True Represented; projection and semantic comparison still required
722 StoryAssets StoryAssets CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
723 StoryAssets StoryAssets UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
724 StoryAssets StoryAssets IsArchived bit False False True Represented; projection and semantic comparison still required
725 StoryAssets StoryAssets ArchivedDate datetime2 True False True Represented; projection and semantic comparison still required
726 StoryAssets StoryAssets ArchivedReason nvarchar True False True Represented; projection and semantic comparison still required
727 StoryAssets StoryAssets ShowInQuickAddBar bit False False True Represented; projection and semantic comparison still required
728 StoryAssets StoryAssets CreatedByUserID int True False True Represented; projection and semantic comparison still required
729 StoryAssets StoryAssets ModifiedByUserID int True False True Represented; projection and semantic comparison still required
730 StoryAssets StoryAssets CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
731 StoryAssets StoryAssets ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
732 StoryAssets StoryAssets ImagePath nvarchar True False True Represented; projection and semantic comparison still required
733 StoryAssets StoryAssets ThumbnailPath nvarchar True False True Represented; projection and semantic comparison still required
734 StoryMaps StoryMaps MapID int False False True Represented; projection and semantic comparison still required
735 StoryMaps StoryMaps ProjectID int False False True Represented; projection and semantic comparison still required
736 StoryMaps StoryMaps ParentMapID int True False True Represented; projection and semantic comparison still required
737 StoryMaps StoryMaps ParentFeatureID uniqueidentifier True False True Represented; projection and semantic comparison still required
738 StoryMaps StoryMaps Name nvarchar False False True Represented; projection and semantic comparison still required
739 StoryMaps StoryMaps Kind nvarchar False False True Represented; projection and semantic comparison still required
740 StoryMaps StoryMaps Revision int False False True Represented; projection and semantic comparison still required
741 StoryMaps StoryMaps ModifiedDate datetime2 False False True Represented; projection and semantic comparison still required
742 StoryMaps StoryMaps AppearanceJson nvarchar False False True Represented; projection and semantic comparison still required
743 StoryMaps StoryMaps ReferenceJson nvarchar False False True Represented; projection and semantic comparison still required
744 ThreadEvents ThreadEvents ThreadEventID int False False True Represented; projection and semantic comparison still required
745 ThreadEvents ThreadEvents PlotThreadID int False False True Represented; projection and semantic comparison still required
746 ThreadEvents ThreadEvents SceneID int False False True Represented; projection and semantic comparison still required
747 ThreadEvents ThreadEvents EventTypeID int False False True Represented; projection and semantic comparison still required
748 ThreadEvents ThreadEvents EventTitle nvarchar False False True Represented; projection and semantic comparison still required
749 ThreadEvents ThreadEvents EventDescription nvarchar True False True Represented; projection and semantic comparison still required
750 ThreadEvents ThreadEvents CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
751 ThreadEvents ThreadEvents UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
752 ThreadEvents ThreadEvents CreatedByUserID int True False True Represented; projection and semantic comparison still required
753 ThreadEvents ThreadEvents ModifiedByUserID int True False True Represented; projection and semantic comparison still required
754 ThreadEvents ThreadEvents CreatedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
755 ThreadEvents ThreadEvents ModifiedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
756 ThreadEvents ThreadEvents PlotEventTypeID int False False True Represented; projection and semantic comparison still required
757 ThreadEvents ThreadEvents TargetPlotLineID int True False True Represented; projection and semantic comparison still required
758 ThreadEvents ThreadEvents Source nvarchar False False True Represented; projection and semantic comparison still required
759 ThreadEvents ThreadEvents SourceReferenceID int True False True Represented; projection and semantic comparison still required
760 ThreadEvents ThreadEvents SourceKey nvarchar True False True Represented; projection and semantic comparison still required
761 ThreadEvents ThreadEvents Confidence decimal True False True Represented; projection and semantic comparison still required
762 TimelineViewPresets TimelineViewPresets TimelineViewPresetID int False False True Represented; projection and semantic comparison still required
763 TimelineViewPresets TimelineViewPresets ProjectID int False False True Represented; projection and semantic comparison still required
764 TimelineViewPresets TimelineViewPresets BookID int True False True Represented; projection and semantic comparison still required
765 TimelineViewPresets TimelineViewPresets PresetName nvarchar False False True Represented; projection and semantic comparison still required
766 TimelineViewPresets TimelineViewPresets FilterJson nvarchar False False True Represented; projection and semantic comparison still required
767 TimelineViewPresets TimelineViewPresets VisibilityJson nvarchar False False True Represented; projection and semantic comparison still required
768 TimelineViewPresets TimelineViewPresets FocusType nvarchar True False True Represented; projection and semantic comparison still required
769 TimelineViewPresets TimelineViewPresets FocusID int True False True Represented; projection and semantic comparison still required
770 TimelineViewPresets TimelineViewPresets CreatedDate datetime2 False False True Represented; projection and semantic comparison still required
771 TimelineViewPresets TimelineViewPresets UpdatedDate datetime2 False False True Represented; projection and semantic comparison still required
772 TimelineViewPresets TimelineViewPresets IsArchived bit False False True Represented; projection and semantic comparison still required
773 UserFile UserFiles UserFileID bigint False False True Represented; projection and semantic comparison still required
774 UserFile UserFiles UserID int False False True Represented; projection and semantic comparison still required
775 UserFile UserFiles ProjectID int True False True Represented; projection and semantic comparison still required
776 UserFile UserFiles EntityType nvarchar False False True Represented; projection and semantic comparison still required
777 UserFile UserFiles EntityID int False False True Represented; projection and semantic comparison still required
778 UserFile UserFiles FileName nvarchar False False True Represented; projection and semantic comparison still required
779 UserFile UserFiles OriginalFileName nvarchar True False True Represented; projection and semantic comparison still required
780 UserFile UserFiles ContentType nvarchar True False True Represented; projection and semantic comparison still required
781 UserFile UserFiles FileSizeBytes bigint False False True Represented; projection and semantic comparison still required
782 UserFile UserFiles StoragePath nvarchar False False True Represented; projection and semantic comparison still required
783 UserFile UserFiles UploadedDateUTC datetime2 False False True Represented; projection and semantic comparison still required
784 UserFile UserFiles DeletedDateUTC datetime2 True False True Represented; projection and semantic comparison still required
785 UserFile UserFiles IsDeleted bit False False True Represented; projection and semantic comparison still required
786 ValidationRuns ValidationRuns ValidationRunID int False False True Represented; projection and semantic comparison still required
787 ValidationRuns ValidationRuns ProjectID int False False True Represented; projection and semantic comparison still required
788 ValidationRuns ValidationRuns BookID int True False True Represented; projection and semantic comparison still required
789 ValidationRuns ValidationRuns StartedDate datetime2 False False True Represented; projection and semantic comparison still required
790 ValidationRuns ValidationRuns CompletedDate datetime2 True False True Represented; projection and semantic comparison still required
791 ValidationRuns ValidationRuns TriggeredBy nvarchar True False True Represented; projection and semantic comparison still required
792 ValidationRuns ValidationRuns ScopeDescription nvarchar True False True Represented; projection and semantic comparison still required
793 WritingPlans WritingPlans WritingPlanID int False False True Represented; projection and semantic comparison still required
794 WritingPlans WritingPlans UserID int False False True Represented; projection and semantic comparison still required
795 WritingPlans WritingPlans ProjectID int False False True Represented; projection and semantic comparison still required
796 WritingPlans WritingPlans BookID int True False True Represented; projection and semantic comparison still required
797 WritingPlans WritingPlans PlanName nvarchar False False True Represented; projection and semantic comparison still required
798 WritingPlans WritingPlans GoalType nvarchar False False True Represented; projection and semantic comparison still required
799 WritingPlans WritingPlans StartDate date False False True Represented; projection and semantic comparison still required
800 WritingPlans WritingPlans DeadlineDate date False False True Represented; projection and semantic comparison still required
801 WritingPlans WritingPlans AvailableDaysJson nvarchar False False True Represented; projection and semantic comparison still required
802 WritingPlans WritingPlans SessionLengthMinutes int False False True Represented; projection and semantic comparison still required
803 WritingPlans WritingPlans IncludeBlockedScenes bit False False True Represented; projection and semantic comparison still required
804 WritingPlans WritingPlans RebalanceMode nvarchar False False True Represented; projection and semantic comparison still required
805 WritingPlans WritingPlans IsActive bit False False True Represented; projection and semantic comparison still required
806 WritingPlans WritingPlans CreatedDateUtc datetime2 False False True Represented; projection and semantic comparison still required
807 WritingPlans WritingPlans ModifiedDateUtc datetime2 False False True Represented; projection and semantic comparison still required
808 WritingScheduleItems WritingScheduleItems WritingScheduleItemID int False False True Represented; projection and semantic comparison still required
809 WritingScheduleItems WritingScheduleItems WritingPlanID int False False True Represented; projection and semantic comparison still required
810 WritingScheduleItems WritingScheduleItems SceneID int False False True Represented; projection and semantic comparison still required
811 WritingScheduleItems WritingScheduleItems ScheduledDate date False False True Represented; projection and semantic comparison still required
812 WritingScheduleItems WritingScheduleItems TaskType nvarchar False False True Represented; projection and semantic comparison still required
813 WritingScheduleItems WritingScheduleItems EstimatedMinutes int True False True Represented; projection and semantic comparison still required
814 WritingScheduleItems WritingScheduleItems TargetWords int True False True Represented; projection and semantic comparison still required
815 WritingScheduleItems WritingScheduleItems ScheduleStatus nvarchar False False True Represented; projection and semantic comparison still required
816 WritingScheduleItems WritingScheduleItems CompletedDateUtc datetime2 True False True Represented; projection and semantic comparison still required
817 WritingScheduleItems WritingScheduleItems Notes nvarchar True False True Represented; projection and semantic comparison still required
818 WritingScheduleItems WritingScheduleItems CreatedDateUtc datetime2 False False True Represented; projection and semantic comparison still required
819 WritingScheduleItems WritingScheduleItems ModifiedDateUtc datetime2 False False True Represented; projection and semantic comparison still required

View File

@ -32,7 +32,7 @@ Coverage inventories will record tested pages, entities and formats explicitly.
## Deployment
Phase 2 not deployed. Production excluded. Running Development database remains unchanged; schema and synthetic fixtures exist only in `PlotDirector_Phase2_20261103_2305`. New migration 213 is verified there only.
Phase 2 not deployed. Production excluded. Running Development database remains unchanged; schema and synthetic fixtures exist only in `PlotDirector_Phase2_20261103_2305`. New migrations 213–214 are verified there only.
### Writer investigation checkpoint
@ -122,3 +122,22 @@ Further reproduced failure atomicity defect: an invalid scene→chapter referenc
### Import atomicity and graph validation checkpoint
Reproduced the failed-import shell leak before repair (project count 13→14). An ambient asynchronous transaction now covers shell creation, identity/remapping reads, SQL apply and diagnostics. Isolated verification passed with a real SQL uniqueness failure after allocation: project count remains unchanged, and a subsequent valid import succeeds. Added explicit graph validation for 55 serialized collections / 135 declared persisted and application references, rejecting missing/foreign targets before allocation; these declarations are not a claim that all 55 entity sets have completed semantic round trips. Null collections/records and scalar/array JSON are rejected cleanly. Initial map/asset/hierarchy/book-context comparison and 12 malformed preview cases passed. Broad harness is running. Writing-plan omission remains an explicit separate failing coverage gate; manuscript source text and SI review/audit omissions are now recorded in the schema inventory for subsequent work.
### 4 November: retained source/state extension — initial SQL verification passed
New format 1.2 adds eleven previously omitted persistent sets: document provenance, scene manuscript text/paragraph coordinates, structural chapter text/parsing context, writing plans and scheduled tasks, character/asset/location aliases, author plot seeds, warning acknowledgements and additional plot-event target links. Migration 214 extends the established export/restore procedures; existing numbered migrations remain untouched. New Chapter/Scene projections also include their stored Word-link fields, which the richer fixture demonstrated were previously omitted.
Import-as-new compares exact Unicode source text, paragraph positions, structural JSON and narrator context; schedule settings/date/notes and remapped project/book/scene references; alias values; matched author seed; warning acknowledgement and its scene/character/asset references; additional event targets; map hierarchy/geometry/relationships and exact embedded image bytes. A copied Word binding receives a fresh document GUID and inactive/unlinked state, with an import preview warning requiring explicit acknowledgement; it cannot drive the original document. In-place restore preserves the original document GUID/active binding. References to unexported original analysis runs are detached on copies; SI persistence coverage is still pending.
The actual ProjectExportService → restore-point repository/service → ProjectRestoreService path passed in the isolated database (activity logging is stubbed; identity/entitlement service boundaries are fixtures, while SQL subscription triggers and all export/restore SQL are real). A changed source text, plan name and alias restore to their original values with a safety backup. A deliberately duplicated image content causes a real SQL failure, retains the safety backup, and leaves every serialized Data field unchanged. A restore point cannot cross projects. Empty-project rollback and malformed preview checks still pass.
Evidence: build zero warnings/errors; `/tmp/plotdirector-phase2-source-restore-workflow.log` passed. Broader harness running. 66 sets are now serialized and 162 graph relationships declared, but not all 66 sets have been populated/compared yet. Full field coverage, remaining SI/review state, associated file assets, historical fixtures, and import/export format verification remain work in progress. No running Development data/schema changes or deployment.
### Stored field census and author isolation checkpoint
Compared all 67 serialized entities (66 collections plus project) with the isolated schema: 818 SQL columns. The initial census found 76 non-computed fields absent from serialized models, largely stored audit actors/timestamps, plus relationship review source keys, scenario archive details and map modification time. Models and export projections now retain them. Import-as-new rebinds audit actors to the importing author while retaining stored timestamps; in-place restore keeps saved actors. The field CSV now records zero missing non-computed model properties. This is a model/projection inventory, **not** proof that every field or entity has completed a populated round trip.
Expanded real-SQL verification passed for retained relationship review keys, archived scenario date/reason and audit actor/timestamp behavior. A second synthetic author cannot access the source project, scene or backup; imported ownership belongs exclusively to that author, and the original owner cannot access the copy. Original Word bindings remain active and copied bindings require reconnection. The actual restore workflow, safety backups and real SQL constraint-failure rollback passed again. A synthetic RelationshipTypes default pointed to an absent lookup category in the schema-only database; corrected the fixture vocabulary rather than claiming a product repair.
Verification: solution build 0 warnings/errors; 405 regression checks passed (exit 0); isolated specialist `/tmp/plotdirector-phase2-transfer-stored-metadata.log` passed. Only the synthetic database received migration 214. Remaining all-entity semantic comparison, SI/review persistence, file assets and other import/export workflows remain pending. Development is still unchanged and undeployed.

View File

@ -66,7 +66,7 @@ if (args.Contains("--maps-story-dev-fixture"))
if(args.Contains("--project-transfer-database"))
{
try { await ProjectTransferDatabaseTests.RunAsync(args.Last(), args.Contains("--apply-required-migrations"), args.Contains("--require-writing-plans")); }
try { await ProjectTransferDatabaseTests.RunAsync(args.Last(), args.Contains("--apply-required-migrations"), args.Contains("--require-writing-plans"), args.Contains("--schema-coverage-only")); }
catch(Exception error) { Console.Error.WriteLine(error.Message); Environment.ExitCode=1; }
return;
}

View File

@ -18,7 +18,7 @@ internal static class ProjectTransferDatabaseTests
static void Check(bool condition, string message) { if (!condition) throw new InvalidOperationException(message); }
static T Proxy<T>(Func<string, object?[]?, object?> handler) where T : class
{ var proxy=DispatchProxy.Create<T,StoryPointProxy>();((StoryPointProxy)(object)proxy).Handler=handler;return proxy; }
public static async Task RunAsync(string target, bool applyMigrations = false, bool requireWritingPlans = false)
public static async Task RunAsync(string target, bool applyMigrations = false, bool requireWritingPlans = false, bool schemaCoverageOnly = false)
{
Check(target==Database,"An explicitly named Phase 2 synthetic database is required.");
var start=new ProcessStartInfo("sudo"){RedirectStandardOutput=true,RedirectStandardError=true};
@ -30,6 +30,12 @@ internal static class ProjectTransferDatabaseTests
builder.InitialCatalog=target;using var db=new SqlConnection(builder.ConnectionString);await db.OpenAsync();
Check(await db.ExecuteScalarAsync<string>("SELECT DB_NAME()") == Database,"Synthetic target identity failed.");
var marker=await db.ExecuteScalarAsync<int>("SELECT COUNT(*) FROM sys.extended_properties WHERE class=0 AND name=N'PlotDirector.Phase2.SyntheticOnly' AND CONVERT(nvarchar(20),value)=N'true'");
if(schemaCoverageOnly)
{
Check(marker==1,"Field inventory requires the existing synthetic-only marker.");
await EmitFieldInventoryAsync(db);
return;
}
if(marker==0)
{
Check(await db.ExecuteScalarAsync<int>("SELECT COUNT(*) FROM dbo.Projects")==0 && await db.ExecuteScalarAsync<int>("SELECT COUNT(*) FROM dbo.AppUser")==0,"Refusing to initialise a populated database.");
@ -37,7 +43,7 @@ internal static class ProjectTransferDatabaseTests
}
if(applyMigrations)
{
foreach(var file in new[]{"PlotLine/Sql/213_ProjectBackupBookContext.sql"})
foreach(var file in new[]{"PlotLine/Sql/213_ProjectBackupBookContext.sql","PlotLine/Sql/214_ProjectBackupPersistentSourceState.sql"})
foreach(var batch in System.Text.RegularExpressions.Regex.Split(await File.ReadAllTextAsync(file), @"^\s*GO\s*$", System.Text.RegularExpressions.RegexOptions.Multiline | System.Text.RegularExpressions.RegexOptions.IgnoreCase))
if(!string.IsNullOrWhiteSpace(batch)) await db.ExecuteAsync(batch,commandTimeout:180);
Console.WriteLine("Applied required migrations to the verified synthetic database only.");
@ -50,17 +56,66 @@ internal static class ProjectTransferDatabaseTests
var confidence=await db.ExecuteScalarAsync<int>("IF NOT EXISTS(SELECT 1 FROM dbo.TimeConfidences WHERE TimeConfidenceName=N'Known') INSERT dbo.TimeConfidences(TimeConfidenceName,SortOrder) VALUES(N'Known',0);SELECT TOP(1) TimeConfidenceID FROM dbo.TimeConfidences WHERE TimeConfidenceName=N'Known';");
var configuration=new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string,string?>{{"ConnectionStrings:DefaultConnection",builder.ConnectionString}}).Build();
var factory=new SqlConnectionFactory(configuration);var repository=new ImportRepository(factory);var backups=new ProjectBackupRepository(factory);
var importingUser=await db.ExecuteScalarAsync<int>("INSERT dbo.AppUser(Email,DisplayName,PasswordHash) VALUES(CONVERT(nvarchar(36),NEWID())+N'@phase2-synthetic.invalid',N'Synthetic importing author',N'not-an-authentication-credential');SELECT CONVERT(int,SCOPE_IDENTITY());");
await db.ExecuteAsync("INSERT dbo.UserSubscription(UserID,SubscriptionLevelID,IsActive,IsTrial,TrialExpiryDateUTC) VALUES(@importingUser,@level,1,1,'2030-01-01');",new{importingUser,level});
await repository.CreateProjectShellAsync("Synthetic foreign access boundary",null,importingUser);
var project=await repository.CreateProjectShellAsync("Synthetic transfer – 雨 and café", "Synthetic data only: dialogue “Hello”—and Unicode 🖋.", user);
var book=await db.ExecuteScalarAsync<int>("INSERT dbo.Books(ProjectID,BookTitle,BookNumber,SortOrder,Subtitle,StoryEra,PrimaryLocaleCode) VALUES(@project,N'Book Ω',1,1,N'Subtitle é',N'Future era',N'en-GB');SELECT CONVERT(int,SCOPE_IDENTITY());",new{project});
var book=await db.ExecuteScalarAsync<int>("INSERT dbo.Books(ProjectID,BookTitle,BookNumber,SortOrder,Subtitle,StoryEra,PrimaryLocaleCode,UsesExplicitScenes) VALUES(@project,N'Book Ω',1,1,N'Subtitle é',N'Future era',N'en-GB',1);SELECT CONVERT(int,SCOPE_IDENTITY());",new{project});
var chapter=await db.ExecuteScalarAsync<int>("INSERT dbo.Chapters(BookID,ChapterNumber,ChapterTitle,SortOrder,RevisionStatusID) VALUES(@book,1.5,N'Chapter 雨',1,@revision);SELECT CONVERT(int,SCOPE_IDENTITY());",new{book,revision});
var scene=await db.ExecuteScalarAsync<int>("INSERT dbo.Scenes(ChapterID,SceneNumber,SceneTitle,Summary,SortOrder,RevisionStatusID,TimeModeID,TimeConfidenceID) VALUES(@chapter,1.25,N'Scene café',N'“Hello”—雪 🖋',1,@revision,@timeMode,@confidence);SELECT CONVERT(int,SCOPE_IDENTITY());",new{chapter,revision,timeMode,confidence});
// Populate public reference vocabularies synthetically, without copying any live rows.
foreach(var table in new[]{"AssetCustodyEventTypes","AssetDependencyTypes","AssetEventTypes","AssetKinds","ChapterPurposeTypes","CharacterRoleInSceneTypes","CustodyRoles","DurationUnits","KnowledgeStates","LocationRelationshipTypes","LocationTypes","PlotEventTypes","PlotImportance","PlotLineTypes","PresenceTypes","RelationshipCategories","RelationshipStates","SceneAttachmentTypes","SceneDependencyTypes","SceneNoteTypes","ScenePurposeTypes","ThreadEventTypes","ThreadStatuses","ThreadTypes","WarningSeverities","WarningTypes"})
{
if(await db.ExecuteScalarAsync<int>($"SELECT COUNT(*) FROM dbo.[{table}]")>0) continue;
var columns=(await db.QueryAsync("SELECT c.name AS ColumnName,t.name AS TypeName,c.max_length AS MaxLength FROM sys.columns c JOIN sys.types t ON t.user_type_id=c.user_type_id WHERE c.object_id=OBJECT_ID(@name) AND c.is_nullable=0 AND c.is_identity=0 AND c.is_computed=0 AND c.default_object_id=0 ORDER BY c.column_id",new{name="dbo."+table})).ToArray();
var values=new DynamicParameters();var names=new List<string>();var parameters=new List<string>();
for(var index=0;index<columns.Length;index++)
{
string column=columns[index].ColumnName,type=columns[index].TypeName;int maxLength=columns[index].MaxLength;
object value=type switch { "nvarchar" or "varchar" or "nchar" or "char"=>"Synthetic", "bit"=>column=="IsOpenStatus", "int" or "smallint" or "tinyint" or "bigint"=>column=="SortOrder"?0:1, "decimal" or "numeric" or "float"=>1m, "datetime" or "datetime2" or "date"=>new DateTime(2026,11,3), "uniqueidentifier"=>Guid.NewGuid(), _=>throw new InvalidOperationException("Unsupported synthetic reference column: "+table+"."+column) };
if(value is string text && maxLength>0) {var limit=type.StartsWith('n')?maxLength/2:maxLength;value=text[..Math.Min(text.Length,limit)];}
names.Add("["+column.Replace("]","]]")+"]");parameters.Add("@v"+index);values.Add("v"+index,value);
}
await db.ExecuteAsync($"INSERT dbo.[{table}]({string.Join(',',names)}) VALUES({string.Join(',',parameters)})",values);
}
async Task<int> Lookup(string table,string idColumn,string nameColumn,string name)
{
var extraColumns=table=="ThreadStatuses" ? ",IsOpenStatus,IsResolvedStatus" : table=="ThreadEventTypes" ? ",MarkerText" : "";
var extraValues=table=="ThreadStatuses" ? ",1,0" : table=="ThreadEventTypes" ? ",N'R'" : "";
return await db.ExecuteScalarAsync<int>($"IF NOT EXISTS(SELECT 1 FROM dbo.[{table}] WHERE [{nameColumn}]=@name) INSERT dbo.[{table}]([{nameColumn}],SortOrder{extraColumns}) VALUES(@name,0{extraValues});SELECT TOP(1) [{idColumn}] FROM dbo.[{table}] WHERE [{nameColumn}]=@name;",new{name});
}
var kind=await Lookup("AssetKinds","AssetKindID","KindName","Object");
var importance=await db.ExecuteScalarAsync<int>("SELECT TOP(1) PlotImportanceID FROM dbo.PlotImportance ORDER BY SortOrder,PlotImportanceID");
var lineType=await Lookup("PlotLineTypes","PlotLineTypeID","TypeName","Main");
var threadType=await Lookup("ThreadTypes","ThreadTypeID","TypeName","Question");
var threadStatus=await Lookup("ThreadStatuses","ThreadStatusID","StatusName","Open");
var plotEventType=await db.ExecuteScalarAsync<int>("SELECT TOP(1) PlotEventTypeID FROM dbo.PlotEventTypes ORDER BY SortOrder,PlotEventTypeID");
var eventType=await Lookup("ThreadEventTypes","ThreadEventTypeID","TypeName","Reveal");
var character=await db.ExecuteScalarAsync<int>("INSERT dbo.Characters(ProjectID,CharacterName,AgeReferenceSceneID) VALUES(@project,N'Narrator Ω',@scene);SELECT CONVERT(int,SCOPE_IDENTITY());",new{project,scene});
var observer=await db.ExecuteScalarAsync<int>("INSERT dbo.Characters(ProjectID,CharacterName) VALUES(@project,N'Observer 雪');SELECT CONVERT(int,SCOPE_IDENTITY());",new{project});
var relationshipType=await Lookup("RelationshipTypes","RelationshipTypeID","TypeName","Friend");
await db.ExecuteAsync("UPDATE dbo.RelationshipTypes SET RelationshipCategoryID=(SELECT TOP(1) RelationshipCategoryID FROM dbo.RelationshipCategories ORDER BY SortOrder,RelationshipCategoryID) WHERE RelationshipTypeID=@relationshipType",new{relationshipType});
var relationshipState=await db.ExecuteScalarAsync<int>("SELECT TOP(1) RelationshipStateID FROM dbo.RelationshipStates ORDER BY SortOrder,RelationshipStateID");
var relationship=await db.ExecuteScalarAsync<int>("INSERT dbo.CharacterRelationships(ProjectID,CharacterAID,CharacterBID,RelationshipTypeID) VALUES(@project,@character,@observer,@relationshipType);SELECT CONVERT(int,SCOPE_IDENTITY());",new{project,character,observer,relationshipType});
await db.ExecuteAsync("INSERT dbo.RelationshipEvents(CharacterRelationshipID,SceneID,RelationshipStateID,SourceReviewKey) VALUES(@relationship,@scene,@relationshipState,N'synthetic-review-source-key');INSERT dbo.Scenarios(ProjectID,BookID,ScenarioName,BaseCreatedDate,IsArchived,ArchivedDate,ArchivedReason) VALUES(@project,@book,N'Archived alternative Ω',SYSUTCDATETIME(),1,'2026-10-12',N'Synthetic archive reason 雨');",new{project,book,relationship,scene,relationshipState});
var location=await db.ExecuteScalarAsync<int>("INSERT dbo.Locations(ProjectID,LocationName) VALUES(@project,N'Room Ω');SELECT CONVERT(int,SCOPE_IDENTITY());",new{project});
var asset=await db.ExecuteScalarAsync<int>("INSERT dbo.StoryAssets(ProjectID,AssetName,AssetKindID) VALUES(@project,N'Notebook 雨',@kind);SELECT CONVERT(int,SCOPE_IDENTITY());",new{project,kind});
var line=await db.ExecuteScalarAsync<int>("INSERT dbo.PlotLines(ProjectID,PlotLineName,PlotLineTypeID,SortOrder,PlotImportanceID) VALUES(@project,N'Arc Ω',@lineType,1,@importance);SELECT CONVERT(int,SCOPE_IDENTITY());",new{project,lineType,importance});
var secondLine=await db.ExecuteScalarAsync<int>("INSERT dbo.PlotLines(ProjectID,PlotLineName,PlotLineTypeID,SortOrder,PlotImportanceID) VALUES(@project,N'Second arc 雨',@lineType,2,@importance);SELECT CONVERT(int,SCOPE_IDENTITY());",new{project,lineType,importance});
var thread=await db.ExecuteScalarAsync<int>("INSERT dbo.PlotThreads(PlotLineID,ThreadTitle,ThreadTypeID,ThreadStatusID) VALUES(@line,N'Question Ω',@threadType,@threadStatus);SELECT CONVERT(int,SCOPE_IDENTITY());",new{line,threadType,threadStatus});
var threadEvent=await db.ExecuteScalarAsync<int>("INSERT dbo.ThreadEvents(PlotThreadID,SceneID,EventTypeID,PlotEventTypeID,EventTitle) VALUES(@thread,@scene,@eventType,@plotEventType,N'Revelation 雪');SELECT CONVERT(int,SCOPE_IDENTITY());",new{thread,scene,eventType,plotEventType});
await db.ExecuteAsync("UPDATE dbo.Chapters SET POVCharacterID=@character WHERE ChapterID=@chapter;UPDATE dbo.Scenes SET POVCharacterID=@character,PrimaryLocationID=@location WHERE SceneID=@scene;INSERT dbo.CharacterAliases(CharacterID,Alias) VALUES(@character,N'N. Ω');INSERT dbo.AssetAliases(StoryAssetID,Alias) VALUES(@asset,N'Café notebook');INSERT dbo.LocationAliases(LocationID,Alias) VALUES(@location,N'Room 雨');INSERT dbo.AuthorPlotSeeds(ProjectID,BookID,Description,MatchedPlotLineID) VALUES(@project,@book,N'The author’s Unicode intention 雪',@secondLine);INSERT dbo.ContinuityWarningAcknowledgements(ProjectID,WarningType,SceneID,CharacterID,AssetID,AcknowledgedByUserID,Notes) VALUES(@project,N'SyntheticWarning',@scene,@character,@asset,@user,N'Author acknowledgement café');INSERT dbo.PlotEventTargetPlotLines(PlotEventID,PlotLineID) VALUES(@threadEvent,@secondLine);",new{project,book,chapter,scene,character,location,asset,user,secondLine,threadEvent});
var documentId=await db.ExecuteScalarAsync<int>("INSERT dbo.ManuscriptDocuments(ProjectID,BookID,DocumentGuid,CreatedByUserID) VALUES(@project,@book,NEWID(),@user);SELECT CONVERT(int,SCOPE_IDENTITY());",new{project,book,user});
await db.ExecuteAsync("UPDATE dbo.Chapters SET ManuscriptDocumentID=@documentId,IsLinkedToManuscript=1,ExternalReference=CONVERT(nvarchar(36),NEWID()),LinkedUtc=SYSUTCDATETIME() WHERE ChapterID=@chapter;UPDATE dbo.Scenes SET ManuscriptDocumentID=@documentId,IsLinkedToManuscript=1,ExternalReference=CONVERT(nvarchar(36),NEWID()),LinkedUtc=SYSUTCDATETIME() WHERE SceneID=@scene;",new{documentId,chapter,scene});
const string manuscriptText="“Hello”—雪 🖋\n\nSecond paragraph café.";
await db.ExecuteAsync("INSERT dbo.SceneManuscriptSources(SceneID,ProjectID,BookID,ChapterID,SourceText,SourceWordCount,SourceCharacterCount,SourceStartParagraph,SourceEndParagraph,WordStartParagraphIndex,WordEndParagraphIndex,SourceKind) VALUES(@scene,@project,@book,@chapter,@text,6,@length,1,2,0,1,N'WordCompanion');INSERT dbo.ManuscriptStructuralChapterSources(ChapterID,ProjectID,BookID,SourceText,SourceWordCount,SourceCharacterCount,ParagraphMapJson,StructuralParsedJson,DefaultPovName,ExplicitNarratorName) VALUES(@chapter,@project,@book,@text,6,@length,N'[{\"index\":0,\"start\":0,\"length\":10}]',N'{\"summary\":\"Synthetic source\"}',N'Synthetic narrator',N'Synthetic narrator');",new{scene,project,book,chapter,text=manuscriptText,length=manuscriptText.Length});
var map=await db.ExecuteScalarAsync<int>("INSERT dbo.StoryMaps(ProjectID,Name,Kind,AppearanceJson) VALUES(@project,N'Synthetic map 雨',N'World',N'{\"preset\":\"paper\"}');SELECT CONVERT(int,SCOPE_IDENTITY());",new{project});
var maps=new MapRepository(factory);
var image=await maps.AddImageAsync(project,user,MapReferenceImageService.Normalize(MapAppearanceTests.Image(),"synthetic-reference.png"));
var sourceImageBytes=(await maps.GetImageAsync(project,user,image.ImageID))!.ImageData!;
var document=(await maps.GetAsync(project,map,user))!;
document.Map.ReferenceJson=JsonSerializer.Serialize(new MapReferencePlacement { ImageID=image.ImageID, X=15, Y=25, Width=640, Height=480, Rotation=12, Opacity=.45 });
var first=new MapFeature { MapID=map, Name="Port Ω", Type="Town", X=12, Y=34, LabelX=5, LabelY=6, Notes="Unicode 雨", GeometryJson="{}" };
var first=new MapFeature { MapID=map, Name="Port Ω", Type="Town", LocationID=location, X=12, Y=34, LabelX=5, LabelY=6, Notes="Unicode 雨", GeometryJson="{}" };
var second=new MapFeature { MapID=map, Name="Island 雪", GeometryClass="Area", Type="Island", X=56, Y=78, Width=160, Height=80, GeometryJson="{\"points\":[[0,0],[1,1],[0,1]]}" };
document.Features=[first,second];
document.Relationships=[new() { MapID=map, SourceID=first.FeatureID, TargetID=second.FeatureID, Direction="NE", MeasuredDistance=12.5m, Unit="km", Notes="Synthetic relationship café" }];
@ -68,12 +123,17 @@ internal static class ProjectTransferDatabaseTests
await maps.CreateAsync(new() { ProjectID=project, Name="Child map 雨", Kind="Region", ParentMapID=map, ParentFeatureID=first.FeatureID },user);
var plan=await db.ExecuteScalarAsync<int>("INSERT dbo.WritingPlans(UserID,ProjectID,BookID,PlanName,GoalType,StartDate,DeadlineDate,AvailableDaysJson,SessionLengthMinutes) VALUES(@user,@project,@book,N'Synthetic drafting plan',N'Draft','2026-11-01','2026-12-01',N'[1,3,5]',45);SELECT CONVERT(int,SCOPE_IDENTITY());",new{user,project,book});
await db.ExecuteAsync("INSERT dbo.WritingScheduleItems(WritingPlanID,SceneID,ScheduledDate,TaskType,ScheduleStatus,Notes) VALUES(@plan,@scene,'2026-11-03',N'Draft',N'Pending',N'Synthetic task café');",new{plan,scene});
await db.ExecuteAsync("UPDATE dbo.Books SET CreatedByUserID=@user,ModifiedByUserID=@user,CreatedDateUTC='2026-09-01',ModifiedDateUTC='2026-10-01' WHERE BookID=@book;UPDATE dbo.Scenes SET CreatedByUserID=@user,ModifiedByUserID=@user,CreatedDateUTC='2026-09-01',ModifiedDateUTC='2026-10-01' WHERE SceneID=@scene;",new{user,book,scene});
var before=(await backups.GetProjectBackupAsync(project,user))!;Check(before.Project is not null,"Fixture project exported.");
Check(before.Data.Books.Single().BookTitle=="Book Ω" && before.Data.Scenes.Single().Summary=="“Hello”—雪 🖋","Core Unicode export content.");
Console.WriteLine($"Synthetic project {project}: core, map and writing schedule populated; {before.Diagnostics.IncludedEntitySets.Count} advertised backup sets.");
var userService=Proxy<ICurrentUserService>((name,args)=>name switch {"get_UserId"=>(int?)user,"get_IsAuthenticated"=>true,"get_Email"=>"phase2-synthetic@example.invalid","get_DisplayName"=>"Synthetic author",_=>throw new NotSupportedException(name)});
var subscription=Proxy<ISubscriptionService>((name,args)=>name switch {"CanUseResourcesAsync"=>Task.FromResult(new EntitlementDecision{Allowed=true}),"ReserveBookSlotsAsync"=>Task.FromResult(new BookSlotReservation{Allowed=true}),_=>throw new NotSupportedException(name)});
var service=new ImportService(repository,userService,subscription,NullLogger<ImportService>.Instance);
var access=new ProjectAccessRepository(factory);
Check(!await access.UserCanAccessProjectAsync(project,importingUser) && !await access.UserCanAccessEntityAsync("Scene",scene,importingUser),"Second author cannot access the source project or scene.");
Check(await backups.GetProjectBackupAsync(project,importingUser) is null,"Source project backup does not cross authors.");
var importUserService=Proxy<ICurrentUserService>((name,args)=>name switch {"get_UserId"=>(int?)importingUser,"get_IsAuthenticated"=>true,"get_Email"=>"phase2-importer@example.invalid","get_DisplayName"=>"Synthetic importing author",_=>throw new NotSupportedException(name)});
var service=new ImportService(repository,importUserService,subscription,NullLogger<ImportService>.Instance);
var baselineProjectCount=await db.ExecuteScalarAsync<int>("SELECT COUNT(*) FROM dbo.Projects");
var sourceJson=JsonSerializer.Serialize(before);
var invalidPayloads=new List<string>{"null","[]","42"};
@ -110,8 +170,9 @@ internal static class ProjectTransferDatabaseTests
var result=await service.ImportAsync(new ImportIndexViewModel {JsonText=JsonSerializer.Serialize(before),ConfirmImport=true,AcknowledgeWarnings=true,AllowDuplicateProjectTitle=true});
Console.WriteLine($"Import result: {result.Succeeded}; {result.Message}; {result.TechnicalDetail}");
Check(result.Succeeded,"Full project backup import must preserve a synthetic map and core structure.");
var after=(await backups.GetProjectBackupAsync(result.ProjectID!.Value,user))!;
var after=(await backups.GetProjectBackupAsync(result.ProjectID!.Value,importingUser))!;
Check(after.Data.StoryMaps.Count==2,"Restored maps are present.");
Check(await access.UserCanOwnProjectAsync(result.ProjectID!.Value,importingUser) && !await access.UserCanAccessProjectAsync(result.ProjectID.Value,user),"Imported project belongs only to its importing author.");
var restoredMap=after.Data.StoryMaps.Single(x=>x.Name=="Synthetic map 雨");
Check(restoredMap.MapID!=map && after.Data.StoryMaps.Single(x=>x.Name=="Child map 雨").ParentMapID==restoredMap.MapID,"Map hierarchy is remapped.");
Check(after.Data.MapFeatures.Count==2 && after.Data.MapFeatures.Single(x=>x.Name=="Island 雪").GeometryJson==second.GeometryJson,"Map shapes and Unicode retained.");
@ -120,10 +181,76 @@ internal static class ProjectTransferDatabaseTests
Check(restoredImage.ImageID!=image.ImageID && restoredImage.ImageData!.SequenceEqual(sourceImageBytes),"Embedded image ID remapped and exact bytes retained.");
Check(MapAppearanceJson.Read<MapReferencePlacement>(restoredMap.ReferenceJson).ImageID==restoredImage.ImageID,"Map image placement references the new embedded asset.");
Check((await maps.GetAsync(project,map,user))!.Map.Name=="Synthetic map 雨","Original project remains unchanged.");
Check(after.Data.Books.Single().StoryEra=="Future era" && after.Data.Books.Single().PrimaryLocaleCode=="en-GB","Book era and locale preserved.");
Check(after.Data.Books.Single().StoryEra=="Future era" && after.Data.Books.Single().PrimaryLocaleCode=="en-GB" && after.Data.Books.Single().UsesExplicitScenes,"Book era and locale preserved.");
var restoredPlans=await db.ExecuteScalarAsync<int>("SELECT COUNT(*) FROM dbo.WritingPlans WHERE ProjectID=@id",new{id=result.ProjectID});
Console.WriteLine($"Writing plan coverage: source=1, imported={restoredPlans}; separate coverage gate.");
if(requireWritingPlans) Check(restoredPlans==1,"Persistent writing plan restored.");
Console.WriteLine("PASS isolated SQL maps/assets/hierarchy and book-context backup/import comparison; other entity coverage remains pending.");
if(before.FormatVersion=="1.2" || requireWritingPlans) Check(restoredPlans==1,"Persistent writing plan restored.");
var importedPlan=after.Data.WritingPlans.Single();var importedTask=after.Data.WritingScheduleItems.Single();
Check(importedPlan.WritingPlanID!=plan && importedPlan.ProjectID==after.Project!.ProjectID && importedPlan.BookID==after.Data.Books.Single().BookID && importedPlan.UserID==importingUser,"Writing plan ownership and project/book remapping.");
Check(importedPlan.PlanName=="Synthetic drafting plan" && importedPlan.AvailableDaysJson=="[1,3,5]" && importedPlan.SessionLengthMinutes==45 && importedPlan.DeadlineDate.Date==new DateTime(2026,12,1),"Writing plan settings and deadline retained.");
Check(importedTask.WritingPlanID==importedPlan.WritingPlanID && importedTask.SceneID==after.Data.Scenes.Single().SceneID && importedTask.Notes=="Synthetic task café" && importedTask.ScheduledDate.Date==new DateTime(2026,11,3),"Scheduled task content, date and scene references retained.");
Check(after.Data.CharacterAliases.Single().Alias=="N. Ω" && after.Data.CharacterAliases.Single().CharacterID==after.Data.Characters.Single(x=>x.CharacterName=="Narrator Ω").CharacterID,"Character alias text and remapped identity retained.");
Check(after.Data.AssetAliases.Single().Alias=="Café notebook" && after.Data.AssetAliases.Single().StoryAssetID==after.Data.StoryAssets.Single().StoryAssetID,"Asset alias retained.");
Check(after.Data.LocationAliases.Single().Alias=="Room 雨" && after.Data.LocationAliases.Single().LocationID==after.Data.Locations.Single().LocationID,"Location alias retained.");
Check(after.Data.AuthorPlotSeeds.Single().Description=="The author’s Unicode intention 雪" && after.Data.AuthorPlotSeeds.Single().MatchedPlotLineID==after.Data.PlotLines.Single(x=>x.PlotLineName=="Second arc 雨").PlotLineID,"Authored plot seed and target retained.");
var acknowledgement=after.Data.ContinuityWarningAcknowledgements.Single();
Check(acknowledgement.Notes=="Author acknowledgement café" && acknowledgement.SceneID==after.Data.Scenes.Single().SceneID && acknowledgement.CharacterID==after.Data.Characters.Single(x=>x.CharacterName=="Narrator Ω").CharacterID && acknowledgement.AssetID==after.Data.StoryAssets.Single().StoryAssetID,"Acknowledged warning and all entity references retained.");
Check(after.Data.PlotEventTargetPlotLines.Single().PlotEventID==after.Data.ThreadEvents.Single().ThreadEventID && after.Data.PlotEventTargetPlotLines.Single().PlotLineID==after.Data.PlotLines.Single(x=>x.PlotLineName=="Second arc 雨").PlotLineID,"Additional plot-event target retained.");
Check(after.Data.RelationshipEvents.Single().SourceReviewKey=="synthetic-review-source-key" && after.Data.RelationshipEvents.Single().CharacterRelationshipID==after.Data.CharacterRelationships.Single().CharacterRelationshipID,"Relationship review source key and relationship link retained.");
Check(after.Data.Scenarios.Single().ArchivedReason=="Synthetic archive reason 雨" && after.Data.Scenarios.Single().ArchivedDate==new DateTime(2026,10,12),"Scenario archive reason and date retained.");
Check(after.Data.Books.Single().CreatedByUserID==importingUser && after.Data.Books.Single().CreatedDateUTC==new DateTime(2026,9,1) && after.Data.Scenes.Single().ModifiedDateUTC==new DateTime(2026,10,1),"Imported audit actors are rebound while stored audit timestamps are retained.");
var savedSource=after.Data.SceneManuscriptSources.Single();var structuralSource=after.Data.ManuscriptStructuralChapterSources.Single();
Check(savedSource.SourceText==manuscriptText && savedSource.SceneID==after.Data.Scenes.Single().SceneID && savedSource.BookID==after.Data.Books.Single().BookID && savedSource.SourceStartParagraph==1 && savedSource.WordEndParagraphIndex==1,"Exact Unicode manuscript text, paragraph coordinates and scene/book mapping retained.");
Check(structuralSource.SourceText==manuscriptText && structuralSource.ParagraphMapJson==before.Data.ManuscriptStructuralChapterSources.Single().ParagraphMapJson && structuralSource.DefaultPovName=="Synthetic narrator","Structural chapter source and parsing context retained.");
var copiedDocument=after.Data.ManuscriptDocuments.Single();
Check(copiedDocument.DocumentGuid!=before.Data.ManuscriptDocuments.Single().DocumentGuid && !copiedDocument.IsActive && !after.Data.Scenes.Single().IsLinkedToManuscript && after.Data.Scenes.Single().ManuscriptDocumentID==copiedDocument.ManuscriptDocumentID,"Copied Word binding is isolated and explicitly awaits reconnection.");
Check((await db.QuerySingleAsync<ManuscriptDocumentModel>("SELECT * FROM dbo.ManuscriptDocuments WHERE ManuscriptDocumentID=@id",new{id=documentId})).IsActive,"Original manuscript binding remains active.");
var activity=Proxy<IProjectActivityService>((name,args)=>name=="RecordAsync" ? Task.CompletedTask : throw new NotSupportedException(name));
var exportService=new ProjectExportService(backups,activity,userService,NullLogger<ProjectExportService>.Instance);
var pointRepository=new ProjectRestorePointRepository(factory);
var pointService=new ProjectRestorePointService(new ProjectRepository(factory),exportService,pointRepository,NullLogger<ProjectRestorePointService>.Instance);
var restoreService=new ProjectRestoreService(pointRepository,pointService,NullLogger<ProjectRestoreService>.Instance);
var savedPoint=(await pointService.CreateManualAsync(project,"Synthetic baseline","Round-trip fixture"))!;
await db.ExecuteAsync("UPDATE dbo.SceneManuscriptSources SET SourceText=N'Changed source' WHERE SceneID=@scene;UPDATE dbo.WritingPlans SET PlanName=N'Changed plan' WHERE WritingPlanID=@plan;UPDATE dbo.CharacterAliases SET Alias=N'Changed alias' WHERE CharacterID=@character;",new{scene,plan,character});
var restored=await restoreService.RestoreAsync(project,savedPoint.ProjectRestorePointID);
Check(restored.Succeeded && restored.SafetyBackup is not null,"Actual restore workflow creates a safety backup and succeeds.");
var sameProject=(await backups.GetProjectBackupAsync(project,user))!;
Check(sameProject.Data.SceneManuscriptSources.Single().SourceText==manuscriptText && sameProject.Data.WritingPlans.Single().PlanName=="Synthetic drafting plan" && sameProject.Data.CharacterAliases.Single().Alias=="N. Ω","Same-project restore recovers text, schedule and authored alias.");
Check(sameProject.Data.ManuscriptDocuments.Single().DocumentGuid==before.Data.ManuscriptDocuments.Single().DocumentGuid && sameProject.Data.ManuscriptDocuments.Single().IsActive && sameProject.Data.Scenes.Single().IsLinkedToManuscript,"Same-project restore preserves original Word binding.");
var badRestore=System.Text.Json.Nodes.JsonNode.Parse(JsonSerializer.Serialize(sameProject))!.AsObject();
var duplicate=badRestore["Data"]!["MapReferenceImages"]![0]!.DeepClone();duplicate["ImageID"]=Guid.NewGuid().ToString();badRestore["Data"]!["MapReferenceImages"]!.AsArray().Add(duplicate);
var badPoint=await pointRepository.CreateAsync(project,"Invalid synthetic duplicate image","Manual",badRestore.ToJsonString(),"Expected SQL rollback");
var failedRestore=await restoreService.RestoreAsync(project,badPoint.ProjectRestorePointID);
Check(!failedRestore.Succeeded && failedRestore.SafetyBackup is not null,"Failed SQL restore retains its safety backup.");
var afterFailedRestore=(await backups.GetProjectBackupAsync(project,user))!;
Check(JsonSerializer.Serialize(afterFailedRestore.Data)==JsonSerializer.Serialize(sameProject.Data),"Failed restore leaves every serialized source field unchanged.");
var foreignRestore=await restoreService.RestoreAsync(result.ProjectID.Value,savedPoint.ProjectRestorePointID);
Check(!foreignRestore.Succeeded && foreignRestore.SafetyBackup is null,"Restore point cannot cross project boundaries.");
Console.WriteLine("PASS isolated SQL maps/assets/hierarchy, sources, schedules, aliases, plot seeds/targets, acknowledgements and actual restore safety/rollback; other entity coverage remains pending.");
}
private static async Task EmitFieldInventoryAsync(SqlConnection db)
{
var aliases=new Dictionary<string,string> { ["TimelineSettings"]="ProjectTimelineSettings", ["TimelineMetricSettings"]="ProjectTimelineMetricSettings", ["AssetCustodyCharacters"]="AssetCustodyEventCharacters", ["ProjectAccess"]="ProjectUserAccess", ["UserFiles"]="UserFile" };
var entities=typeof(ProjectBackupData).GetProperties().Select(property=>(Collection:property.Name,Table:aliases.GetValueOrDefault(property.Name,property.Name),Model:property.PropertyType.GetGenericArguments().Single())).ToList();
entities.Add(("Project","Projects",typeof(Project)));
var output=new List<string>{"Table,Collection,Column,SqlType,Nullable,Computed,WritableModelProperty,Classification"};
var missing=new List<string>();
foreach(var entity in entities.OrderBy(x=>x.Table))
{
var columns=await db.QueryAsync("SELECT c.name AS ColumnName,t.name AS TypeName,c.is_nullable AS IsNullable,c.is_computed AS IsComputed FROM sys.columns c JOIN sys.types t ON t.user_type_id=c.user_type_id WHERE c.object_id=OBJECT_ID(@name) ORDER BY c.column_id",new{name="dbo."+entity.Table});
foreach(var column in columns)
{
string name=column.ColumnName;bool computed=column.IsComputed;
var property=entity.Model.GetProperty(name,BindingFlags.Public|BindingFlags.Instance|BindingFlags.IgnoreCase);
var represented=property?.CanWrite==true;
var classification=computed ? "Computed database value" : represented ? "Represented; projection and semantic comparison still required" : "Missing from serialized model; review required";
output.Add(string.Join(',',new[]{entity.Table,entity.Collection,name,(string)column.TypeName,((bool)column.IsNullable).ToString(),computed.ToString(),represented.ToString(),classification}));
if(!computed&&!represented) missing.Add(entity.Table+"."+name);
}
}
await File.WriteAllLinesAsync("Docs/Sprints/2026-11-03-phase2-field-coverage.csv",output);
Console.WriteLine($"Field inventory: {entities.Count} entities / {output.Count-1} columns / {missing.Count} non-computed columns missing from serialized models.");
Console.WriteLine(string.Join(", ",missing));
}
}

View File

@ -89,6 +89,21 @@ public sealed class ProjectBackupRepository(ISqlConnectionFactory connectionFact
data.MapReferenceImages = (await mapRows.ReadAsync<MapReferenceImage>()).ToList();
}
using (var state = await connection.QueryMultipleAsync("dbo.ProjectBackup_PersistentState_List", new { ProjectID = projectId }, commandType: CommandType.StoredProcedure, commandTimeout: 180))
{
data.ManuscriptDocuments = (await state.ReadAsync<ManuscriptDocumentModel>()).ToList();
data.SceneManuscriptSources = (await state.ReadAsync<ProjectBackupSceneManuscriptSource>()).ToList();
data.ManuscriptStructuralChapterSources = (await state.ReadAsync<ProjectBackupStructuralChapterSource>()).ToList();
data.WritingPlans = (await state.ReadAsync<WritingPlan>()).ToList();
data.WritingScheduleItems = (await state.ReadAsync<WritingScheduleItem>()).ToList();
data.CharacterAliases = (await state.ReadAsync<CharacterAlias>()).ToList();
data.AssetAliases = (await state.ReadAsync<AssetAlias>()).ToList();
data.LocationAliases = (await state.ReadAsync<LocationAlias>()).ToList();
data.AuthorPlotSeeds = (await state.ReadAsync<AuthorPlotSeed>()).ToList();
data.ContinuityWarningAcknowledgements = (await state.ReadAsync<ContinuityWarningAcknowledgement>()).ToList();
data.PlotEventTargetPlotLines = (await state.ReadAsync<ProjectBackupPlotEventTarget>()).ToList();
}
var bookMetadata = (await connection.QueryAsync<Book>(
"dbo.ProjectBackup_BookMetadata_List",
new { ProjectID = projectId },
@ -125,6 +140,17 @@ public sealed class ProjectBackupRepository(ISqlConnectionFactory connectionFact
ProjectId = projectId,
IncludedEntitySets =
[
nameof(data.ManuscriptDocuments),
nameof(data.SceneManuscriptSources),
nameof(data.ManuscriptStructuralChapterSources),
nameof(data.WritingPlans),
nameof(data.WritingScheduleItems),
nameof(data.CharacterAliases),
nameof(data.AssetAliases),
nameof(data.LocationAliases),
nameof(data.AuthorPlotSeeds),
nameof(data.ContinuityWarningAcknowledgements),
nameof(data.PlotEventTargetPlotLines),
nameof(data.Books),
nameof(data.Chapters),
nameof(data.Scenes),

View File

@ -17,6 +17,10 @@ public static class BookTitleFormatter
public sealed class Project
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int ProjectID { get; set; }
public string ProjectName { get; set; } = string.Empty;
public string? Description { get; set; }
@ -224,6 +228,10 @@ public sealed class GenreMetricPreset
public sealed class Book
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int BookID { get; set; }
public int ProjectID { get; set; }
public string BookTitle { get; set; } = string.Empty;
@ -388,6 +396,10 @@ public static class BookStatuses
public sealed class Chapter
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int ChapterID { get; set; }
public int BookID { get; set; }
public decimal ChapterNumber { get; set; }
@ -417,6 +429,10 @@ public sealed class Chapter
public sealed class Scene
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int SceneID { get; set; }
public int ChapterID { get; set; }
public int BookID { get; set; }
@ -665,6 +681,10 @@ public sealed class PlotImportance
public sealed class PlotLineItem
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int PlotLineID { get; set; }
public int ProjectID { get; set; }
public int? BookID { get; set; }
@ -709,6 +729,10 @@ public sealed class ThreadStatus
public sealed class PlotThread
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int PlotThreadID { get; set; }
public int PlotLineID { get; set; }
public int ProjectID { get; set; }
@ -749,6 +773,10 @@ public sealed class PlotEventType
public sealed class ThreadEvent
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int ThreadEventID { get; set; }
public int PlotThreadID { get; set; }
public string ThreadTitle { get; set; } = string.Empty;
@ -828,6 +856,10 @@ public sealed class AssetState
public sealed class StoryAsset
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int StoryAssetID { get; set; }
public int ProjectID { get; set; }
public string AssetName { get; set; } = string.Empty;
@ -862,6 +894,10 @@ public sealed class AssetEventType
public sealed class AssetEvent
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int AssetEventID { get; set; }
public int StoryAssetID { get; set; }
public int ProjectID { get; set; }
@ -990,6 +1026,10 @@ public sealed class AssetLookupData
public sealed class Character
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int CharacterID { get; set; }
public int ProjectID { get; set; }
public string CharacterName { get; set; } = string.Empty;
@ -1283,6 +1323,10 @@ public sealed class RelationshipState
public sealed class CharacterRelationship
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int CharacterRelationshipID { get; set; }
public int ProjectID { get; set; }
public int CharacterAID { get; set; }
@ -1319,6 +1363,11 @@ public sealed class CharacterRelationship
public sealed class RelationshipEvent
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public string? SourceReviewKey { get; set; }
public int RelationshipEventID { get; set; }
public int CharacterRelationshipID { get; set; }
public int ProjectID { get; set; }
@ -1388,6 +1437,10 @@ public sealed class LocationRelationshipType
public sealed class LocationItem
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int LocationID { get; set; }
public int ProjectID { get; set; }
public int? ParentLocationID { get; set; }
@ -2120,6 +2173,10 @@ public sealed class SceneNoteType
public sealed class SceneNote
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int SceneNoteID { get; set; }
public int SceneID { get; set; }
public int SceneNoteTypeID { get; set; }
@ -2135,6 +2192,10 @@ public sealed class SceneNote
public sealed class ChapterGoal
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int ChapterGoalID { get; set; }
public int ChapterID { get; set; }
public string? GoalSummary { get; set; }
@ -2148,6 +2209,10 @@ public sealed class ChapterGoal
public sealed class SceneWorkflow
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int SceneWorkflowID { get; set; }
public int SceneID { get; set; }
public string DraftStatus { get; set; } = "Planned";
@ -2167,6 +2232,10 @@ public sealed class SceneWorkflow
public sealed class SceneChecklistItem
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int SceneChecklistItemID { get; set; }
public int SceneID { get; set; }
public string ItemText { get; set; } = string.Empty;
@ -2186,6 +2255,10 @@ public sealed class SceneAttachmentType
public sealed class SceneAttachment
{
public int? CreatedByUserID { get; set; }
public int? ModifiedByUserID { get; set; }
public DateTime? CreatedDateUTC { get; set; }
public DateTime? ModifiedDateUTC { get; set; }
public int SceneAttachmentID { get; set; }
public int SceneID { get; set; }
public int SceneAttachmentTypeID { get; set; }
@ -2543,6 +2616,8 @@ public sealed class DynamicsIssue
public sealed class Scenario
{
public DateTime? ArchivedDate { get; set; }
public string? ArchivedReason { get; set; }
public int ScenarioID { get; set; }
public int ProjectID { get; set; }
public int? BookID { get; set; }

View File

@ -3,6 +3,7 @@ namespace PlotLine.Models;
public sealed class StoryMap
{
public DateTime ModifiedDate { get; set; }
public int MapID { get; set; }
public int ProjectID { get; set; }
public int? ParentMapID { get; set; }

View File

@ -3,7 +3,7 @@ namespace PlotLine.Models;
public sealed class ProjectBackupExport
{
public string Format { get; init; } = "PlotDirector.ProjectBackup";
public string FormatVersion { get; init; } = "1.1";
public string FormatVersion { get; init; } = "1.2";
public DateTime ExportedAtUtc { get; init; }
public string SourceApplication { get; init; } = "PlotDirector";
public Project? Project { get; init; }
@ -13,6 +13,18 @@ public sealed class ProjectBackupExport
public sealed class ProjectBackupData
{
public IReadOnlyList<ManuscriptDocumentModel> ManuscriptDocuments { get; set; } = [];
public IReadOnlyList<ProjectBackupSceneManuscriptSource> SceneManuscriptSources { get; set; } = [];
public IReadOnlyList<ProjectBackupStructuralChapterSource> ManuscriptStructuralChapterSources { get; set; } = [];
public IReadOnlyList<WritingPlan> WritingPlans { get; set; } = [];
public IReadOnlyList<WritingScheduleItem> WritingScheduleItems { get; set; } = [];
public IReadOnlyList<CharacterAlias> CharacterAliases { get; set; } = [];
public IReadOnlyList<AssetAlias> AssetAliases { get; set; } = [];
public IReadOnlyList<LocationAlias> LocationAliases { get; set; } = [];
public IReadOnlyList<AuthorPlotSeed> AuthorPlotSeeds { get; set; } = [];
public IReadOnlyList<ContinuityWarningAcknowledgement> ContinuityWarningAcknowledgements { get; set; } = [];
public IReadOnlyList<ProjectBackupPlotEventTarget> PlotEventTargetPlotLines { get; set; } = [];
public IReadOnlyList<MapReferenceImage> MapReferenceImages { get; set; } = [];
public IReadOnlyList<MapJourneyNote> MapJourneyNotes { get; set; } = [];
public IReadOnlyList<StoryMap> StoryMaps { get; set; } = [];
@ -169,3 +181,44 @@ public sealed class ProjectBackupAccessRecord
public DateTime? AcceptedDateUTC { get; set; }
public bool IsActive { get; set; }
}
public sealed class ProjectBackupSceneManuscriptSource
{
public int SceneID { get; set; }
public int ProjectID { get; set; }
public int BookID { get; set; }
public int ChapterID { get; set; }
public string SourceText { get; set; } = string.Empty;
public int SourceWordCount { get; set; }
public int SourceCharacterCount { get; set; }
public int? SourceStartParagraph { get; set; }
public int? SourceEndParagraph { get; set; }
public int? WordStartParagraphIndex { get; set; }
public int? WordEndParagraphIndex { get; set; }
public string SourceKind { get; set; } = string.Empty;
public DateTime CreatedUtc { get; set; }
public DateTime UpdatedUtc { get; set; }
}
public sealed class ProjectBackupStructuralChapterSource
{
public int ChapterID { get; set; }
public int ProjectID { get; set; }
public int BookID { get; set; }
public string SourceText { get; set; } = string.Empty;
public int SourceWordCount { get; set; }
public int SourceCharacterCount { get; set; }
public string? ParagraphMapJson { get; set; }
public DateTime CreatedUtc { get; set; }
public DateTime UpdatedUtc { get; set; }
public string? StructuralParsedJson { get; set; }
public string? DefaultPovName { get; set; }
public string? ExplicitNarratorName { get; set; }
}
public sealed class ProjectBackupPlotEventTarget
{
public int PlotEventID { get; set; }
public int PlotLineID { get; set; }
public DateTime CreatedDate { get; set; }
}

View File

@ -339,6 +339,8 @@ public sealed class ImportService(IImportRepository imports, ICurrentUserService
: null;
validation.Warnings.Add("This is a PlotDirector project backup. It will be imported as a new project, not restored over an existing project.");
if (backup.Data.ManuscriptDocuments.Any() || backup.Data.Chapters.Any(x => x.IsLinkedToManuscript) || backup.Data.Scenes.Any(x => x.IsLinkedToManuscript))
validation.Warnings.Add("Word manuscript links in an imported copy must be reconnected. Saved manuscript text is retained when present in the backup.");
if (duplicate)
{
validation.Warnings.Add($"A project with the same title already exists. If imported anyway, the new project will be named \"{duplicateTitle}\".");
@ -425,7 +427,7 @@ public sealed class ImportService(IImportRepository imports, ICurrentUserService
var maxIds = await imports.GetIdentityMaxValuesAsync(ProjectBackupIdentityTables);
var relationshipLookups = await imports.GetRelationshipImportLookupsAsync();
var remapWarnings = new List<string>();
RemapProjectBackupForImport(backup, projectId, projectName, maxIds, relationshipLookups, remapWarnings);
RemapProjectBackupForImport(backup, projectId, projectName, maxIds, relationshipLookups, remapWarnings, userId);
foreach (var warning in remapWarnings)
{
logger.LogWarning("Project backup relationship import warning for {ProjectName}: {Warning}", projectName, warning);
@ -803,6 +805,7 @@ public sealed class ImportService(IImportRepository imports, ICurrentUserService
private static readonly string[] ProjectBackupIdentityTables =
[
"ProjectTimelineSettings", "TimelineViewPresets", "SceneMetricTypes", "Books", "Chapters", "Scenes", "StoryMaps",
"ManuscriptDocuments", "WritingPlans", "WritingScheduleItems", "CharacterAliases", "AssetAliases", "LocationAliases", "AuthorPlotSeeds", "ContinuityWarningAcknowledgements",
"SceneOutcomes", "PlotLines", "PlotThreads", "ThreadEvents", "AssetStates", "StoryAssets", "AssetEvents",
"AssetDependencies", "AssetCustodyEvents", "AssetCustodyEventCharacters", "Characters", "SceneCharacters",
"CharacterAttributeTypes", "CharacterAttributeEvents", "CharacterKnowledge", "CharacterRelationships",
@ -813,7 +816,7 @@ public sealed class ImportService(IImportRepository imports, ICurrentUserService
"ScenarioWarnings"
];
private static readonly string[] SupportedProjectBackupVersions = ["1.0", "1.1"];
private static readonly string[] SupportedProjectBackupVersions = ["1.0", "1.1", "1.2"];
private static void RemapProjectBackupForImport(
ProjectBackupExport backup,
@ -821,7 +824,8 @@ public sealed class ImportService(IImportRepository imports, ICurrentUserService
string projectName,
IReadOnlyDictionary<string, int> maxIds,
ProjectBackupRelationshipImportLookups relationshipLookups,
ICollection<string> warnings)
ICollection<string> warnings,
int importingUserId)
{
if (backup.Project is null)
{
@ -951,6 +955,19 @@ public sealed class ImportService(IImportRepository imports, ICurrentUserService
backup.Project.ArchivedDate = null;
backup.Project.ArchivedReason = null;
void RebindAuditActors(object row)
{
foreach (var name in new[] { "CreatedByUserID", "ModifiedByUserID" })
{
var property = row.GetType().GetProperty(name);
if (property?.CanWrite == true) property.SetValue(row, importingUserId);
}
}
RebindAuditActors(backup.Project);
foreach (var collection in typeof(ProjectBackupData).GetProperties())
foreach (var row in (System.Collections.IEnumerable)collection.GetValue(backup.Data)!)
RebindAuditActors(row);
foreach (var settings in backup.Data.TimelineSettings)
{
settings.ProjectTimelineSettingsID = NewId("ProjectTimelineSettings", settings.ProjectTimelineSettingsID);
@ -1025,11 +1042,24 @@ public sealed class ImportService(IImportRepository imports, ICurrentUserService
transition.ToLocationID = ExistingOrNew("Locations", transition.ToLocationID);
}
foreach (var document in backup.Data.ManuscriptDocuments)
{
document.ManuscriptDocumentID = NewId("ManuscriptDocuments", document.ManuscriptDocumentID);
document.ProjectID = projectId;
document.BookID = ExistingOrNew("Books", document.BookID);
document.CreatedByUserID = importingUserId;
document.DocumentGuid = Guid.NewGuid();
document.IsActive = false; // A copied project must be explicitly rebound to its Word document.
}
foreach (var chapter in backup.Data.Chapters)
{
chapter.ChapterID = NewId("Chapters", chapter.ChapterID);
chapter.BookID = ExistingOrNew("Books", chapter.BookID);
chapter.POVCharacterID = ExistingOrNewNullable("Characters", chapter.POVCharacterID);
chapter.ManuscriptDocumentID = chapter.ManuscriptDocumentID.HasValue && Map("ManuscriptDocuments").TryGetValue(chapter.ManuscriptDocumentID.Value, out var chapterDocument) ? chapterDocument : null;
chapter.IsLinkedToManuscript = false;
chapter.LinkedUtc = null;
chapter.RevisionStatusID = ResolveLookupID(revisionStatusIds, chapter.RevisionStatusID, chapter.RevisionStatusName, $"Chapter \"{chapter.ChapterTitle}\" revision status");
}
@ -1037,6 +1067,10 @@ public sealed class ImportService(IImportRepository imports, ICurrentUserService
{
scene.SceneID = NewId("Scenes", scene.SceneID);
scene.ChapterID = ExistingOrNew("Chapters", scene.ChapterID);
scene.ManuscriptDocumentID = scene.ManuscriptDocumentID.HasValue && Map("ManuscriptDocuments").TryGetValue(scene.ManuscriptDocumentID.Value, out var sceneDocument) ? sceneDocument : null;
scene.IsLinkedToManuscript = false;
scene.LinkedUtc = null;
scene.ImportRunID = null; // A copied scene cannot point into the original project's analysis run.
scene.POVCharacterID = ExistingOrNewNullable("Characters", scene.POVCharacterID);
scene.PrimaryLocationID = ExistingOrNewNullable("Locations", scene.PrimaryLocationID);
scene.FloorPlanID = ExistingOrNewNullable("FloorPlans", scene.FloorPlanID);
@ -1350,6 +1384,69 @@ public sealed class ImportService(IImportRepository imports, ICurrentUserService
warning.SceneID = ExistingOrNewNullable("Scenes", warning.SceneID);
warning.EntityID = RemapPolymorphicEntityID(warning.EntityType, warning.EntityID, ExistingOrNewNullable);
}
foreach (var source in backup.Data.SceneManuscriptSources)
{
source.ProjectID = projectId;
source.BookID = ExistingOrNew("Books", source.BookID);
source.ChapterID = ExistingOrNew("Chapters", source.ChapterID);
source.SceneID = ExistingOrNew("Scenes", source.SceneID);
}
foreach (var source in backup.Data.ManuscriptStructuralChapterSources)
{
source.ProjectID = projectId;
source.BookID = ExistingOrNew("Books", source.BookID);
source.ChapterID = ExistingOrNew("Chapters", source.ChapterID);
}
foreach (var plan in backup.Data.WritingPlans)
{
plan.WritingPlanID = NewId("WritingPlans", plan.WritingPlanID);
plan.ProjectID = projectId;
plan.BookID = ExistingOrNewNullable("Books", plan.BookID);
plan.UserID = importingUserId;
}
foreach (var item in backup.Data.WritingScheduleItems)
{
item.WritingScheduleItemID = NewId("WritingScheduleItems", item.WritingScheduleItemID);
item.WritingPlanID = ExistingOrNew("WritingPlans", item.WritingPlanID);
item.SceneID = ExistingOrNew("Scenes", item.SceneID);
}
foreach (var alias in backup.Data.CharacterAliases)
{
alias.CharacterAliasID = NewId("CharacterAliases", alias.CharacterAliasID);
alias.CharacterID = ExistingOrNew("Characters", alias.CharacterID);
}
foreach (var alias in backup.Data.AssetAliases)
{
alias.AssetAliasID = NewId("AssetAliases", alias.AssetAliasID);
alias.StoryAssetID = ExistingOrNew("StoryAssets", alias.StoryAssetID);
}
foreach (var alias in backup.Data.LocationAliases)
{
alias.LocationAliasID = NewId("LocationAliases", alias.LocationAliasID);
alias.LocationID = ExistingOrNew("Locations", alias.LocationID);
}
foreach (var seed in backup.Data.AuthorPlotSeeds)
{
seed.AuthorPlotSeedID = NewId("AuthorPlotSeeds", seed.AuthorPlotSeedID);
seed.ProjectID = projectId;
seed.BookID = ExistingOrNew("Books", seed.BookID);
seed.MatchedPlotLineID = ExistingOrNewNullable("PlotLines", seed.MatchedPlotLineID);
}
foreach (var acknowledgement in backup.Data.ContinuityWarningAcknowledgements)
{
acknowledgement.ContinuityWarningAcknowledgementID = NewId("ContinuityWarningAcknowledgements", acknowledgement.ContinuityWarningAcknowledgementID);
acknowledgement.ProjectID = projectId;
acknowledgement.SceneID = ExistingOrNewNullable("Scenes", acknowledgement.SceneID);
acknowledgement.CharacterID = ExistingOrNewNullable("Characters", acknowledgement.CharacterID);
acknowledgement.AssetID = ExistingOrNewNullable("StoryAssets", acknowledgement.AssetID);
acknowledgement.AcknowledgedByUserID = importingUserId;
}
foreach (var target in backup.Data.PlotEventTargetPlotLines)
{
target.PlotEventID = ExistingOrNew("ThreadEvents", target.PlotEventID);
target.PlotLineID = ExistingOrNew("PlotLines", target.PlotLineID);
}
// Map IDs share database identity space; embedded assets use globally unique IDs.
// Register all maps first so child maps can refer to parents in either export order.
foreach (var map in backup.Data.StoryMaps)

View File

@ -8,19 +8,23 @@ internal static class ProjectBackupGraphValidation
private sealed record Link(string Column, string TargetCollection, string TargetColumn);
private sealed record Entity(string Collection, string? Identity, params Link[] Links);
private static readonly Entity[] Entities = [
new("AssetAliases", "AssetAliasID", new Link("StoryAssetID", "StoryAssets", "StoryAssetID")),
new("AssetCustodyCharacters", "AssetCustodyEventCharacterID", new Link("AssetCustodyEventID", "AssetCustodyEvents", "AssetCustodyEventID"), new Link("CharacterID", "Characters", "CharacterID")),
new("AssetCustodyEvents", "AssetCustodyEventID", new Link("SceneID", "Scenes", "SceneID"), new Link("StoryAssetID", "StoryAssets", "StoryAssetID")),
new("AssetDependencies", "AssetDependencyID", new Link("SourceAssetID", "StoryAssets", "StoryAssetID"), new Link("SourceRequiredStateID", "AssetStates", "AssetStateID"), new Link("TargetAssetID", "StoryAssets", "StoryAssetID"), new Link("TargetBlockedStateID", "AssetStates", "AssetStateID")),
new("AssetEvents", "AssetEventID", new Link("FromStateID", "AssetStates", "AssetStateID"), new Link("SceneID", "Scenes", "SceneID"), new Link("StoryAssetID", "StoryAssets", "StoryAssetID"), new Link("ToStateID", "AssetStates", "AssetStateID")),
new("AssetStates", "AssetStateID", new Link("ProjectID", "Project", "ProjectID")),
new("AuthorPlotSeeds", "AuthorPlotSeedID", new Link("BookID", "Books", "BookID"), new Link("MatchedPlotLineID", "PlotLines", "PlotLineID"), new Link("ProjectID", "Project", "ProjectID")),
new("Books", "BookID", new Link("ProjectID", "Project", "ProjectID")),
new("ChapterGoals", "ChapterGoalID", new Link("ChapterID", "Chapters", "ChapterID")),
new("Chapters", "ChapterID", new Link("BookID", "Books", "BookID"), new Link("POVCharacterID", "Characters", "CharacterID")),
new("Chapters", "ChapterID", new Link("BookID", "Books", "BookID"), new Link("ManuscriptDocumentID", "ManuscriptDocuments", "ManuscriptDocumentID"), new Link("POVCharacterID", "Characters", "CharacterID")),
new("CharacterAliases", "CharacterAliasID", new Link("CharacterID", "Characters", "CharacterID")),
new("CharacterAttributeEvents", "CharacterAttributeEventID", new Link("CharacterAttributeTypeID", "CharacterAttributeTypes", "CharacterAttributeTypeID"), new Link("CharacterID", "Characters", "CharacterID"), new Link("SceneID", "Scenes", "SceneID")),
new("CharacterAttributeTypes", "CharacterAttributeTypeID", new Link("ProjectID", "Project", "ProjectID")),
new("CharacterKnowledge", "CharacterKnowledgeID", new Link("CharacterID", "Characters", "CharacterID"), new Link("PlotThreadID", "PlotThreads", "PlotThreadID"), new Link("SceneID", "Scenes", "SceneID"), new Link("SourceEventID", "ThreadEvents", "ThreadEventID"), new Link("StoryAssetID", "StoryAssets", "StoryAssetID")),
new("CharacterRelationships", "CharacterRelationshipID", new Link("CharacterAID", "Characters", "CharacterID"), new Link("CharacterBID", "Characters", "CharacterID"), new Link("EndSceneID", "Scenes", "SceneID"), new Link("InitialBookID", "Books", "BookID"), new Link("ProjectID", "Project", "ProjectID"), new Link("StartSceneID", "Scenes", "SceneID")),
new("Characters", "CharacterID", new Link("AgeReferenceSceneID", "Scenes", "SceneID"), new Link("ProjectID", "Project", "ProjectID")),
new("ContinuityWarningAcknowledgements", "ContinuityWarningAcknowledgementID", new Link("AssetID", "StoryAssets", "StoryAssetID"), new Link("CharacterID", "Characters", "CharacterID"), new Link("ProjectID", "Project", "ProjectID"), new Link("SceneID", "Scenes", "SceneID")),
new("ContinuityWarnings", "ContinuityWarningID", new Link("BookID", "Books", "BookID"), new Link("ChapterID", "Chapters", "ChapterID"), new Link("ProjectID", "Project", "ProjectID"), new Link("SceneID", "Scenes", "SceneID"), new Link("ValidationRunID", "ValidationRuns", "ValidationRunID")),
new("FloorPlanBlocks", "FloorPlanBlockID", new Link("FloorPlanFloorID", "FloorPlanFloors", "FloorPlanFloorID"), new Link("LocationID", "Locations", "LocationID")),
new("FloorPlanFloors", "FloorPlanFloorID", new Link("FloorPlanID", "FloorPlans", "FloorPlanID"), new Link("LocationID", "Locations", "LocationID")),
@ -28,12 +32,16 @@ internal static class ProjectBackupGraphValidation
new("FloorPlans", "FloorPlanID", new Link("LocationID", "Locations", "LocationID"), new Link("ProjectID", "Project", "ProjectID")),
new("GenreMetricPresetMetrics", null, new Link("GenreMetricPresetID", "GenreMetricPresets", "GenreMetricPresetID"), new Link("MetricTypeID", "SceneMetricTypes", "MetricTypeID")),
new("GenreMetricPresets", "GenreMetricPresetID"),
new("LocationAliases", "LocationAliasID", new Link("LocationID", "Locations", "LocationID")),
new("LocationRelationships", "LocationRelationshipID", new Link("FromLocationID", "Locations", "LocationID"), new Link("ToLocationID", "Locations", "LocationID")),
new("Locations", "LocationID", new Link("ParentLocationID", "Locations", "LocationID"), new Link("ProjectID", "Project", "ProjectID")),
new("ManuscriptDocuments", "ManuscriptDocumentID", new Link("BookID", "Books", "BookID"), new Link("ProjectID", "Project", "ProjectID")),
new("ManuscriptStructuralChapterSources", null, new Link("BookID", "Books", "BookID"), new Link("ChapterID", "Chapters", "ChapterID"), new Link("ProjectID", "Project", "ProjectID")),
new("MapFeatures", null, new Link("FloorPlanID", "FloorPlans", "FloorPlanID"), new Link("LocationID", "Locations", "LocationID"), new Link("MapID", "StoryMaps", "MapID")),
new("MapJourneyNotes", null, new Link("CharacterID", "Characters", "CharacterID"), new Link("FromSceneID", "Scenes", "SceneID"), new Link("MapID", "StoryMaps", "MapID"), new Link("ToSceneID", "Scenes", "SceneID")),
new("MapReferenceImages", null, new Link("ProjectID", "Project", "ProjectID")),
new("MapRelationships", null, new Link("MapID", "MapFeatures", "MapID"), new Link("MapID", "StoryMaps", "MapID"), new Link("SourceID", "MapFeatures", "FeatureID"), new Link("TargetID", "MapFeatures", "FeatureID")),
new("PlotEventTargetPlotLines", null, new Link("PlotEventID", "ThreadEvents", "ThreadEventID"), new Link("PlotLineID", "PlotLines", "PlotLineID")),
new("PlotLines", "PlotLineID", new Link("BookID", "Books", "BookID"), new Link("EmergesFromPlotLineID", "PlotLines", "PlotLineID"), new Link("ParentPlotLineID", "PlotLines", "PlotLineID"), new Link("ProjectID", "Project", "ProjectID")),
new("PlotThreads", "PlotThreadID", new Link("ActualResolutionSceneID", "Scenes", "SceneID"), new Link("IntroducedSceneID", "Scenes", "SceneID"), new Link("PlannedResolutionSceneID", "Scenes", "SceneID"), new Link("PlotLineID", "PlotLines", "PlotLineID")),
new("TimelineMetricSettings", null, new Link("MetricTypeID", "SceneMetricTypes", "MetricTypeID"), new Link("ProjectID", "Project", "ProjectID")),
@ -50,19 +58,22 @@ internal static class ProjectBackupGraphValidation
new("SceneChecklistItems", "SceneChecklistItemID", new Link("SceneID", "Scenes", "SceneID")),
new("SceneDependencies", "SceneDependencyID", new Link("SourceSceneID", "Scenes", "SceneID"), new Link("TargetSceneID", "Scenes", "SceneID")),
new("SceneFloorPlanOccupancy", "SceneFloorPlanOccupancyID", new Link("CharacterID", "Characters", "CharacterID"), new Link("FloorPlanFloorID", "FloorPlanFloors", "FloorPlanFloorID"), new Link("FloorPlanID", "FloorPlans", "FloorPlanID"), new Link("LocationID", "Locations", "LocationID"), new Link("SceneID", "Scenes", "SceneID"), new Link("StoryAssetID", "StoryAssets", "StoryAssetID")),
new("SceneManuscriptSources", null, new Link("BookID", "Books", "BookID"), new Link("ChapterID", "Chapters", "ChapterID"), new Link("ProjectID", "Project", "ProjectID"), new Link("SceneID", "Scenes", "SceneID")),
new("SceneMetricTypes", "MetricTypeID", new Link("ProjectID", "Project", "ProjectID")),
new("SceneMetricValues", null, new Link("MetricTypeID", "SceneMetricTypes", "MetricTypeID"), new Link("SceneID", "Scenes", "SceneID")),
new("SceneNotes", "SceneNoteID", new Link("SceneID", "Scenes", "SceneID")),
new("SceneOutcomes", "SceneOutcomeID", new Link("SceneID", "Scenes", "SceneID")),
new("ScenePurposes", null, new Link("SceneID", "Scenes", "SceneID")),
new("SceneWorkflow", "SceneWorkflowID", new Link("SceneID", "Scenes", "SceneID")),
new("Scenes", "SceneID", new Link("ChapterID", "Chapters", "ChapterID"), new Link("FloorPlanID", "FloorPlans", "FloorPlanID"), new Link("InitialFloorPlanFloorID", "FloorPlanFloors", "FloorPlanFloorID"), new Link("POVCharacterID", "Characters", "CharacterID"), new Link("PrimaryLocationID", "Locations", "LocationID")),
new("Scenes", "SceneID", new Link("ChapterID", "Chapters", "ChapterID"), new Link("FloorPlanID", "FloorPlans", "FloorPlanID"), new Link("InitialFloorPlanFloorID", "FloorPlanFloors", "FloorPlanFloorID"), new Link("ManuscriptDocumentID", "ManuscriptDocuments", "ManuscriptDocumentID"), new Link("POVCharacterID", "Characters", "CharacterID"), new Link("PrimaryLocationID", "Locations", "LocationID")),
new("StoryAssets", "StoryAssetID", new Link("CurrentLocationID", "Locations", "LocationID"), new Link("CurrentStateID", "AssetStates", "AssetStateID"), new Link("ProjectID", "Project", "ProjectID")),
new("StoryMaps", "MapID", new Link("ParentMapID", "StoryMaps", "MapID"), new Link("ProjectID", "Project", "ProjectID")),
new("ThreadEvents", "ThreadEventID", new Link("PlotLineID", "PlotLines", "PlotLineID"), new Link("PlotThreadID", "PlotThreads", "PlotThreadID"), new Link("SceneID", "Scenes", "SceneID"), new Link("TargetPlotLineID", "PlotLines", "PlotLineID")),
new("TimelineViewPresets", "TimelineViewPresetID", new Link("BookID", "Books", "BookID"), new Link("ProjectID", "Project", "ProjectID")),
new("UserFiles", "UserFileID", new Link("ProjectID", "Project", "ProjectID")),
new("ValidationRuns", "ValidationRunID", new Link("BookID", "Books", "BookID"), new Link("ProjectID", "Project", "ProjectID"))
new("ValidationRuns", "ValidationRunID", new Link("BookID", "Books", "BookID"), new Link("ProjectID", "Project", "ProjectID")),
new("WritingPlans", "WritingPlanID", new Link("BookID", "Books", "BookID"), new Link("ProjectID", "Project", "ProjectID")),
new("WritingScheduleItems", "WritingScheduleItemID", new Link("SceneID", "Scenes", "SceneID"), new Link("WritingPlanID", "WritingPlans", "WritingPlanID"))
];
public static string? Validate(ProjectBackupExport backup)
{
@ -79,6 +90,8 @@ internal static class ProjectBackupGraphValidation
}
foreach(var link in entity.Links)
{
// These older formats did not carry document rows; copied links are detached on import.
if(link.TargetCollection=="ManuscriptDocuments" && backup.FormatVersion is "1.0" or "1.1") continue;
var allowed=link.TargetCollection=="Project" ? new HashSet<object?> { backup.Project.ProjectID }
: rows[link.TargetCollection].Select(row=>Value(row,link.TargetColumn)).Where(value=>value is not null).ToHashSet();
if(rows[entity.Collection].Any(row=>Value(row,link.Column) is object value && !allowed.Contains(value)))

View File

@ -102,7 +102,7 @@ public sealed class ProjectRestoreService(
return "Restore point format is not recognised. No project data was changed.";
}
if (backup.FormatVersion is not ("1.0" or "1.1"))
if (backup.FormatVersion is not ("1.0" or "1.1" or "1.2"))
{
return "Restore point format version is not supported. No project data was changed.";
}
@ -112,7 +112,9 @@ public sealed class ProjectRestoreService(
return "This restore point does not belong to the selected project. No project data was changed.";
}
if(backup.Data is null||backup.Data.StoryMaps is null||backup.Data.MapReferenceImages is null)return "Restore point data is invalid.";
var graphError = ProjectBackupMapValidation.Validate(backup) ?? ProjectBackupGraphValidation.Validate(backup);
if (graphError is not null) return graphError + " No project data was changed.";
foreach(var map in backup.Data.StoryMaps){if(map is null||map.ProjectID!=projectId||MapValidation.Validate(new(){Map=map}) is not null)return "Restore point contains invalid map appearance or placement settings.";map.AppearanceJson=JsonSerializer.Serialize(MapAppearanceJson.Read<MapCanvasAppearance>(map.AppearanceJson),new JsonSerializerOptions(JsonSerializerDefaults.Web));map.ReferenceJson=JsonSerializer.Serialize(MapAppearanceJson.Read<MapReferencePlacement>(map.ReferenceJson),new JsonSerializerOptions(JsonSerializerDefaults.Web));}
if(backup.Data.MapReferenceImages.Any(image=>image is null||image.ProjectID!=projectId||!MapReferenceImageService.ValidBackupImage(image)))return "Restore point contains invalid reference images. No project data was changed.";
return null;

View File

@ -0,0 +1,925 @@
-- Version 1.2: retained manuscript sources, writer plans and authored identity/review state.
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
GO
CREATE OR ALTER PROCEDURE dbo.ProjectBackup_Export
@ProjectID int,
@UserID int = NULL
AS
BEGIN
SET NOCOUNT ON;
IF @UserID IS NOT NULL
AND NOT EXISTS
(
SELECT 1
FROM dbo.ProjectUserAccess
WHERE ProjectID = @ProjectID
AND UserID = @UserID
AND AccessRole = N'Owner'
AND IsActive = 1
)
SET @ProjectID = -1;
SELECT ProjectID, ProjectName, Description, CreatedDate, UpdatedDate, IsArchived, ArchivedDate, ArchivedReason,
CreatedByUserID, ModifiedByUserID, CreatedDateUTC, ModifiedDateUTC
FROM dbo.Projects
WHERE ProjectID = @ProjectID;
SELECT *
FROM dbo.Books
WHERE ProjectID = @ProjectID
ORDER BY SortOrder, BookNumber, BookID;
SELECT c.*, rs.StatusName AS RevisionStatusName
FROM dbo.Chapters c
INNER JOIN dbo.Books b ON b.BookID = c.BookID
INNER JOIN dbo.RevisionStatuses rs ON rs.RevisionStatusID = c.RevisionStatusID
WHERE b.ProjectID = @ProjectID
ORDER BY b.SortOrder, c.SortOrder, c.ChapterID;
SELECT s.*, l.LocationName AS PrimaryLocationName, l.LocationName AS PrimaryLocationPath,
tm.TimeModeName, du.DurationUnitName, tc.TimeConfidenceName, rs.StatusName AS RevisionStatusName
FROM dbo.Scenes s
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
INNER JOIN dbo.TimeModes tm ON tm.TimeModeID = s.TimeModeID
INNER JOIN dbo.TimeConfidences tc ON tc.TimeConfidenceID = s.TimeConfidenceID
INNER JOIN dbo.RevisionStatuses rs ON rs.RevisionStatusID = s.RevisionStatusID
LEFT JOIN dbo.DurationUnits du ON du.DurationUnitID = s.DurationUnitID
LEFT JOIN dbo.Locations l ON l.LocationID = s.PrimaryLocationID
WHERE b.ProjectID = @ProjectID
ORDER BY b.SortOrder, c.SortOrder, s.SortOrder, s.SceneID;
SELECT sp.SceneID, sp.ScenePurposeTypeID, spt.PurposeName, spt.SortOrder
FROM dbo.ScenePurposes sp
INNER JOIN dbo.ScenePurposeTypes spt ON spt.ScenePurposeTypeID = sp.ScenePurposeTypeID
INNER JOIN dbo.Scenes s ON s.SceneID = sp.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE b.ProjectID = @ProjectID
ORDER BY sp.SceneID, spt.SortOrder;
SELECT so.SceneOutcomeID, so.SceneID, so.OutcomeDescription, so.OutcomeTypeID, so.CreatedDate, so.UpdatedDate
FROM dbo.SceneOutcomes so
INNER JOIN dbo.Scenes s ON s.SceneID = so.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE b.ProjectID = @ProjectID
ORDER BY so.SceneID, so.SceneOutcomeID;
SELECT mt.MetricTypeID, mt.ProjectID, mt.MetricName, mt.Description, mt.MinValue, mt.MaxValue,
mt.DefaultValue, COALESCE(ptms.SortOrder, mt.SortOrder) AS SortOrder, mt.IsActive,
CAST(CASE WHEN mt.IsActive = 1 AND ptms.MetricTypeID IS NOT NULL THEN 1 ELSE 0 END AS bit) AS IsEnabledForProject,
CAST(CASE WHEN mt.ProjectID = @ProjectID THEN 1 ELSE 0 END AS bit) AS IsCustom,
STUFF((
SELECT N',' + gmp.PresetKey
FROM dbo.GenreMetricPresetMetrics gpmm
INNER JOIN dbo.GenreMetricPresets gmp ON gmp.GenreMetricPresetID = gpmm.GenreMetricPresetID
WHERE gpmm.MetricTypeID = mt.MetricTypeID
ORDER BY gmp.SortOrder, gmp.PresetName
FOR XML PATH(N''), TYPE).value(N'.', N'nvarchar(max)'), 1, 1, N'') AS GenrePresetKeys,
STUFF((
SELECT N', ' + gmp.PresetName
FROM dbo.GenreMetricPresetMetrics gpmm
INNER JOIN dbo.GenreMetricPresets gmp ON gmp.GenreMetricPresetID = gpmm.GenreMetricPresetID
WHERE gpmm.MetricTypeID = mt.MetricTypeID
ORDER BY gmp.SortOrder, gmp.PresetName
FOR XML PATH(N''), TYPE).value(N'.', N'nvarchar(max)'), 1, 2, N'') AS GenrePresetNames,
(
SELECT COUNT(1)
FROM dbo.SceneMetricValues smv
INNER JOIN dbo.Scenes s ON s.SceneID = smv.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE smv.MetricTypeID = mt.MetricTypeID AND b.ProjectID = @ProjectID
) AS ValueCount
FROM dbo.SceneMetricTypes mt
LEFT JOIN dbo.ProjectTimelineMetricSettings ptms ON ptms.ProjectID = @ProjectID AND ptms.MetricTypeID = mt.MetricTypeID
WHERE mt.ProjectID IS NULL
OR mt.ProjectID = @ProjectID
OR EXISTS
(
SELECT 1
FROM dbo.SceneMetricValues smv
INNER JOIN dbo.Scenes s ON s.SceneID = smv.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE smv.MetricTypeID = mt.MetricTypeID AND b.ProjectID = @ProjectID
)
ORDER BY COALESCE(ptms.SortOrder, mt.SortOrder), mt.MetricName;
SELECT smv.SceneID, smv.MetricTypeID, mt.MetricName, mt.Description, mt.MinValue, mt.MaxValue,
mt.DefaultValue, mt.SortOrder, mt.IsActive, smv.Value, smv.Notes
FROM dbo.SceneMetricValues smv
INNER JOIN dbo.SceneMetricTypes mt ON mt.MetricTypeID = smv.MetricTypeID
INNER JOIN dbo.Scenes s ON s.SceneID = smv.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE b.ProjectID = @ProjectID
ORDER BY smv.SceneID, mt.SortOrder;
SELECT ProjectTimelineSettingsID, ProjectID, ShowSceneCards, ShowMetricShape, ShowPlotLines,
ShowStoryAssets, ShowCharacterAppearances, ShowWarnings, CreatedDate, UpdatedDate
FROM dbo.ProjectTimelineSettings
WHERE ProjectID = @ProjectID;
SELECT ptms.ProjectID, ptms.MetricTypeID, mt.MetricName, ptms.SortOrder, ptms.CreatedDate
FROM dbo.ProjectTimelineMetricSettings ptms
INNER JOIN dbo.SceneMetricTypes mt ON mt.MetricTypeID = ptms.MetricTypeID
WHERE ptms.ProjectID = @ProjectID
ORDER BY ptms.SortOrder;
SELECT TimelineViewPresetID, ProjectID, BookID, PresetName, FilterJson, VisibilityJson, FocusType, FocusID,
CreatedDate, UpdatedDate, IsArchived
FROM dbo.TimelineViewPresets
WHERE ProjectID = @ProjectID
ORDER BY PresetName;
SELECT pl.PlotLineID, pl.ProjectID, pl.BookID, b.BookTitle, pl.PlotLineName, pl.PlotLineTypeID,
plt.TypeName AS PlotLineTypeName, pl.PlotImportanceID, pi.ImportanceName AS PlotImportanceName,
pl.Description, pl.ParentPlotLineID, parent.PlotLineName AS ParentPlotLineName,
pl.EmergesFromPlotLineID, emerges.PlotLineName AS EmergesFromPlotLineName,
pl.SortOrder, pl.Colour, pl.IsVisibleOnTimeline, pl.CreatedDate, pl.UpdatedDate,
pl.IsArchived, pl.ArchivedDate, pl.ArchivedReason,
pl.CreatedByUserID, pl.ModifiedByUserID, pl.CreatedDateUTC, pl.ModifiedDateUTC
FROM dbo.PlotLines pl
INNER JOIN dbo.PlotLineTypes plt ON plt.PlotLineTypeID = pl.PlotLineTypeID
INNER JOIN dbo.PlotImportance pi ON pi.PlotImportanceID = pl.PlotImportanceID
LEFT JOIN dbo.Books b ON b.BookID = pl.BookID
LEFT JOIN dbo.PlotLines parent ON parent.PlotLineID = pl.ParentPlotLineID
LEFT JOIN dbo.PlotLines emerges ON emerges.PlotLineID = pl.EmergesFromPlotLineID
WHERE pl.ProjectID = @ProjectID
ORDER BY pl.SortOrder, pl.PlotLineName;
SELECT pt.PlotThreadID, pt.PlotLineID, pl.ProjectID, pl.PlotLineName, pt.ThreadTitle, pt.ThreadTypeID,
tt.TypeName AS ThreadTypeName, pt.ThreadStatusID, ts.StatusName AS ThreadStatusName, pt.Importance,
pt.Summary, pt.IntroducedSceneID, pt.PlannedResolutionSceneID, pt.ActualResolutionSceneID,
pt.CreatedDate, pt.UpdatedDate, pt.IsArchived, pt.ArchivedDate, pt.ArchivedReason,
pt.CreatedByUserID, pt.ModifiedByUserID, pt.CreatedDateUTC, pt.ModifiedDateUTC
FROM dbo.PlotThreads pt
INNER JOIN dbo.PlotLines pl ON pl.PlotLineID = pt.PlotLineID
INNER JOIN dbo.ThreadTypes tt ON tt.ThreadTypeID = pt.ThreadTypeID
INNER JOIN dbo.ThreadStatuses ts ON ts.ThreadStatusID = pt.ThreadStatusID
WHERE pl.ProjectID = @ProjectID
ORDER BY pl.SortOrder, pt.Importance DESC, pt.ThreadTitle;
SELECT te.ThreadEventID, te.PlotThreadID, pt.ThreadTitle, pl.PlotLineID, pl.PlotLineName, pl.Colour,
te.SceneID, te.EventTypeID, tet.TypeName AS EventTypeName, tet.MarkerText,
te.PlotEventTypeID, pet.TypeName AS PlotEventTypeName, te.TargetPlotLineID, target.PlotLineName AS TargetPlotLineName,
te.EventTitle, te.EventDescription, te.CreatedDate, te.UpdatedDate,
te.CreatedByUserID, te.ModifiedByUserID, te.CreatedDateUTC, te.ModifiedDateUTC
FROM dbo.ThreadEvents te
INNER JOIN dbo.PlotThreads pt ON pt.PlotThreadID = te.PlotThreadID
INNER JOIN dbo.PlotLines pl ON pl.PlotLineID = pt.PlotLineID
INNER JOIN dbo.ThreadEventTypes tet ON tet.ThreadEventTypeID = te.EventTypeID
INNER JOIN dbo.PlotEventTypes pet ON pet.PlotEventTypeID = te.PlotEventTypeID
LEFT JOIN dbo.PlotLines target ON target.PlotLineID = te.TargetPlotLineID
WHERE pl.ProjectID = @ProjectID
ORDER BY te.SceneID, te.ThreadEventID;
SELECT sa.StoryAssetID, sa.ProjectID, sa.AssetName, sa.AssetKindID, ak.KindName, sa.Description,
sa.Importance, sa.CurrentStateID, ast.StateName AS CurrentStateName, sa.CurrentLocationID,
l.LocationName AS CurrentLocationName, l.LocationName AS CurrentLocationPath, sa.IsResolved,
sa.ShowInQuickAddBar, sa.ImagePath, sa.ThumbnailPath, sa.CreatedDate, sa.UpdatedDate, sa.IsArchived, sa.ArchivedDate, sa.ArchivedReason,
sa.CreatedByUserID, sa.ModifiedByUserID, sa.CreatedDateUTC, sa.ModifiedDateUTC
FROM dbo.StoryAssets sa
INNER JOIN dbo.AssetKinds ak ON ak.AssetKindID = sa.AssetKindID
LEFT JOIN dbo.AssetStates ast ON ast.AssetStateID = sa.CurrentStateID
LEFT JOIN dbo.Locations l ON l.LocationID = sa.CurrentLocationID
WHERE sa.ProjectID = @ProjectID
ORDER BY sa.Importance DESC, sa.AssetName;
SELECT ast.AssetStateID, ast.ProjectID, ast.AssetKindID, ak.KindName, ast.StateName, ast.SortOrder, ast.Description,
ast.IsResolvedState, ast.IsActive
FROM dbo.AssetStates ast
LEFT JOIN dbo.AssetKinds ak ON ak.AssetKindID = ast.AssetKindID
WHERE ast.ProjectID IS NULL
OR ast.ProjectID = @ProjectID
OR EXISTS (SELECT 1 FROM dbo.StoryAssets sa WHERE sa.ProjectID = @ProjectID AND sa.CurrentStateID = ast.AssetStateID)
OR EXISTS (SELECT 1 FROM dbo.AssetEvents ae INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ae.StoryAssetID WHERE sa.ProjectID = @ProjectID AND (ae.FromStateID = ast.AssetStateID OR ae.ToStateID = ast.AssetStateID))
OR EXISTS (SELECT 1 FROM dbo.AssetDependencies ad INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ad.SourceAssetID WHERE sa.ProjectID = @ProjectID AND (ad.SourceRequiredStateID = ast.AssetStateID OR ad.TargetBlockedStateID = ast.AssetStateID))
ORDER BY ast.SortOrder, ast.StateName;
SELECT ae.AssetEventID, ae.StoryAssetID, sa.ProjectID, sa.AssetName, sa.AssetKindID, ak.KindName,
ae.SceneID, ae.AssetEventTypeID, aet.TypeName AS AssetEventTypeName, aet.MarkerText,
ae.FromStateID, fs.StateName AS FromStateName, ae.ToStateID, ts.StateName AS ToStateName,
ae.EventTitle, ae.EventDescription, b.BookTitle, c.ChapterNumber, s.SceneNumber, s.SceneTitle,
ae.CreatedDate, ae.UpdatedDate,
ae.CreatedByUserID, ae.ModifiedByUserID, ae.CreatedDateUTC, ae.ModifiedDateUTC
FROM dbo.AssetEvents ae
INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ae.StoryAssetID
INNER JOIN dbo.AssetKinds ak ON ak.AssetKindID = sa.AssetKindID
INNER JOIN dbo.AssetEventTypes aet ON aet.AssetEventTypeID = ae.AssetEventTypeID
INNER JOIN dbo.Scenes s ON s.SceneID = ae.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
LEFT JOIN dbo.AssetStates fs ON fs.AssetStateID = ae.FromStateID
LEFT JOIN dbo.AssetStates ts ON ts.AssetStateID = ae.ToStateID
WHERE sa.ProjectID = @ProjectID
ORDER BY b.SortOrder, c.SortOrder, s.SortOrder, ae.AssetEventID;
SELECT ad.AssetDependencyID, ad.SourceAssetID, source.AssetName AS SourceAssetName, ad.TargetAssetID,
target.AssetName AS TargetAssetName, ad.AssetDependencyTypeID, adt.TypeName AS DependencyTypeName,
adt.IsValidatingDependency, ad.SourceRequiredStateID, srs.StateName AS SourceRequiredStateName,
ad.TargetBlockedStateID, tbs.StateName AS TargetBlockedStateName, ad.Description,
ad.CreatedDate, ad.UpdatedDate, ad.IsArchived
FROM dbo.AssetDependencies ad
INNER JOIN dbo.StoryAssets source ON source.StoryAssetID = ad.SourceAssetID
INNER JOIN dbo.StoryAssets target ON target.StoryAssetID = ad.TargetAssetID
INNER JOIN dbo.AssetDependencyTypes adt ON adt.AssetDependencyTypeID = ad.AssetDependencyTypeID
LEFT JOIN dbo.AssetStates srs ON srs.AssetStateID = ad.SourceRequiredStateID
LEFT JOIN dbo.AssetStates tbs ON tbs.AssetStateID = ad.TargetBlockedStateID
WHERE source.ProjectID = @ProjectID OR target.ProjectID = @ProjectID
ORDER BY source.AssetName, target.AssetName;
SELECT ace.AssetCustodyEventID, ace.StoryAssetID, sa.AssetName, ace.SceneID, ace.AssetCustodyEventTypeID,
acet.TypeName AS CustodyEventTypeName, ace.Description,
STRING_AGG(COALESCE(ch.CharacterName, acec.CharacterNameText), ', ') AS CustodianSummary,
b.BookTitle, c.ChapterNumber, s.SceneNumber, s.SceneTitle, ace.CreatedDate, ace.UpdatedDate
FROM dbo.AssetCustodyEvents ace
INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ace.StoryAssetID
INNER JOIN dbo.AssetCustodyEventTypes acet ON acet.AssetCustodyEventTypeID = ace.AssetCustodyEventTypeID
INNER JOIN dbo.Scenes s ON s.SceneID = ace.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
LEFT JOIN dbo.AssetCustodyEventCharacters acec ON acec.AssetCustodyEventID = ace.AssetCustodyEventID
LEFT JOIN dbo.Characters ch ON ch.CharacterID = acec.CharacterID
WHERE sa.ProjectID = @ProjectID
GROUP BY ace.AssetCustodyEventID, ace.StoryAssetID, sa.AssetName, ace.SceneID, ace.AssetCustodyEventTypeID,
acet.TypeName, ace.Description, b.BookTitle, c.ChapterNumber, s.SceneNumber, s.SceneTitle, ace.CreatedDate, ace.UpdatedDate
ORDER BY MIN(b.SortOrder), MIN(c.SortOrder), MIN(s.SortOrder), ace.AssetCustodyEventID;
SELECT acec.AssetCustodyEventCharacterID, acec.AssetCustodyEventID, acec.CharacterID, ch.CharacterName,
acec.CharacterNameText, acec.CustodyRoleID, cr.RoleName AS CustodyRoleName
FROM dbo.AssetCustodyEventCharacters acec
INNER JOIN dbo.AssetCustodyEvents ace ON ace.AssetCustodyEventID = acec.AssetCustodyEventID
INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ace.StoryAssetID
INNER JOIN dbo.CustodyRoles cr ON cr.CustodyRoleID = acec.CustodyRoleID
LEFT JOIN dbo.Characters ch ON ch.CharacterID = acec.CharacterID
WHERE sa.ProjectID = @ProjectID
ORDER BY acec.AssetCustodyEventID, acec.AssetCustodyEventCharacterID;
SELECT CharacterID, ProjectID, CharacterName, ShortName, Sex, BirthDate, AgeAtSeriesStart,
AgeReferenceSceneID, Height, EyeColour, CharacterImportance, ShowInQuickAddBar,
DefaultDescription, ImagePath, ThumbnailPath, CreatedDate, UpdatedDate, IsArchived, ArchivedDate, ArchivedReason,
CreatedByUserID, ModifiedByUserID, CreatedDateUTC, ModifiedDateUTC
FROM dbo.Characters
WHERE ProjectID = @ProjectID
ORDER BY CharacterImportance DESC, CharacterName;
SELECT sc.SceneCharacterID, sc.SceneID, sc.CharacterID, ch.ProjectID, ch.CharacterName, ch.ShortName,
ch.BirthDate, ch.AgeAtSeriesStart, sc.RoleInSceneTypeID, rist.TypeName AS RoleInSceneTypeName,
sc.PresenceTypeID, pt.TypeName AS PresenceTypeName, sc.LocationID, loc.LocationName,
loc.LocationName AS LocationPath, sc.EntryLocationID, entryLoc.LocationName AS EntryLocationName,
sc.ExitLocationID, exitLoc.LocationName AS ExitLocationName, sc.AppearanceNotes, sc.OutfitDescription,
sc.PhysicalCondition, sc.EmotionalState, sc.KnowledgeNotes, s.SceneNumber, s.SceneTitle,
c.ChapterNumber, b.BookTitle, sc.CreatedDate, sc.UpdatedDate
FROM dbo.SceneCharacters sc
INNER JOIN dbo.Characters ch ON ch.CharacterID = sc.CharacterID
INNER JOIN dbo.Scenes s ON s.SceneID = sc.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
LEFT JOIN dbo.CharacterRoleInSceneTypes rist ON rist.CharacterRoleInSceneTypeID = sc.RoleInSceneTypeID
LEFT JOIN dbo.PresenceTypes pt ON pt.PresenceTypeID = sc.PresenceTypeID
LEFT JOIN dbo.Locations loc ON loc.LocationID = sc.LocationID
LEFT JOIN dbo.Locations entryLoc ON entryLoc.LocationID = sc.EntryLocationID
LEFT JOIN dbo.Locations exitLoc ON exitLoc.LocationID = sc.ExitLocationID
WHERE ch.ProjectID = @ProjectID
ORDER BY b.SortOrder, c.SortOrder, s.SortOrder, ch.CharacterName;
SELECT cat.CharacterAttributeTypeID, cat.ProjectID, cat.AttributeName, cat.DataType, cat.IsNormallyStable,
cat.SortOrder, cat.IsActive
FROM dbo.CharacterAttributeTypes cat
WHERE cat.ProjectID IS NULL
OR cat.ProjectID = @ProjectID
OR EXISTS (SELECT 1 FROM dbo.CharacterAttributeEvents cae INNER JOIN dbo.Characters ch ON ch.CharacterID = cae.CharacterID WHERE ch.ProjectID = @ProjectID AND cae.CharacterAttributeTypeID = cat.CharacterAttributeTypeID)
ORDER BY cat.SortOrder, cat.AttributeName;
SELECT cae.CharacterAttributeEventID, cae.CharacterID, ch.CharacterName, cae.CharacterAttributeTypeID,
cat.AttributeName, cae.SceneID, s.SceneNumber, s.SceneTitle, c.ChapterNumber, b.BookTitle,
cae.AttributeValue, cae.Description, cae.CreatedDate, cae.UpdatedDate
FROM dbo.CharacterAttributeEvents cae
INNER JOIN dbo.Characters ch ON ch.CharacterID = cae.CharacterID
INNER JOIN dbo.CharacterAttributeTypes cat ON cat.CharacterAttributeTypeID = cae.CharacterAttributeTypeID
INNER JOIN dbo.Scenes s ON s.SceneID = cae.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE ch.ProjectID = @ProjectID
ORDER BY ch.CharacterName, b.SortOrder, c.SortOrder, s.SortOrder;
SELECT ck.CharacterKnowledgeID, ck.CharacterID, ch.CharacterName, ck.StoryAssetID, sa.AssetName,
ck.PlotThreadID, pt.ThreadTitle, ck.SceneID, s.SceneNumber, s.SceneTitle, c.ChapterNumber, b.BookTitle,
ck.KnowledgeStateID, ks.StateName AS KnowledgeStateName, ck.SourceEventID, ck.Description,
ck.CreatedDate, ck.UpdatedDate
FROM dbo.CharacterKnowledge ck
INNER JOIN dbo.Characters ch ON ch.CharacterID = ck.CharacterID
INNER JOIN dbo.KnowledgeStates ks ON ks.KnowledgeStateID = ck.KnowledgeStateID
INNER JOIN dbo.Scenes s ON s.SceneID = ck.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
LEFT JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ck.StoryAssetID
LEFT JOIN dbo.PlotThreads pt ON pt.PlotThreadID = ck.PlotThreadID
WHERE ch.ProjectID = @ProjectID
ORDER BY ch.CharacterName, b.SortOrder, c.SortOrder, s.SortOrder;
SELECT cr.CharacterRelationshipID, cr.ProjectID, cr.CharacterAID, a.CharacterName AS CharacterAName,
cr.CharacterBID, bch.CharacterName AS CharacterBName, cr.RelationshipTypeID, rt.TypeName AS RelationshipTypeName,
rt.RelationshipCategoryID, rc.CategoryName AS RelationshipCategoryName, rc.SortOrder AS CategorySortOrder,
rt.SortOrder AS RelationshipTypeSortOrder, cr.IsPermanent, cr.StartSceneID, cr.EndSceneID,
cr.IsKnownToReader, cr.Notes, cr.IsInitialRelationship, cr.InitialBookID, ib.BookTitle AS InitialBookTitle,
cr.ReaderInitiallyKnows, cr.InitialRelationshipStateID, irs.StateName AS InitialRelationshipStateName,
cr.InitialIntensity, cr.IsReciprocal, cr.CreatedDate, cr.UpdatedDate,
cr.IsArchived, cr.ArchivedDate, cr.ArchivedReason,
cr.CreatedByUserID, cr.ModifiedByUserID, cr.CreatedDateUTC, cr.ModifiedDateUTC
FROM dbo.CharacterRelationships cr
INNER JOIN dbo.Characters a ON a.CharacterID = cr.CharacterAID
INNER JOIN dbo.Characters bch ON bch.CharacterID = cr.CharacterBID
INNER JOIN dbo.RelationshipTypes rt ON rt.RelationshipTypeID = cr.RelationshipTypeID
INNER JOIN dbo.RelationshipCategories rc ON rc.RelationshipCategoryID = rt.RelationshipCategoryID
LEFT JOIN dbo.Books ib ON ib.BookID = cr.InitialBookID
LEFT JOIN dbo.RelationshipStates irs ON irs.RelationshipStateID = cr.InitialRelationshipStateID
WHERE cr.ProjectID = @ProjectID
ORDER BY a.CharacterName, bch.CharacterName, cr.CharacterRelationshipID;
SELECT re.RelationshipEventID, re.CharacterRelationshipID, cr.ProjectID, cr.CharacterAID,
a.CharacterName AS CharacterAName, cr.CharacterBID, bch.CharacterName AS CharacterBName,
rt.TypeName AS RelationshipTypeName, rt.RelationshipCategoryID, rc.CategoryName AS RelationshipCategoryName,
rc.SortOrder AS CategorySortOrder, rt.SortOrder AS RelationshipTypeSortOrder, cr.IsReciprocal,
re.SceneID, s.SceneNumber, s.SceneTitle, c.ChapterNumber, bk.BookTitle, re.RelationshipStateID,
rs.StateName AS RelationshipStateName, re.Intensity, re.IsKnownToOtherCharacter, re.Description,
re.CreatedDate, re.UpdatedDate,
re.CreatedByUserID, re.ModifiedByUserID, re.CreatedDateUTC, re.ModifiedDateUTC, re.SourceReviewKey
FROM dbo.RelationshipEvents re
INNER JOIN dbo.CharacterRelationships cr ON cr.CharacterRelationshipID = re.CharacterRelationshipID
INNER JOIN dbo.Characters a ON a.CharacterID = cr.CharacterAID
INNER JOIN dbo.Characters bch ON bch.CharacterID = cr.CharacterBID
INNER JOIN dbo.RelationshipTypes rt ON rt.RelationshipTypeID = cr.RelationshipTypeID
INNER JOIN dbo.RelationshipCategories rc ON rc.RelationshipCategoryID = rt.RelationshipCategoryID
INNER JOIN dbo.RelationshipStates rs ON rs.RelationshipStateID = re.RelationshipStateID
INNER JOIN dbo.Scenes s ON s.SceneID = re.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books bk ON bk.BookID = c.BookID
WHERE cr.ProjectID = @ProjectID
ORDER BY bk.SortOrder, c.SortOrder, s.SortOrder, re.RelationshipEventID;
SELECT l.LocationID, l.ProjectID, l.ParentLocationID, parent.LocationName AS ParentLocationName,
l.LocationName, l.LocationTypeID, lt.TypeName AS LocationTypeName, l.Description,
l.LocationName AS LocationPath, CAST(0 AS int) AS Depth, l.ShowInQuickAddBar,
l.CreatedDate, l.UpdatedDate, l.IsArchived, l.ArchivedDate, l.ArchivedReason,
l.CreatedByUserID, l.ModifiedByUserID, l.CreatedDateUTC, l.ModifiedDateUTC
FROM dbo.Locations l
LEFT JOIN dbo.Locations parent ON parent.LocationID = l.ParentLocationID
LEFT JOIN dbo.LocationTypes lt ON lt.LocationTypeID = l.LocationTypeID
WHERE l.ProjectID = @ProjectID
ORDER BY l.LocationName;
SELECT lr.LocationRelationshipID, lr.FromLocationID, fl.LocationName AS FromLocationName,
lr.ToLocationID, tl.LocationName AS ToLocationName, lr.LocationRelationshipTypeID,
lrt.TypeName AS RelationshipTypeName, lr.IsBidirectional, lr.Strength,
lr.CanHearNormalSpeech, lr.CanHearLoudNoise, lr.CanSeeMovement, lr.CanSeeClearly,
lr.CanTravelDirectly, lr.Notes, lr.CreatedDate, lr.UpdatedDate, lr.IsArchived
FROM dbo.LocationRelationships lr
INNER JOIN dbo.Locations fl ON fl.LocationID = lr.FromLocationID
INNER JOIN dbo.Locations tl ON tl.LocationID = lr.ToLocationID
INNER JOIN dbo.LocationRelationshipTypes lrt ON lrt.LocationRelationshipTypeID = lr.LocationRelationshipTypeID
WHERE fl.ProjectID = @ProjectID OR tl.ProjectID = @ProjectID
ORDER BY fl.LocationName, tl.LocationName;
SELECT fp.FloorPlanID, fp.ProjectID, fp.LocationID, lp.LocationName, COALESCE(NULLIF(lp.LocationPath, N''), lp.LocationName) AS LocationPath,
fp.Name, fp.Description, fp.CreatedDate, fp.ModifiedDate,
(SELECT COUNT(1) FROM dbo.FloorPlanFloors fpf WHERE fpf.FloorPlanID = fp.FloorPlanID) AS FloorCount,
(SELECT COUNT(1) FROM dbo.FloorPlanBlocks fpb INNER JOIN dbo.FloorPlanFloors fpf ON fpf.FloorPlanFloorID = fpb.FloorPlanFloorID WHERE fpf.FloorPlanID = fp.FloorPlanID) AS BlockCount
FROM dbo.FloorPlans fp
LEFT JOIN dbo.LocationPaths lp ON lp.LocationID = fp.LocationID
WHERE fp.ProjectID = @ProjectID
ORDER BY fp.Name, fp.FloorPlanID;
SELECT fpf.FloorPlanFloorID, fpf.FloorPlanID, fpf.LocationID, lp.LocationName, COALESCE(NULLIF(lp.LocationPath, N''), lp.LocationName) AS LocationPath,
fpf.Name, fpf.Description, fpf.SortOrder, fpf.GridWidth, fpf.GridHeight,
fpf.BackgroundImagePath, fpf.BackgroundImageOriginalFileName, fpf.BackgroundOpacity, fpf.BackgroundScale,
fpf.BackgroundOffsetX, fpf.BackgroundOffsetY, fpf.BackgroundLocked, fpf.CreatedDate, fpf.ModifiedDate
FROM dbo.FloorPlanFloors fpf
INNER JOIN dbo.FloorPlans fp ON fp.FloorPlanID = fpf.FloorPlanID
LEFT JOIN dbo.LocationPaths lp ON lp.LocationID = fpf.LocationID
WHERE fp.ProjectID = @ProjectID
ORDER BY fp.Name, fpf.SortOrder, fpf.Name, fpf.FloorPlanFloorID;
SELECT fpb.FloorPlanBlockID, fpb.FloorPlanFloorID, fpb.LocationID, lp.LocationName,
COALESCE(NULLIF(lp.LocationPath, N''), lp.LocationName) AS LocationPath,
fpb.X, fpb.Y, fpb.WidthCells, fpb.HeightCells, fpb.BlockType, fpb.LabelOverride, fpb.Notes,
fpb.CreatedDate, fpb.ModifiedDate
FROM dbo.FloorPlanBlocks fpb
INNER JOIN dbo.FloorPlanFloors fpf ON fpf.FloorPlanFloorID = fpb.FloorPlanFloorID
INNER JOIN dbo.FloorPlans fp ON fp.FloorPlanID = fpf.FloorPlanID
INNER JOIN dbo.LocationPaths lp ON lp.LocationID = fpb.LocationID
WHERE fp.ProjectID = @ProjectID
ORDER BY fp.Name, fpf.SortOrder, fpb.Y, fpb.X, lp.LocationName;
SELECT fpt.FloorPlanTransitionID, fpt.FloorPlanFloorID, fpt.FromLocationID,
fromPath.LocationName AS FromLocationName, COALESCE(NULLIF(fromPath.LocationPath, N''), fromPath.LocationName) AS FromLocationPath,
fpt.ToLocationID, toPath.LocationName AS ToLocationName, COALESCE(NULLIF(toPath.LocationPath, N''), toPath.LocationName) AS ToLocationPath,
fpt.TransitionType, fpt.Notes, fpt.IsLocked, fpt.DisplayLabel, fpt.PositionWithinLocation,
fpt.CreatedDate, fpt.ModifiedDate
FROM dbo.FloorPlanTransitions fpt
INNER JOIN dbo.FloorPlanFloors fpf ON fpf.FloorPlanFloorID = fpt.FloorPlanFloorID
INNER JOIN dbo.FloorPlans fp ON fp.FloorPlanID = fpf.FloorPlanID
INNER JOIN dbo.LocationPaths fromPath ON fromPath.LocationID = fpt.FromLocationID
INNER JOIN dbo.LocationPaths toPath ON toPath.LocationID = fpt.ToLocationID
WHERE fp.ProjectID = @ProjectID
ORDER BY fp.Name, fpf.SortOrder, fromPath.LocationName, toPath.LocationName, fpt.TransitionType;
SELECT sal.SceneAssetLocationID, sal.SceneID, sal.StoryAssetID, sa.AssetName, sal.LocationID,
l.LocationName, l.LocationName AS LocationPath, sal.Description, sal.CreatedDate, sal.UpdatedDate
FROM dbo.SceneAssetLocations sal
INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = sal.StoryAssetID
INNER JOIN dbo.Locations l ON l.LocationID = sal.LocationID
WHERE sa.ProjectID = @ProjectID
ORDER BY sal.SceneID, sa.AssetName;
SELECT o.SceneFloorPlanOccupancyID, o.SceneID, o.FloorPlanID, o.FloorPlanFloorID, fpf.Name AS FloorName,
o.CharacterID, c.CharacterName, c.ShortName AS CharacterShortName, c.ImagePath AS CharacterImagePath, c.ThumbnailPath AS CharacterThumbnailPath,
o.StoryAssetID, sa.AssetName, sa.ImagePath AS AssetImagePath, sa.ThumbnailPath AS AssetThumbnailPath,
o.LocationID, lp.LocationName, COALESCE(NULLIF(lp.LocationPath, N''), lp.LocationName) AS LocationPath,
o.CreatedDate, o.ModifiedDate
FROM dbo.SceneFloorPlanOccupancy o
INNER JOIN dbo.Scenes s ON s.SceneID = o.SceneID
INNER JOIN dbo.Chapters chp ON chp.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = chp.BookID
INNER JOIN dbo.LocationPaths lp ON lp.LocationID = o.LocationID
LEFT JOIN dbo.FloorPlanFloors fpf ON fpf.FloorPlanFloorID = o.FloorPlanFloorID
LEFT JOIN dbo.Characters c ON c.CharacterID = o.CharacterID
LEFT JOIN dbo.StoryAssets sa ON sa.StoryAssetID = o.StoryAssetID
WHERE b.ProjectID = @ProjectID
ORDER BY b.SortOrder, chp.SortOrder, s.SortOrder, COALESCE(c.CharacterName, sa.AssetName);
SELECT sd.SceneDependencyID, ISNULL(sd.ProjectID, @ProjectID) AS ProjectID, sd.SourceSceneID, sd.TargetSceneID,
sd.SceneDependencyTypeID, sdt.TypeName AS SceneDependencyTypeName, sd.Description,
sd.IsHardDependency, CAST(NULL AS nvarchar(50)) AS DependencyDirection, sb.BookID AS SourceBookID, sb.BookTitle AS SourceBookTitle,
sc.ChapterID AS SourceChapterID, sc.ChapterNumber AS SourceChapterNumber, ss.SceneNumber AS SourceSceneNumber,
ss.SceneTitle AS SourceSceneTitle, tb.BookID AS TargetBookID, tb.BookTitle AS TargetBookTitle,
tc.ChapterID AS TargetChapterID, tc.ChapterNumber AS TargetChapterNumber, ts.SceneNumber AS TargetSceneNumber,
ts.SceneTitle AS TargetSceneTitle, sd.CreatedDate, sd.UpdatedDate, sd.IsArchived
FROM dbo.SceneDependencies sd
INNER JOIN dbo.SceneDependencyTypes sdt ON sdt.SceneDependencyTypeID = sd.SceneDependencyTypeID
INNER JOIN dbo.Scenes ss ON ss.SceneID = sd.SourceSceneID
INNER JOIN dbo.Chapters sc ON sc.ChapterID = ss.ChapterID
INNER JOIN dbo.Books sb ON sb.BookID = sc.BookID
INNER JOIN dbo.Scenes ts ON ts.SceneID = sd.TargetSceneID
INNER JOIN dbo.Chapters tc ON tc.ChapterID = ts.ChapterID
INNER JOIN dbo.Books tb ON tb.BookID = tc.BookID
WHERE sd.ProjectID = @ProjectID OR sb.ProjectID = @ProjectID OR tb.ProjectID = @ProjectID
ORDER BY sb.SortOrder, sc.SortOrder, ss.SortOrder, sd.SceneDependencyID;
SELECT ValidationRunID, ProjectID, BookID, StartedDate, CompletedDate, TriggeredBy, ScopeDescription
FROM dbo.ValidationRuns
WHERE ProjectID = @ProjectID
ORDER BY StartedDate DESC;
SELECT cw.ContinuityWarningID, cw.ValidationRunID, cw.ProjectID, cw.BookID, b.BookTitle, cw.ChapterID,
c.ChapterNumber, c.ChapterTitle, cw.SceneID, s.SceneNumber, s.SceneTitle, cw.EntityType, cw.EntityID,
cw.WarningTypeID, wt.TypeName AS WarningTypeName, cw.WarningSeverityID, ws.SeverityName,
cw.Message, cw.Details, cw.IsDismissed, cw.IsIntentional, cw.CreatedDate, cw.LastDetectedDate
FROM dbo.ContinuityWarnings cw
INNER JOIN dbo.WarningTypes wt ON wt.WarningTypeID = cw.WarningTypeID
INNER JOIN dbo.WarningSeverities ws ON ws.WarningSeverityID = cw.WarningSeverityID
LEFT JOIN dbo.Books b ON b.BookID = cw.BookID
LEFT JOIN dbo.Chapters c ON c.ChapterID = cw.ChapterID
LEFT JOIN dbo.Scenes s ON s.SceneID = cw.SceneID
WHERE cw.ProjectID = @ProjectID
ORDER BY cw.LastDetectedDate DESC, cw.ContinuityWarningID;
SELECT sn.SceneNoteID, sn.SceneID, sn.SceneNoteTypeID, snt.TypeName, sn.NoteTitle, sn.NoteText,
sn.SortOrder, sn.IsPinned, sn.IsResolved, sn.CreatedDate, sn.UpdatedDate,
sn.CreatedByUserID, sn.ModifiedByUserID, sn.CreatedDateUTC, sn.ModifiedDateUTC
FROM dbo.SceneNotes sn
INNER JOIN dbo.SceneNoteTypes snt ON snt.SceneNoteTypeID = sn.SceneNoteTypeID
INNER JOIN dbo.Scenes s ON s.SceneID = sn.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE b.ProjectID = @ProjectID
ORDER BY sn.SceneID, sn.SortOrder, sn.SceneNoteID;
SELECT sw.SceneWorkflowID, sw.SceneID, sw.DraftStatus, sw.EstimatedWordCount, sw.ActualWordCount,
sw.DraftedDate, sw.LastWorkedOn, sw.ReadyForDraft, sw.ReadyForRevision, sw.ReadyForPolish,
sw.IsBlocked, sw.BlockedReason, sw.Priority, sw.CreatedDate, sw.UpdatedDate,
sw.CreatedByUserID, sw.ModifiedByUserID, sw.CreatedDateUTC, sw.ModifiedDateUTC
FROM dbo.SceneWorkflow sw
INNER JOIN dbo.Scenes s ON s.SceneID = sw.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE b.ProjectID = @ProjectID
ORDER BY sw.SceneID;
SELECT sci.SceneChecklistItemID, sci.SceneID, sci.ItemText, sci.IsCompleted, sci.SortOrder,
sci.CreatedDate, sci.UpdatedDate,
sci.CreatedByUserID, sci.ModifiedByUserID, sci.CreatedDateUTC, sci.ModifiedDateUTC
FROM dbo.SceneChecklistItems sci
INNER JOIN dbo.Scenes s ON s.SceneID = sci.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE b.ProjectID = @ProjectID
ORDER BY sci.SceneID, sci.SortOrder, sci.SceneChecklistItemID;
SELECT sa.SceneAttachmentID, sa.SceneID, sa.SceneAttachmentTypeID, sat.TypeName, sa.Title,
sa.FilePath, sa.ExternalUrl, sa.Notes, sa.CreatedDate, sa.UpdatedDate,
sa.CreatedByUserID, sa.ModifiedByUserID, sa.CreatedDateUTC, sa.ModifiedDateUTC
FROM dbo.SceneAttachments sa
INNER JOIN dbo.SceneAttachmentTypes sat ON sat.SceneAttachmentTypeID = sa.SceneAttachmentTypeID
INNER JOIN dbo.Scenes s ON s.SceneID = sa.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE b.ProjectID = @ProjectID
ORDER BY sa.SceneID, sa.SceneAttachmentID;
SELECT cg.ChapterGoalID, cg.ChapterID, cg.GoalSummary, cg.EmotionalGoal, cg.ReaderTakeaway,
cg.MustInclude, cg.RisksOrConcerns, cg.CreatedDate, cg.UpdatedDate,
cg.CreatedByUserID, cg.ModifiedByUserID, cg.CreatedDateUTC, cg.ModifiedDateUTC
FROM dbo.ChapterGoals cg
INNER JOIN dbo.Chapters c ON c.ChapterID = cg.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE b.ProjectID = @ProjectID
ORDER BY b.SortOrder, c.SortOrder;
SELECT sc.ScenarioID, sc.ProjectID, sc.BookID, sc.ScenarioName, sc.Description, sc.BaseCreatedDate,
sc.IsAppliedToMain, sc.IsArchived, sc.ArchivedDate, sc.ArchivedReason,
sc.CreatedDate, sc.UpdatedDate, p.ProjectName, b.BookTitle,
(SELECT COUNT(1) FROM dbo.ScenarioSceneOrder sso WHERE sso.ScenarioID = sc.ScenarioID) AS SceneCount,
(SELECT COUNT(1) FROM dbo.ScenarioWarnings sw WHERE sw.ScenarioID = sc.ScenarioID) AS WarningCount
FROM dbo.Scenarios sc
INNER JOIN dbo.Projects p ON p.ProjectID = sc.ProjectID
LEFT JOIN dbo.Books b ON b.BookID = sc.BookID
WHERE sc.ProjectID = @ProjectID
ORDER BY sc.IsArchived, sc.UpdatedDate DESC;
SELECT sso.ScenarioSceneOrderID, sso.ScenarioID, sso.SceneID, sso.ProposedChapterID, sso.ProposedSortOrder,
sso.Notes, sso.CreatedDate, sso.UpdatedDate
FROM dbo.ScenarioSceneOrder sso
INNER JOIN dbo.Scenarios sc ON sc.ScenarioID = sso.ScenarioID
WHERE sc.ProjectID = @ProjectID
ORDER BY sso.ScenarioID, sso.ProposedSortOrder;
SELECT svr.ScenarioValidationRunID, svr.ScenarioID, svr.StartedDate, svr.CompletedDate, svr.WarningCount
FROM dbo.ScenarioValidationRuns svr
INNER JOIN dbo.Scenarios sc ON sc.ScenarioID = svr.ScenarioID
WHERE sc.ProjectID = @ProjectID
ORDER BY svr.StartedDate DESC;
SELECT sw.ScenarioWarningID, sw.ScenarioValidationRunID, sw.ScenarioID, sw.SceneID, sw.EntityType,
sw.EntityID, sw.WarningTypeName, sw.SeverityName, sw.Message, sw.Details, sw.CreatedDate
FROM dbo.ScenarioWarnings sw
INNER JOIN dbo.Scenarios sc ON sc.ScenarioID = sw.ScenarioID
WHERE sc.ProjectID = @ProjectID
ORDER BY sw.CreatedDate DESC, sw.ScenarioWarningID;
SELECT GenreMetricPresetID, PresetKey, PresetName, Description, SortOrder, IsActive
FROM dbo.GenreMetricPresets
ORDER BY SortOrder, PresetName;
SELECT gpmm.GenreMetricPresetID, gmp.PresetKey, gmp.PresetName,
gpmm.MetricTypeID, mt.MetricName, gpmm.SortOrder
FROM dbo.GenreMetricPresetMetrics gpmm
INNER JOIN dbo.GenreMetricPresets gmp ON gmp.GenreMetricPresetID = gpmm.GenreMetricPresetID
INNER JOIN dbo.SceneMetricTypes mt ON mt.MetricTypeID = gpmm.MetricTypeID
WHERE EXISTS
(
SELECT 1
FROM dbo.SceneMetricTypes projectMetric
WHERE projectMetric.MetricTypeID = gpmm.MetricTypeID
AND
(
projectMetric.ProjectID IS NULL
OR projectMetric.ProjectID = @ProjectID
OR EXISTS
(
SELECT 1
FROM dbo.ProjectTimelineMetricSettings ptms
WHERE ptms.ProjectID = @ProjectID
AND ptms.MetricTypeID = projectMetric.MetricTypeID
)
)
)
ORDER BY gmp.SortOrder, gpmm.SortOrder, mt.MetricName;
SELECT pua.ProjectUserAccessID, pua.ProjectID, pua.UserID, u.Email, u.DisplayName,
pua.AccessRole, pua.InvitedByUserID, invitedBy.Email AS InvitedByEmail,
pua.InvitedDateUTC, pua.AcceptedDateUTC, pua.IsActive
FROM dbo.ProjectUserAccess pua
INNER JOIN dbo.AppUser u ON u.UserID = pua.UserID
LEFT JOIN dbo.AppUser invitedBy ON invitedBy.UserID = pua.InvitedByUserID
WHERE pua.ProjectID = @ProjectID
AND pua.IsActive = 1
ORDER BY CASE WHEN pua.AccessRole = N'Owner' THEN 0 ELSE 1 END, u.Email;
SELECT UserFileID, UserID, ProjectID, EntityType, EntityID, FileName, OriginalFileName, ContentType,
FileSizeBytes, StoragePath, UploadedDateUTC, DeletedDateUTC, IsDeleted
FROM dbo.UserFile
WHERE ProjectID = @ProjectID
ORDER BY IsDeleted, UploadedDateUTC, UserFileID;
END;
GO
CREATE OR ALTER PROCEDURE dbo.ProjectBackup_PersistentState_List @ProjectID int
AS
BEGIN
SET NOCOUNT ON;
SELECT * FROM dbo.ManuscriptDocuments WHERE ProjectID=@ProjectID ORDER BY ManuscriptDocumentID;
SELECT * FROM dbo.SceneManuscriptSources WHERE ProjectID=@ProjectID ORDER BY SceneID;
SELECT * FROM dbo.ManuscriptStructuralChapterSources WHERE ProjectID=@ProjectID ORDER BY ChapterID;
SELECT * FROM dbo.WritingPlans WHERE ProjectID=@ProjectID ORDER BY WritingPlanID;
SELECT i.* FROM dbo.WritingScheduleItems i JOIN dbo.WritingPlans p ON p.WritingPlanID=i.WritingPlanID WHERE p.ProjectID=@ProjectID ORDER BY i.WritingScheduleItemID;
SELECT a.* FROM dbo.CharacterAliases a JOIN dbo.Characters c ON c.CharacterID=a.CharacterID WHERE c.ProjectID=@ProjectID ORDER BY a.CharacterAliasID;
SELECT a.* FROM dbo.AssetAliases a JOIN dbo.StoryAssets s ON s.StoryAssetID=a.StoryAssetID WHERE s.ProjectID=@ProjectID ORDER BY a.AssetAliasID;
SELECT a.* FROM dbo.LocationAliases a JOIN dbo.Locations l ON l.LocationID=a.LocationID WHERE l.ProjectID=@ProjectID ORDER BY a.LocationAliasID;
SELECT * FROM dbo.AuthorPlotSeeds WHERE ProjectID=@ProjectID ORDER BY AuthorPlotSeedID;
SELECT * FROM dbo.ContinuityWarningAcknowledgements WHERE ProjectID=@ProjectID ORDER BY ContinuityWarningAcknowledgementID;
SELECT x.* FROM dbo.PlotEventTargetPlotLines x JOIN dbo.ThreadEvents e ON e.ThreadEventID=x.PlotEventID JOIN dbo.PlotThreads t ON t.PlotThreadID=e.PlotThreadID JOIN dbo.PlotLines p ON p.PlotLineID=t.PlotLineID WHERE p.ProjectID=@ProjectID ORDER BY x.PlotEventID,x.PlotLineID;
END;
GO
CREATE OR ALTER PROCEDURE dbo.ProjectRestore_ApplyFromJson
@ProjectID int,
@SourceRestorePointID int = NULL,
@SafetyRestorePointID int = NULL,
@JsonData nvarchar(max)
AS
BEGIN
SET NOCOUNT ON;
SET XACT_ABORT ON;
IF ISNULL(ISJSON(@JsonData), 0) <> 1
THROW 51001, 'Restore JSON is invalid.', 1;
IF ISNULL(JSON_VALUE(@JsonData, '$.Format'), N'') <> N'PlotDirector.ProjectBackup'
THROW 51002, 'Restore JSON format is not recognised.', 1;
IF ISNULL(JSON_VALUE(@JsonData, '$.FormatVersion'), N'') NOT IN (N'1.0', N'1.1', N'1.2')
THROW 51003, 'Restore JSON format version is not supported.', 1;
IF ISNULL(@ProjectID,0)<=0 OR ISNULL(TRY_CONVERT(int, JSON_VALUE(@JsonData, '$.Project.ProjectID')),-1) <> @ProjectID
THROW 51004, 'Restore point does not belong to this project.', 1;
DECLARE @RestoreTables table (TableName sysname NOT NULL PRIMARY KEY);
INSERT INTO @RestoreTables (TableName)
VALUES
(N'ManuscriptDocuments'), (N'SceneManuscriptSources'), (N'ManuscriptStructuralChapterSources'), (N'WritingPlans'), (N'WritingScheduleItems'), (N'CharacterAliases'), (N'AssetAliases'), (N'LocationAliases'), (N'AuthorPlotSeeds'), (N'ContinuityWarningAcknowledgements'), (N'PlotEventTargetPlotLines'),
(N'ProjectTimelineSettings'), (N'ProjectTimelineMetricSettings'), (N'TimelineViewPresets'),
(N'SceneMetricTypes'), (N'SceneMetricValues'), (N'Books'), (N'Chapters'), (N'Scenes'),
(N'ScenePurposes'), (N'SceneOutcomes'), (N'PlotLines'), (N'PlotThreads'), (N'ThreadEvents'),
(N'AssetStates'), (N'StoryAssets'), (N'AssetEvents'), (N'AssetDependencies'),
(N'AssetCustodyEvents'), (N'AssetCustodyEventCharacters'), (N'Characters'), (N'SceneCharacters'),
(N'CharacterAttributeTypes'), (N'CharacterAttributeEvents'), (N'CharacterKnowledge'),
(N'CharacterRelationships'), (N'RelationshipEvents'), (N'Locations'), (N'LocationRelationships'),
(N'MapReferenceImages'), (N'StoryMaps'), (N'MapFeatures'), (N'MapRelationships'), (N'MapJourneyNotes'),
(N'FloorPlans'), (N'FloorPlanFloors'), (N'FloorPlanBlocks'), (N'FloorPlanTransitions'),
(N'SceneAssetLocations'), (N'SceneFloorPlanOccupancy'), (N'SceneDependencies'), (N'ValidationRuns'), (N'ContinuityWarnings'),
(N'SceneNotes'), (N'SceneWorkflow'), (N'SceneChecklistItems'), (N'SceneAttachments'),
(N'ChapterGoals'), (N'Scenarios'), (N'ScenarioSceneOrder'), (N'ScenarioValidationRuns'),
(N'ScenarioWarnings');
BEGIN TRANSACTION;
DECLARE @PreviousMapRevision int = ISNULL((SELECT MAX(Revision) FROM dbo.StoryMaps WHERE ProjectID=@ProjectID),0);
DECLARE @TableName sysname;
DECLARE DisableCursor CURSOR LOCAL FAST_FORWARD FOR SELECT TableName FROM @RestoreTables;
OPEN DisableCursor;
FETCH NEXT FROM DisableCursor INTO @TableName;
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @DisableSql nvarchar(max) = N'ALTER TABLE dbo.' + QUOTENAME(@TableName) + N' NOCHECK CONSTRAINT ALL;';
EXEC (@DisableSql);
FETCH NEXT FROM DisableCursor INTO @TableName;
END
CLOSE DisableCursor;
DEALLOCATE DisableCursor;
DELETE i FROM dbo.WritingScheduleItems i JOIN dbo.WritingPlans p ON p.WritingPlanID=i.WritingPlanID WHERE p.ProjectID=@ProjectID;
DELETE dbo.WritingPlans WHERE ProjectID=@ProjectID;
DELETE dbo.AuthorPlotSeeds WHERE ProjectID=@ProjectID;
DELETE dbo.ContinuityWarningAcknowledgements WHERE ProjectID=@ProjectID;
DELETE a FROM dbo.CharacterAliases a JOIN dbo.Characters c ON c.CharacterID=a.CharacterID WHERE c.ProjectID=@ProjectID;
DELETE a FROM dbo.AssetAliases a JOIN dbo.StoryAssets s ON s.StoryAssetID=a.StoryAssetID WHERE s.ProjectID=@ProjectID;
DELETE a FROM dbo.LocationAliases a JOIN dbo.Locations l ON l.LocationID=a.LocationID WHERE l.ProjectID=@ProjectID;
DELETE x FROM dbo.PlotEventTargetPlotLines x JOIN dbo.ThreadEvents e ON e.ThreadEventID=x.PlotEventID JOIN dbo.PlotThreads t ON t.PlotThreadID=e.PlotThreadID JOIN dbo.PlotLines p ON p.PlotLineID=t.PlotLineID WHERE p.ProjectID=@ProjectID;
DELETE dbo.SceneManuscriptSources WHERE ProjectID=@ProjectID;
DELETE dbo.ManuscriptStructuralChapterSources WHERE ProjectID=@ProjectID;
DELETE dbo.ManuscriptDocuments WHERE ProjectID=@ProjectID;
DELETE n FROM dbo.MapJourneyNotes n JOIN dbo.StoryMaps m ON m.MapID=n.MapID WHERE m.ProjectID=@ProjectID;
DELETE r FROM dbo.MapRelationships r JOIN dbo.StoryMaps m ON m.MapID=r.MapID WHERE m.ProjectID=@ProjectID;
DELETE f FROM dbo.MapFeatures f JOIN dbo.StoryMaps m ON m.MapID=f.MapID WHERE m.ProjectID=@ProjectID;
DELETE dbo.StoryMaps WHERE ProjectID=@ProjectID;
DELETE dbo.MapReferenceImages WHERE ProjectID=@ProjectID;
UPDATE dbo.UserFile SET IsDeleted=1,DeletedDateUTC=SYSUTCDATETIME() WHERE ProjectID=@ProjectID AND EntityType=N'MapReferenceImage';
DELETE sw FROM dbo.ScenarioWarnings sw INNER JOIN dbo.Scenarios sc ON sc.ScenarioID = sw.ScenarioID WHERE sc.ProjectID = @ProjectID;
DELETE svr FROM dbo.ScenarioValidationRuns svr INNER JOIN dbo.Scenarios sc ON sc.ScenarioID = svr.ScenarioID WHERE sc.ProjectID = @ProjectID;
DELETE sso FROM dbo.ScenarioSceneOrder sso INNER JOIN dbo.Scenarios sc ON sc.ScenarioID = sso.ScenarioID WHERE sc.ProjectID = @ProjectID;
DELETE FROM dbo.Scenarios WHERE ProjectID = @ProjectID;
DELETE FROM dbo.ContinuityWarnings WHERE ProjectID = @ProjectID;
DELETE FROM dbo.ValidationRuns WHERE ProjectID = @ProjectID;
DELETE sa FROM dbo.SceneAttachments sa INNER JOIN dbo.Scenes s ON s.SceneID = sa.SceneID INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE sci FROM dbo.SceneChecklistItems sci INNER JOIN dbo.Scenes s ON s.SceneID = sci.SceneID INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE sw FROM dbo.SceneWorkflow sw INNER JOIN dbo.Scenes s ON s.SceneID = sw.SceneID INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE sn FROM dbo.SceneNotes sn INNER JOIN dbo.Scenes s ON s.SceneID = sn.SceneID INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE cg FROM dbo.ChapterGoals cg INNER JOIN dbo.Chapters c ON c.ChapterID = cg.ChapterID INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE sfpo FROM dbo.SceneFloorPlanOccupancy sfpo
INNER JOIN dbo.Scenes s ON s.SceneID = sfpo.SceneID
INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID
INNER JOIN dbo.Books b ON b.BookID = c.BookID
WHERE b.ProjectID = @ProjectID;
DELETE sd FROM dbo.SceneDependencies sd
LEFT JOIN dbo.Scenes ss ON ss.SceneID = sd.SourceSceneID
LEFT JOIN dbo.Chapters sc ON sc.ChapterID = ss.ChapterID
LEFT JOIN dbo.Books sb ON sb.BookID = sc.BookID
LEFT JOIN dbo.Scenes ts ON ts.SceneID = sd.TargetSceneID
LEFT JOIN dbo.Chapters tc ON tc.ChapterID = ts.ChapterID
LEFT JOIN dbo.Books tb ON tb.BookID = tc.BookID
WHERE sd.ProjectID = @ProjectID OR sb.ProjectID = @ProjectID OR tb.ProjectID = @ProjectID;
DELETE re FROM dbo.RelationshipEvents re INNER JOIN dbo.CharacterRelationships cr ON cr.CharacterRelationshipID = re.CharacterRelationshipID WHERE cr.ProjectID = @ProjectID;
DELETE FROM dbo.CharacterRelationships WHERE ProjectID = @ProjectID;
DELETE ck FROM dbo.CharacterKnowledge ck INNER JOIN dbo.Characters ch ON ch.CharacterID = ck.CharacterID WHERE ch.ProjectID = @ProjectID;
DELETE cae FROM dbo.CharacterAttributeEvents cae INNER JOIN dbo.Characters ch ON ch.CharacterID = cae.CharacterID WHERE ch.ProjectID = @ProjectID;
DELETE sc FROM dbo.SceneCharacters sc INNER JOIN dbo.Characters ch ON ch.CharacterID = sc.CharacterID WHERE ch.ProjectID = @ProjectID;
DELETE acec FROM dbo.AssetCustodyEventCharacters acec INNER JOIN dbo.AssetCustodyEvents ace ON ace.AssetCustodyEventID = acec.AssetCustodyEventID INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ace.StoryAssetID WHERE sa.ProjectID = @ProjectID;
DELETE ace FROM dbo.AssetCustodyEvents ace INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ace.StoryAssetID WHERE sa.ProjectID = @ProjectID;
DELETE ad FROM dbo.AssetDependencies ad INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ad.SourceAssetID WHERE sa.ProjectID = @ProjectID;
DELETE ae FROM dbo.AssetEvents ae INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = ae.StoryAssetID WHERE sa.ProjectID = @ProjectID;
DELETE sal FROM dbo.SceneAssetLocations sal INNER JOIN dbo.StoryAssets sa ON sa.StoryAssetID = sal.StoryAssetID WHERE sa.ProjectID = @ProjectID;
DELETE FROM dbo.StoryAssets WHERE ProjectID = @ProjectID;
DELETE fpt FROM dbo.FloorPlanTransitions fpt INNER JOIN dbo.FloorPlanFloors fpf ON fpf.FloorPlanFloorID = fpt.FloorPlanFloorID INNER JOIN dbo.FloorPlans fp ON fp.FloorPlanID = fpf.FloorPlanID WHERE fp.ProjectID = @ProjectID;
DELETE fpb FROM dbo.FloorPlanBlocks fpb INNER JOIN dbo.FloorPlanFloors fpf ON fpf.FloorPlanFloorID = fpb.FloorPlanFloorID INNER JOIN dbo.FloorPlans fp ON fp.FloorPlanID = fpf.FloorPlanID WHERE fp.ProjectID = @ProjectID;
DELETE fpf FROM dbo.FloorPlanFloors fpf INNER JOIN dbo.FloorPlans fp ON fp.FloorPlanID = fpf.FloorPlanID WHERE fp.ProjectID = @ProjectID;
DELETE FROM dbo.FloorPlans WHERE ProjectID = @ProjectID;
DELETE lr FROM dbo.LocationRelationships lr INNER JOIN dbo.Locations l ON l.LocationID = lr.FromLocationID WHERE l.ProjectID = @ProjectID;
DELETE FROM dbo.Locations WHERE ProjectID = @ProjectID;
DELETE te FROM dbo.ThreadEvents te INNER JOIN dbo.PlotThreads pt ON pt.PlotThreadID = te.PlotThreadID INNER JOIN dbo.PlotLines pl ON pl.PlotLineID = pt.PlotLineID WHERE pl.ProjectID = @ProjectID;
DELETE pt FROM dbo.PlotThreads pt INNER JOIN dbo.PlotLines pl ON pl.PlotLineID = pt.PlotLineID WHERE pl.ProjectID = @ProjectID;
DELETE FROM dbo.PlotLines WHERE ProjectID = @ProjectID;
DELETE FROM dbo.TimelineViewPresets WHERE ProjectID = @ProjectID;
DELETE FROM dbo.ProjectTimelineMetricSettings WHERE ProjectID = @ProjectID;
DELETE FROM dbo.ProjectTimelineSettings WHERE ProjectID = @ProjectID;
DELETE smv FROM dbo.SceneMetricValues smv INNER JOIN dbo.Scenes s ON s.SceneID = smv.SceneID INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE FROM dbo.SceneMetricTypes WHERE ProjectID = @ProjectID;
DELETE FROM dbo.CharacterAttributeTypes WHERE ProjectID = @ProjectID;
DELETE FROM dbo.AssetStates WHERE ProjectID = @ProjectID;
DELETE sp FROM dbo.ScenePurposes sp INNER JOIN dbo.Scenes s ON s.SceneID = sp.SceneID INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE so FROM dbo.SceneOutcomes so INNER JOIN dbo.Scenes s ON s.SceneID = so.SceneID INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE s FROM dbo.Scenes s INNER JOIN dbo.Chapters c ON c.ChapterID = s.ChapterID INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE c FROM dbo.Chapters c INNER JOIN dbo.Books b ON b.BookID = c.BookID WHERE b.ProjectID = @ProjectID;
DELETE FROM dbo.Books WHERE ProjectID = @ProjectID;
DELETE FROM dbo.Characters WHERE ProjectID = @ProjectID;
UPDATE p
SET ProjectName = src.ProjectName,
Description = src.Description,
CreatedDate = src.CreatedDate,
UpdatedDate = SYSUTCDATETIME(),
CreatedByUserID = CASE WHEN JSON_VALUE(@JsonData,'$.FormatVersion')=N'1.2' THEN src.CreatedByUserID ELSE p.CreatedByUserID END,
ModifiedByUserID = CASE WHEN JSON_VALUE(@JsonData,'$.FormatVersion')=N'1.2' THEN src.ModifiedByUserID ELSE p.ModifiedByUserID END,
CreatedDateUTC = CASE WHEN JSON_VALUE(@JsonData,'$.FormatVersion')=N'1.2' THEN src.CreatedDateUTC ELSE p.CreatedDateUTC END,
ModifiedDateUTC = CASE WHEN JSON_VALUE(@JsonData,'$.FormatVersion')=N'1.2' THEN src.ModifiedDateUTC ELSE p.ModifiedDateUTC END,
IsArchived = src.IsArchived,
ArchivedDate = src.ArchivedDate,
ArchivedReason = src.ArchivedReason
FROM dbo.Projects p
CROSS APPLY OPENJSON(@JsonData, '$.Project')
WITH
(
ProjectID int '$.ProjectID',
ProjectName nvarchar(200) '$.ProjectName',
Description nvarchar(max) '$.Description',
CreatedDate datetime2 '$.CreatedDate',
CreatedByUserID int '$.CreatedByUserID',
ModifiedByUserID int '$.ModifiedByUserID',
CreatedDateUTC datetime2 '$.CreatedDateUTC',
ModifiedDateUTC datetime2 '$.ModifiedDateUTC',
IsArchived bit '$.IsArchived',
ArchivedDate datetime2 '$.ArchivedDate',
ArchivedReason nvarchar(1000) '$.ArchivedReason'
) src
WHERE p.ProjectID = @ProjectID AND src.ProjectID = @ProjectID;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneMetricTypes', N'$.Data.SceneMetricTypes', @JsonData, @ProjectID, 1;
EXEC dbo.ProjectRestore_InsertJsonTable N'AssetStates', N'$.Data.AssetStates', @JsonData, @ProjectID, 1;
EXEC dbo.ProjectRestore_InsertJsonTable N'CharacterAttributeTypes', N'$.Data.CharacterAttributeTypes', @JsonData, @ProjectID, 1;
EXEC dbo.ProjectRestore_InsertJsonTable N'Books', N'$.Data.Books', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'Chapters', N'$.Data.Chapters', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'Characters', N'$.Data.Characters', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'Locations', N'$.Data.Locations', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'FloorPlans', N'$.Data.FloorPlans', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'FloorPlanFloors', N'$.Data.FloorPlanFloors', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'FloorPlanBlocks', N'$.Data.FloorPlanBlocks', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'FloorPlanTransitions', N'$.Data.FloorPlanTransitions', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'Scenes', N'$.Data.Scenes', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ScenePurposes', N'$.Data.ScenePurposes', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneOutcomes', N'$.Data.SceneOutcomes', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneMetricValues', N'$.Data.SceneMetricValues', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ProjectTimelineSettings', N'$.Data.TimelineSettings', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ProjectTimelineMetricSettings', N'$.Data.TimelineMetricSettings', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'TimelineViewPresets', N'$.Data.TimelineViewPresets', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'PlotLines', N'$.Data.PlotLines', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'PlotThreads', N'$.Data.PlotThreads', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ThreadEvents', N'$.Data.ThreadEvents', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'StoryAssets', N'$.Data.StoryAssets', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'AssetEvents', N'$.Data.AssetEvents', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'AssetDependencies', N'$.Data.AssetDependencies', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'AssetCustodyEvents', N'$.Data.AssetCustodyEvents', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'AssetCustodyEventCharacters', N'$.Data.AssetCustodyCharacters', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneCharacters', N'$.Data.SceneCharacters', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'CharacterAttributeEvents', N'$.Data.CharacterAttributeEvents', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'CharacterKnowledge', N'$.Data.CharacterKnowledge', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'CharacterRelationships', N'$.Data.CharacterRelationships', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'RelationshipEvents', N'$.Data.RelationshipEvents', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'LocationRelationships', N'$.Data.LocationRelationships', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneAssetLocations', N'$.Data.SceneAssetLocations', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneFloorPlanOccupancy', N'$.Data.SceneFloorPlanOccupancy', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneDependencies', N'$.Data.SceneDependencies', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ValidationRuns', N'$.Data.ValidationRuns', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ContinuityWarnings', N'$.Data.ContinuityWarnings', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneNotes', N'$.Data.SceneNotes', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneWorkflow', N'$.Data.SceneWorkflow', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneChecklistItems', N'$.Data.SceneChecklistItems', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneAttachments', N'$.Data.SceneAttachments', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ChapterGoals', N'$.Data.ChapterGoals', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'Scenarios', N'$.Data.Scenarios', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ScenarioSceneOrder', N'$.Data.ScenarioSceneOrder', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ScenarioValidationRuns', N'$.Data.ScenarioValidationRuns', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'ScenarioWarnings', N'$.Data.ScenarioWarnings', @JsonData, @ProjectID, 0;
-- Older backups contain no Maps sets. The automatic safety restore point preserves current geography.
IF EXISTS(SELECT 1 FROM OPENJSON(@JsonData,'$.Data.MapReferenceImages') WITH(ProjectID int '$.ProjectID') WHERE ProjectID IS NULL OR ProjectID<>@ProjectID) THROW 51005,'Reference images cross project boundaries.',1;
INSERT dbo.MapReferenceImages(ImageID,ProjectID,OriginalFileName,ContentType,Width,Height,ImageData)
SELECT x.ImageID,@ProjectID,x.OriginalFileName,x.ContentType,x.Width,x.Height,CAST(N'' AS xml).value('xs:base64Binary(sql:column("x.ImageData"))','varbinary(max)')
FROM OPENJSON(@JsonData,'$.Data.MapReferenceImages') WITH(ImageID uniqueidentifier '$.ImageID',OriginalFileName nvarchar(200) '$.OriginalFileName',ContentType nvarchar(40) '$.ContentType',Width int '$.Width',Height int '$.Height',ImageData nvarchar(max) '$.ImageData') x;
DECLARE @ImageOwner int=(SELECT TOP(1) UserID FROM dbo.ProjectUserAccess WHERE ProjectID=@ProjectID AND AccessRole='Owner' AND IsActive=1 ORDER BY ProjectUserAccessID);
INSERT dbo.UserFile(UserID,ProjectID,EntityType,EntityID,FileName,OriginalFileName,ContentType,FileSizeBytes,StoragePath)
SELECT @ImageOwner,@ProjectID,N'MapReferenceImage',@ProjectID,CONVERT(nvarchar(36),ImageID)+N'.webp',OriginalFileName,ContentType,FileSizeBytes,N'db:map-reference/'+CONVERT(nvarchar(20),@ProjectID)+N'/'+CONVERT(nvarchar(36),ImageID) FROM dbo.MapReferenceImages WHERE ProjectID=@ProjectID;
EXEC dbo.ProjectRestore_InsertJsonTable N'StoryMaps', N'$.Data.StoryMaps', @JsonData, @ProjectID, 1;
IF EXISTS(SELECT 1 FROM OPENJSON(@JsonData,'$.Data.MapFeatures') WITH(MapID int '$.MapID') x WHERE NOT EXISTS(SELECT 1 FROM dbo.StoryMaps m WHERE m.MapID=x.MapID AND m.ProjectID=@ProjectID))
OR EXISTS(SELECT 1 FROM OPENJSON(@JsonData,'$.Data.MapRelationships') WITH(MapID int '$.MapID') x WHERE NOT EXISTS(SELECT 1 FROM dbo.StoryMaps m WHERE m.MapID=x.MapID AND m.ProjectID=@ProjectID))
THROW 51005,'Map backup contains features outside this project.',1;
EXEC dbo.ProjectRestore_InsertJsonTable N'MapFeatures', N'$.Data.MapFeatures', @JsonData, @ProjectID, 0;
EXEC dbo.ProjectRestore_InsertJsonTable N'MapRelationships', N'$.Data.MapRelationships', @JsonData, @ProjectID, 0;
IF EXISTS(SELECT 1 FROM dbo.StoryMaps m JOIN dbo.StoryMaps parent ON parent.MapID=m.ParentMapID WHERE m.ProjectID=@ProjectID AND parent.ProjectID<>@ProjectID)
OR EXISTS(SELECT 1 FROM dbo.MapFeatures f JOIN dbo.StoryMaps m ON m.MapID=f.MapID JOIN dbo.Locations l ON l.LocationID=f.LocationID WHERE m.ProjectID=@ProjectID AND l.ProjectID<>@ProjectID)
THROW 51005,'Map hierarchy or Location links cross projects.',1;
IF EXISTS(SELECT 1 FROM OPENJSON(@JsonData,'$.Data.MapJourneyNotes') WITH(MapID int '$.MapID',CharacterID int '$.CharacterID',FromSceneID int '$.FromSceneID',ToSceneID int '$.ToSceneID',RouteFeatureID uniqueidentifier '$.RouteFeatureID') n
WHERE NOT EXISTS(SELECT 1 FROM dbo.StoryMaps m WHERE m.MapID=n.MapID AND m.ProjectID=@ProjectID)
OR NOT EXISTS(SELECT 1 FROM dbo.Characters c WHERE c.CharacterID=n.CharacterID AND c.ProjectID=@ProjectID)
OR (SELECT COUNT(*) FROM dbo.Scenes s JOIN dbo.Chapters ch ON ch.ChapterID=s.ChapterID JOIN dbo.Books b ON b.BookID=ch.BookID WHERE b.ProjectID=@ProjectID AND s.SceneID IN(n.FromSceneID,n.ToSceneID))<>2
OR (n.RouteFeatureID IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.MapFeatures f WHERE f.MapID=n.MapID AND f.FeatureID=n.RouteFeatureID AND f.GeometryClass='Path')))
THROW 51005,'Journey annotations cross project or map boundaries.',1;
EXEC dbo.ProjectRestore_InsertJsonTable N'MapJourneyNotes',N'$.Data.MapJourneyNotes',@JsonData,@ProjectID,0;
IF EXISTS(SELECT 1 FROM dbo.StoryMaps m WHERE m.ProjectID=@ProjectID AND (ISJSON(m.AppearanceJson)<>1 OR ISJSON(m.ReferenceJson)<>1 OR (JSON_VALUE(m.ReferenceJson,'$.imageID') IS NOT NULL AND NOT EXISTS(SELECT 1 FROM dbo.MapReferenceImages i WHERE i.ProjectID=@ProjectID AND i.ImageID=TRY_CONVERT(uniqueidentifier,JSON_VALUE(m.ReferenceJson,'$.imageID')))))) THROW 51005,'Invalid map appearance or foreign reference image.',1;
UPDATE dbo.StoryMaps SET Revision=CASE WHEN Revision>@PreviousMapRevision THEN Revision+1 ELSE @PreviousMapRevision+1 END WHERE ProjectID=@ProjectID;
EXEC dbo.ProjectRestore_InsertJsonTable N'ManuscriptDocuments',N'$.Data.ManuscriptDocuments',@JsonData,@ProjectID,1;
EXEC dbo.ProjectRestore_InsertJsonTable N'SceneManuscriptSources',N'$.Data.SceneManuscriptSources',@JsonData,@ProjectID,1;
EXEC dbo.ProjectRestore_InsertJsonTable N'ManuscriptStructuralChapterSources',N'$.Data.ManuscriptStructuralChapterSources',@JsonData,@ProjectID,1;
EXEC dbo.ProjectRestore_InsertJsonTable N'WritingPlans',N'$.Data.WritingPlans',@JsonData,@ProjectID,1;
EXEC dbo.ProjectRestore_InsertJsonTable N'WritingScheduleItems',N'$.Data.WritingScheduleItems',@JsonData,@ProjectID,0;
EXEC dbo.ProjectRestore_InsertJsonTable N'CharacterAliases',N'$.Data.CharacterAliases',@JsonData,@ProjectID,0;
EXEC dbo.ProjectRestore_InsertJsonTable N'AssetAliases',N'$.Data.AssetAliases',@JsonData,@ProjectID,0;
EXEC dbo.ProjectRestore_InsertJsonTable N'LocationAliases',N'$.Data.LocationAliases',@JsonData,@ProjectID,0;
EXEC dbo.ProjectRestore_InsertJsonTable N'AuthorPlotSeeds',N'$.Data.AuthorPlotSeeds',@JsonData,@ProjectID,1;
EXEC dbo.ProjectRestore_InsertJsonTable N'ContinuityWarningAcknowledgements',N'$.Data.ContinuityWarningAcknowledgements',@JsonData,@ProjectID,1;
EXEC dbo.ProjectRestore_InsertJsonTable N'PlotEventTargetPlotLines',N'$.Data.PlotEventTargetPlotLines',@JsonData,@ProjectID,0;
DECLARE EnableCursor CURSOR LOCAL FAST_FORWARD FOR SELECT TableName FROM @RestoreTables;
OPEN EnableCursor;
FETCH NEXT FROM EnableCursor INTO @TableName;
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @EnableSql nvarchar(max) = N'ALTER TABLE dbo.' + QUOTENAME(@TableName) + N' WITH CHECK CHECK CONSTRAINT ALL;';
EXEC (@EnableSql);
FETCH NEXT FROM EnableCursor INTO @TableName;
END
CLOSE EnableCursor;
DEALLOCATE EnableCursor;
IF @SourceRestorePointID IS NOT NULL AND @SafetyRestorePointID IS NOT NULL
BEGIN
INSERT INTO dbo.ProjectRestoreHistory (ProjectID, SourceRestorePointID, SafetyRestorePointID, PerformedBy, Notes)
VALUES (@ProjectID, @SourceRestorePointID, @SafetyRestorePointID, SUSER_SNAME(), N'Project restored from saved restore point.');
END;
COMMIT TRANSACTION;
END;
GO