17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"6.0.16")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 128);
22 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
24 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
26 b.Property<
long?>(
"Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType(
"bigint");
30 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
32 b.Property<
int>(
"ChannelLimit")
33 .HasColumnType(
"int");
35 b.Property<
string>(
"ConnectionString")
38 .HasColumnType(
"nvarchar(max)");
40 b.Property<
bool?>(
"Enabled")
41 .HasColumnType(
"bit");
43 b.Property<
long>(
"InstanceId")
44 .HasColumnType(
"bigint");
46 b.Property<
string>(
"Name")
49 .HasColumnType(
"nvarchar(100)");
51 b.Property<
int>(
"Provider")
52 .HasColumnType(
"int");
54 b.Property<
long>(
"ReconnectionInterval")
55 .HasColumnType(
"bigint");
59 b.HasIndex(
"InstanceId",
"Name")
62 b.ToTable(
"ChatBots");
65 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
67 b.Property<
long>(
"Id")
68 .ValueGeneratedOnAdd()
69 .HasColumnType(
"bigint");
71 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
73 b.Property<
long>(
"ChatSettingsId")
74 .HasColumnType(
"bigint");
76 b.Property<decimal?>(
"DiscordChannelId")
77 .HasColumnType(
"decimal(20,0)");
79 b.Property<
string>(
"IrcChannel")
81 .HasColumnType(
"nvarchar(100)");
83 b.Property<
bool?>(
"IsAdminChannel")
85 .HasColumnType(
"bit");
87 b.Property<
bool?>(
"IsSystemChannel")
89 .HasColumnType(
"bit");
91 b.Property<
bool?>(
"IsUpdatesChannel")
93 .HasColumnType(
"bit");
95 b.Property<
bool?>(
"IsWatchdogChannel")
97 .HasColumnType(
"bit");
99 b.Property<
string>(
"Tag")
101 .HasColumnType(
"nvarchar(max)");
105 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
107 .HasFilter(
"[DiscordChannelId] IS NOT NULL");
109 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
111 .HasFilter(
"[IrcChannel] IS NOT NULL");
113 b.ToTable(
"ChatChannels");
116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
118 b.Property<
long?>(
"Id")
119 .ValueGeneratedOnAdd()
120 .HasColumnType(
"bigint");
122 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
124 b.Property<
string>(
"ByondVersion")
126 .HasColumnType(
"nvarchar(max)");
128 b.Property<
int?>(
"DMApiMajorVersion")
129 .HasColumnType(
"int");
131 b.Property<
int?>(
"DMApiMinorVersion")
132 .HasColumnType(
"int");
134 b.Property<
int?>(
"DMApiPatchVersion")
135 .HasColumnType(
"int");
137 b.Property<Guid?>(
"DirectoryName")
139 .HasColumnType(
"uniqueidentifier");
141 b.Property<
string>(
"DmeName")
143 .HasColumnType(
"nvarchar(max)");
145 b.Property<
int?>(
"GitHubDeploymentId")
146 .HasColumnType(
"int");
148 b.Property<
long?>(
"GitHubRepoId")
149 .HasColumnType(
"bigint");
151 b.Property<
long>(
"JobId")
152 .HasColumnType(
"bigint");
154 b.Property<
int?>(
"MinimumSecurityLevel")
155 .HasColumnType(
"int");
157 b.Property<
string>(
"Output")
159 .HasColumnType(
"nvarchar(max)");
161 b.Property<
string>(
"RepositoryOrigin")
162 .HasColumnType(
"nvarchar(max)");
164 b.Property<
long>(
"RevisionInformationId")
165 .HasColumnType(
"bigint");
169 b.HasIndex(
"DirectoryName");
174 b.HasIndex(
"RevisionInformationId");
176 b.ToTable(
"CompileJobs");
179 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
181 b.Property<
long>(
"Id")
182 .ValueGeneratedOnAdd()
183 .HasColumnType(
"bigint");
185 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
187 b.Property<
string>(
"AdditionalParameters")
190 .HasColumnType(
"nvarchar(max)");
192 b.Property<
bool?>(
"AllowWebClient")
194 .HasColumnType(
"bit");
196 b.Property<
bool?>(
"AutoStart")
198 .HasColumnType(
"bit");
200 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
202 .HasColumnType(
"bit");
204 b.Property<
long>(
"HeartbeatSeconds")
205 .HasColumnType(
"bigint");
207 b.Property<
long>(
"InstanceId")
208 .HasColumnType(
"bigint");
210 b.Property<
bool?>(
"LogOutput")
212 .HasColumnType(
"bit");
214 b.Property<
int>(
"Port")
215 .HasColumnType(
"int");
217 b.Property<
int>(
"SecurityLevel")
218 .HasColumnType(
"int");
220 b.Property<
bool?>(
"StartProfiler")
222 .HasColumnType(
"bit");
224 b.Property<
long>(
"StartupTimeout")
225 .HasColumnType(
"bigint");
227 b.Property<
long>(
"TopicRequestTimeout")
228 .HasColumnType(
"bigint");
230 b.Property<
int>(
"Visibility")
231 .HasColumnType(
"int");
235 b.HasIndex(
"InstanceId")
238 b.ToTable(
"DreamDaemonSettings");
241 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
243 b.Property<
long>(
"Id")
244 .ValueGeneratedOnAdd()
245 .HasColumnType(
"bigint");
247 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
249 b.Property<
int>(
"ApiValidationPort")
250 .HasColumnType(
"int");
252 b.Property<
int>(
"ApiValidationSecurityLevel")
253 .HasColumnType(
"int");
255 b.Property<
long>(
"InstanceId")
256 .HasColumnType(
"bigint");
258 b.Property<
string>(
"ProjectName")
260 .HasColumnType(
"nvarchar(max)");
262 b.Property<
bool?>(
"RequireDMApiValidation")
264 .HasColumnType(
"bit");
266 b.Property<TimeSpan?>(
"Timeout")
268 .HasColumnType(
"time");
272 b.HasIndex(
"InstanceId")
275 b.ToTable(
"DreamMakerSettings");
278 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
280 b.Property<
long?>(
"Id")
281 .ValueGeneratedOnAdd()
282 .HasColumnType(
"bigint");
284 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
286 b.Property<
long>(
"AutoUpdateInterval")
287 .HasColumnType(
"bigint");
289 b.Property<
int>(
"ChatBotLimit")
290 .HasColumnType(
"int");
292 b.Property<
int>(
"ConfigurationType")
293 .HasColumnType(
"int");
295 b.Property<
string>(
"Name")
298 .HasColumnType(
"nvarchar(100)");
300 b.Property<
bool?>(
"Online")
302 .HasColumnType(
"bit");
304 b.Property<
string>(
"Path")
306 .HasColumnType(
"nvarchar(450)");
308 b.Property<
string>(
"SwarmIdentifer")
309 .HasColumnType(
"nvarchar(450)");
313 b.HasIndex(
"Path",
"SwarmIdentifer")
315 .HasFilter(
"[SwarmIdentifer] IS NOT NULL");
317 b.ToTable(
"Instances");
320 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
322 b.Property<
long>(
"Id")
323 .ValueGeneratedOnAdd()
324 .HasColumnType(
"bigint");
326 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
328 b.Property<decimal>(
"ByondRights")
329 .HasColumnType(
"decimal(20,0)");
331 b.Property<decimal>(
"ChatBotRights")
332 .HasColumnType(
"decimal(20,0)");
334 b.Property<decimal>(
"ConfigurationRights")
335 .HasColumnType(
"decimal(20,0)");
337 b.Property<decimal>(
"DreamDaemonRights")
338 .HasColumnType(
"decimal(20,0)");
340 b.Property<decimal>(
"DreamMakerRights")
341 .HasColumnType(
"decimal(20,0)");
343 b.Property<
long>(
"InstanceId")
344 .HasColumnType(
"bigint");
346 b.Property<decimal>(
"InstancePermissionSetRights")
347 .HasColumnType(
"decimal(20,0)");
349 b.Property<
long>(
"PermissionSetId")
350 .HasColumnType(
"bigint");
352 b.Property<decimal>(
"RepositoryRights")
353 .HasColumnType(
"decimal(20,0)");
357 b.HasIndex(
"InstanceId");
359 b.HasIndex(
"PermissionSetId",
"InstanceId")
362 b.ToTable(
"InstancePermissionSets");
365 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
367 b.Property<
long?>(
"Id")
368 .ValueGeneratedOnAdd()
369 .HasColumnType(
"bigint");
371 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
373 b.Property<decimal?>(
"CancelRight")
374 .HasColumnType(
"decimal(20,0)");
376 b.Property<decimal?>(
"CancelRightsType")
377 .HasColumnType(
"decimal(20,0)");
379 b.Property<
bool?>(
"Cancelled")
381 .HasColumnType(
"bit");
383 b.Property<
long?>(
"CancelledById")
384 .HasColumnType(
"bigint");
386 b.Property<
string>(
"Description")
388 .HasColumnType(
"nvarchar(max)");
390 b.Property<
long?>(
"ErrorCode")
391 .HasColumnType(
"bigint");
393 b.Property<
string>(
"ExceptionDetails")
394 .HasColumnType(
"nvarchar(max)");
396 b.Property<
long>(
"InstanceId")
397 .HasColumnType(
"bigint");
399 b.Property<DateTimeOffset?>(
"StartedAt")
401 .HasColumnType(
"datetimeoffset");
403 b.Property<
long>(
"StartedById")
404 .HasColumnType(
"bigint");
406 b.Property<DateTimeOffset?>(
"StoppedAt")
407 .HasColumnType(
"datetimeoffset");
411 b.HasIndex(
"CancelledById");
413 b.HasIndex(
"InstanceId");
415 b.HasIndex(
"StartedById");
420 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
422 b.Property<
long>(
"Id")
423 .ValueGeneratedOnAdd()
424 .HasColumnType(
"bigint");
426 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
428 b.Property<
string>(
"ExternalUserId")
431 .HasColumnType(
"nvarchar(100)");
433 b.Property<
int>(
"Provider")
434 .HasColumnType(
"int");
436 b.Property<
long?>(
"UserId")
437 .HasColumnType(
"bigint");
441 b.HasIndex(
"UserId");
443 b.HasIndex(
"Provider",
"ExternalUserId")
446 b.ToTable(
"OAuthConnections");
449 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
451 b.Property<
long?>(
"Id")
452 .ValueGeneratedOnAdd()
453 .HasColumnType(
"bigint");
455 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
457 b.Property<decimal>(
"AdministrationRights")
458 .HasColumnType(
"decimal(20,0)");
460 b.Property<
long?>(
"GroupId")
461 .HasColumnType(
"bigint");
463 b.Property<decimal>(
"InstanceManagerRights")
464 .HasColumnType(
"decimal(20,0)");
466 b.Property<
long?>(
"UserId")
467 .HasColumnType(
"bigint");
471 b.HasIndex(
"GroupId")
473 .HasFilter(
"[GroupId] IS NOT NULL");
477 .HasFilter(
"[UserId] IS NOT NULL");
479 b.ToTable(
"PermissionSets");
482 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
484 b.Property<
long>(
"Id")
485 .ValueGeneratedOnAdd()
486 .HasColumnType(
"bigint");
488 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
490 b.Property<
string>(
"AccessIdentifier")
492 .HasColumnType(
"nvarchar(max)");
494 b.Property<
long>(
"CompileJobId")
495 .HasColumnType(
"bigint");
497 b.Property<
long?>(
"InitialCompileJobId")
498 .HasColumnType(
"bigint");
500 b.Property<
int>(
"LaunchSecurityLevel")
501 .HasColumnType(
"int");
503 b.Property<
int>(
"LaunchVisibility")
504 .HasColumnType(
"int");
506 b.Property<
int>(
"Port")
507 .HasColumnType(
"int");
509 b.Property<
int>(
"ProcessId")
510 .HasColumnType(
"int");
512 b.Property<
int>(
"RebootState")
513 .HasColumnType(
"int");
517 b.HasIndex(
"CompileJobId");
519 b.HasIndex(
"InitialCompileJobId");
521 b.ToTable(
"ReattachInformations");
524 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
526 b.Property<
long>(
"Id")
527 .ValueGeneratedOnAdd()
528 .HasColumnType(
"bigint");
530 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
532 b.Property<
string>(
"AccessToken")
534 .HasColumnType(
"nvarchar(max)");
536 b.Property<
string>(
"AccessUser")
538 .HasColumnType(
"nvarchar(max)");
540 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
542 .HasColumnType(
"bit");
544 b.Property<
bool?>(
"AutoUpdatesSynchronize")
546 .HasColumnType(
"bit");
548 b.Property<
string>(
"CommitterEmail")
551 .HasColumnType(
"nvarchar(max)");
553 b.Property<
string>(
"CommitterName")
556 .HasColumnType(
"nvarchar(max)");
558 b.Property<
bool?>(
"CreateGitHubDeployments")
560 .HasColumnType(
"bit");
562 b.Property<
long>(
"InstanceId")
563 .HasColumnType(
"bigint");
565 b.Property<
bool?>(
"PostTestMergeComment")
567 .HasColumnType(
"bit");
569 b.Property<
bool?>(
"PushTestMergeCommits")
571 .HasColumnType(
"bit");
573 b.Property<
bool?>(
"ShowTestMergeCommitters")
575 .HasColumnType(
"bit");
577 b.Property<
bool?>(
"UpdateSubmodules")
579 .HasColumnType(
"bit");
583 b.HasIndex(
"InstanceId")
586 b.ToTable(
"RepositorySettings");
589 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
591 b.Property<
long>(
"Id")
592 .ValueGeneratedOnAdd()
593 .HasColumnType(
"bigint");
595 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
597 b.Property<
long>(
"RevisionInformationId")
598 .HasColumnType(
"bigint");
600 b.Property<
long>(
"TestMergeId")
601 .HasColumnType(
"bigint");
605 b.HasIndex(
"RevisionInformationId");
607 b.HasIndex(
"TestMergeId");
609 b.ToTable(
"RevInfoTestMerges");
612 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
614 b.Property<
long>(
"Id")
615 .ValueGeneratedOnAdd()
616 .HasColumnType(
"bigint");
618 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
620 b.Property<
string>(
"CommitSha")
623 .HasColumnType(
"nvarchar(40)");
625 b.Property<
long>(
"InstanceId")
626 .HasColumnType(
"bigint");
628 b.Property<
string>(
"OriginCommitSha")
631 .HasColumnType(
"nvarchar(40)");
633 b.Property<DateTimeOffset>(
"Timestamp")
634 .HasColumnType(
"datetimeoffset");
638 b.HasIndex(
"InstanceId",
"CommitSha")
641 b.ToTable(
"RevisionInformations");
644 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
646 b.Property<
long>(
"Id")
647 .ValueGeneratedOnAdd()
648 .HasColumnType(
"bigint");
650 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long>(
"Id"), 1L, 1);
652 b.Property<
string>(
"Author")
654 .HasColumnType(
"nvarchar(max)");
656 b.Property<
string>(
"BodyAtMerge")
658 .HasColumnType(
"nvarchar(max)");
660 b.Property<
string>(
"Comment")
662 .HasColumnType(
"nvarchar(max)");
664 b.Property<DateTimeOffset>(
"MergedAt")
665 .HasColumnType(
"datetimeoffset");
667 b.Property<
long>(
"MergedById")
668 .HasColumnType(
"bigint");
670 b.Property<
int>(
"Number")
671 .HasColumnType(
"int");
673 b.Property<
long?>(
"PrimaryRevisionInformationId")
675 .HasColumnType(
"bigint");
677 b.Property<
string>(
"TargetCommitSha")
680 .HasColumnType(
"nvarchar(40)");
682 b.Property<
string>(
"TitleAtMerge")
684 .HasColumnType(
"nvarchar(max)");
686 b.Property<
string>(
"Url")
688 .HasColumnType(
"nvarchar(max)");
692 b.HasIndex(
"MergedById");
694 b.HasIndex(
"PrimaryRevisionInformationId")
697 b.ToTable(
"TestMerges");
700 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
702 b.Property<
long?>(
"Id")
703 .ValueGeneratedOnAdd()
704 .HasColumnType(
"bigint");
706 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
708 b.Property<
string>(
"CanonicalName")
711 .HasColumnType(
"nvarchar(100)");
713 b.Property<DateTimeOffset?>(
"CreatedAt")
715 .HasColumnType(
"datetimeoffset");
717 b.Property<
long?>(
"CreatedById")
718 .HasColumnType(
"bigint");
720 b.Property<
bool?>(
"Enabled")
722 .HasColumnType(
"bit");
724 b.Property<
long?>(
"GroupId")
725 .HasColumnType(
"bigint");
727 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
728 .HasColumnType(
"datetimeoffset");
730 b.Property<
string>(
"Name")
733 .HasColumnType(
"nvarchar(100)");
735 b.Property<
string>(
"PasswordHash")
736 .HasColumnType(
"nvarchar(max)");
738 b.Property<
string>(
"SystemIdentifier")
740 .HasColumnType(
"nvarchar(100)");
744 b.HasIndex(
"CanonicalName")
747 b.HasIndex(
"CreatedById");
749 b.HasIndex(
"GroupId");
751 b.HasIndex(
"SystemIdentifier")
753 .HasFilter(
"[SystemIdentifier] IS NOT NULL");
758 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
760 b.Property<
long?>(
"Id")
761 .ValueGeneratedOnAdd()
762 .HasColumnType(
"bigint");
764 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<
long?>(
"Id"), 1L, 1);
766 b.Property<
string>(
"Name")
769 .HasColumnType(
"nvarchar(100)");
779 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
781 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
782 .WithMany(
"ChatSettings")
783 .HasForeignKey(
"InstanceId")
784 .OnDelete(DeleteBehavior.Cascade)
787 b.Navigation(
"Instance");
790 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
792 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
793 .WithMany(
"Channels")
794 .HasForeignKey(
"ChatSettingsId")
795 .OnDelete(DeleteBehavior.Cascade)
798 b.Navigation(
"ChatSettings");
801 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
803 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
805 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
806 .OnDelete(DeleteBehavior.Cascade)
809 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
810 .WithMany(
"CompileJobs")
811 .HasForeignKey(
"RevisionInformationId")
812 .OnDelete(DeleteBehavior.ClientNoAction)
817 b.Navigation(
"RevisionInformation");
820 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
822 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
823 .WithOne(
"DreamDaemonSettings")
824 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
825 .OnDelete(DeleteBehavior.Cascade)
828 b.Navigation(
"Instance");
831 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
833 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
834 .WithOne(
"DreamMakerSettings")
835 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
836 .OnDelete(DeleteBehavior.Cascade)
839 b.Navigation(
"Instance");
842 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
844 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
845 .WithMany(
"InstancePermissionSets")
846 .HasForeignKey(
"InstanceId")
847 .OnDelete(DeleteBehavior.Cascade)
850 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
851 .WithMany(
"InstancePermissionSets")
852 .HasForeignKey(
"PermissionSetId")
853 .OnDelete(DeleteBehavior.Cascade)
856 b.Navigation(
"Instance");
858 b.Navigation(
"PermissionSet");
861 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
863 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
865 .HasForeignKey(
"CancelledById");
867 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
869 .HasForeignKey(
"InstanceId")
870 .OnDelete(DeleteBehavior.Cascade)
873 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
875 .HasForeignKey(
"StartedById")
876 .OnDelete(DeleteBehavior.Cascade)
879 b.Navigation(
"CancelledBy");
881 b.Navigation(
"Instance");
883 b.Navigation(
"StartedBy");
886 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
888 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
889 .WithMany(
"OAuthConnections")
890 .HasForeignKey(
"UserId")
891 .OnDelete(DeleteBehavior.Cascade);
893 b.Navigation(
"User");
896 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
898 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
899 .WithOne(
"PermissionSet")
900 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
901 .OnDelete(DeleteBehavior.Cascade);
903 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
904 .WithOne(
"PermissionSet")
905 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
906 .OnDelete(DeleteBehavior.Cascade);
908 b.Navigation(
"Group");
910 b.Navigation(
"User");
913 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
915 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
917 .HasForeignKey(
"CompileJobId")
918 .OnDelete(DeleteBehavior.Cascade)
921 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"InitialCompileJob")
923 .HasForeignKey(
"InitialCompileJobId");
925 b.Navigation(
"CompileJob");
927 b.Navigation(
"InitialCompileJob");
930 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
932 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
933 .WithOne(
"RepositorySettings")
934 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
935 .OnDelete(DeleteBehavior.Cascade)
938 b.Navigation(
"Instance");
941 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
943 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
944 .WithMany(
"ActiveTestMerges")
945 .HasForeignKey(
"RevisionInformationId")
946 .OnDelete(DeleteBehavior.Cascade)
949 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
950 .WithMany(
"RevisonInformations")
951 .HasForeignKey(
"TestMergeId")
952 .OnDelete(DeleteBehavior.ClientNoAction)
955 b.Navigation(
"RevisionInformation");
957 b.Navigation(
"TestMerge");
960 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
962 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
963 .WithMany(
"RevisionInformations")
964 .HasForeignKey(
"InstanceId")
965 .OnDelete(DeleteBehavior.Cascade)
968 b.Navigation(
"Instance");
971 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
973 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
974 .WithMany(
"TestMerges")
975 .HasForeignKey(
"MergedById")
976 .OnDelete(DeleteBehavior.Restrict)
979 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
980 .WithOne(
"PrimaryTestMerge")
981 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
982 .OnDelete(DeleteBehavior.Cascade)
985 b.Navigation(
"MergedBy");
987 b.Navigation(
"PrimaryRevisionInformation");
990 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
992 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
993 .WithMany(
"CreatedUsers")
994 .HasForeignKey(
"CreatedById");
996 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
998 .HasForeignKey(
"GroupId");
1000 b.Navigation(
"CreatedBy");
1002 b.Navigation(
"Group");
1005 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
1007 b.Navigation(
"Channels");
1010 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
1012 b.Navigation(
"ChatSettings");
1014 b.Navigation(
"DreamDaemonSettings");
1016 b.Navigation(
"DreamMakerSettings");
1018 b.Navigation(
"InstancePermissionSets");
1020 b.Navigation(
"Jobs");
1022 b.Navigation(
"RepositorySettings");
1024 b.Navigation(
"RevisionInformations");
1027 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
1029 b.Navigation(
"InstancePermissionSets");
1032 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
1034 b.Navigation(
"ActiveTestMerges");
1036 b.Navigation(
"CompileJobs");
1038 b.Navigation(
"PrimaryTestMerge");
1041 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
1043 b.Navigation(
"RevisonInformations");
1046 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
1048 b.Navigation(
"CreatedUsers");
1050 b.Navigation(
"OAuthConnections");
1052 b.Navigation(
"PermissionSet");
1054 b.Navigation(
"TestMerges");
1057 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
1059 b.Navigation(
"PermissionSet")
1062 b.Navigation(
"Users");
1064#pragma warning restore 612, 618