16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"2.2.6-servicing-10079")
19 .HasAnnotation(
"Relational:MaxIdentifierLength", 64);
21 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
23 b.Property<
long>(
"Id")
24 .ValueGeneratedOnAdd();
26 b.Property<
string>(
"ConnectionString")
30 b.Property<
bool?>(
"Enabled");
32 b.Property<
long>(
"InstanceId");
34 b.Property<
string>(
"Name")
38 b.Property<
int>(
"Provider");
40 b.Property<uint?>(
"ReconnectionInterval")
45 b.HasIndex(
"InstanceId",
"Name")
48 b.ToTable(
"ChatBots");
51 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
53 b.Property<
long>(
"Id")
54 .ValueGeneratedOnAdd();
56 b.Property<
long>(
"ChatSettingsId");
58 b.Property<ulong?>(
"DiscordChannelId");
60 b.Property<
string>(
"IrcChannel")
63 b.Property<
bool?>(
"IsAdminChannel")
66 b.Property<
bool?>(
"IsUpdatesChannel")
69 b.Property<
bool?>(
"IsWatchdogChannel")
72 b.Property<
string>(
"Tag")
77 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
80 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
83 b.ToTable(
"ChatChannels");
86 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
88 b.Property<
long>(
"Id")
89 .ValueGeneratedOnAdd();
91 b.Property<
string>(
"ByondVersion")
94 b.Property<Guid?>(
"DirectoryName")
97 b.Property<
string>(
"DmeName")
100 b.Property<
long>(
"JobId");
102 b.Property<
int>(
"MinimumSecurityLevel");
104 b.Property<
string>(
"Output")
107 b.Property<
long>(
"RevisionInformationId");
111 b.HasIndex(
"DirectoryName");
116 b.HasIndex(
"RevisionInformationId");
118 b.ToTable(
"CompileJobs");
121 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
123 b.Property<
long>(
"Id")
124 .ValueGeneratedOnAdd();
126 b.Property<
string>(
"AccessToken");
128 b.Property<
bool?>(
"AllowWebClient")
131 b.Property<
bool?>(
"AutoStart")
134 b.Property<
long>(
"InstanceId");
136 b.Property<ushort?>(
"PrimaryPort")
139 b.Property<
int?>(
"ProcessId");
141 b.Property<ushort?>(
"SecondaryPort")
144 b.Property<
int>(
"SecurityLevel");
146 b.Property<
bool?>(
"SoftRestart")
149 b.Property<
bool?>(
"SoftShutdown")
152 b.Property<uint?>(
"StartupTimeout")
157 b.HasIndex(
"InstanceId")
160 b.ToTable(
"DreamDaemonSettings");
163 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
165 b.Property<
long>(
"Id")
166 .ValueGeneratedOnAdd();
168 b.Property<ushort?>(
"ApiValidationPort")
171 b.Property<
int>(
"ApiValidationSecurityLevel");
173 b.Property<
long>(
"InstanceId");
175 b.Property<
string>(
"ProjectName")
176 .HasMaxLength(10000);
180 b.HasIndex(
"InstanceId")
183 b.ToTable(
"DreamMakerSettings");
186 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
188 b.Property<
long>(
"Id")
189 .ValueGeneratedOnAdd();
191 b.Property<uint?>(
"AutoUpdateInterval")
194 b.Property<
int>(
"ConfigurationType");
196 b.Property<
string>(
"Name")
198 .HasMaxLength(10000);
200 b.Property<
bool?>(
"Online")
203 b.Property<
string>(
"Path")
211 b.ToTable(
"Instances");
214 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
216 b.Property<
long>(
"Id")
217 .ValueGeneratedOnAdd();
219 b.Property<ulong>(
"ByondRights");
221 b.Property<ulong>(
"ChatBotRights");
223 b.Property<ulong>(
"ConfigurationRights");
225 b.Property<ulong>(
"DreamDaemonRights");
227 b.Property<ulong>(
"DreamMakerRights");
229 b.Property<
long>(
"InstanceId");
231 b.Property<ulong>(
"InstanceUserRights");
233 b.Property<ulong>(
"RepositoryRights");
235 b.Property<
long?>(
"UserId")
240 b.HasIndex(
"InstanceId");
242 b.HasIndex(
"UserId",
"InstanceId")
245 b.ToTable(
"InstanceUsers");
248 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
250 b.Property<
long>(
"Id")
251 .ValueGeneratedOnAdd();
253 b.Property<ulong?>(
"CancelRight");
255 b.Property<ulong?>(
"CancelRightsType");
257 b.Property<
bool?>(
"Cancelled")
260 b.Property<
long?>(
"CancelledById");
262 b.Property<
string>(
"Description")
265 b.Property<
string>(
"ExceptionDetails");
267 b.Property<
long>(
"InstanceId");
269 b.Property<DateTimeOffset?>(
"StartedAt")
272 b.Property<
long>(
"StartedById");
274 b.Property<DateTimeOffset?>(
"StoppedAt");
278 b.HasIndex(
"CancelledById");
280 b.HasIndex(
"InstanceId");
282 b.HasIndex(
"StartedById");
287 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
289 b.Property<
long>(
"Id")
290 .ValueGeneratedOnAdd();
292 b.Property<
string>(
"AccessIdentifier")
295 b.Property<
string>(
"ChatChannelsJson")
298 b.Property<
string>(
"ChatCommandsJson")
301 b.Property<
long>(
"CompileJobId");
303 b.Property<
bool>(
"IsPrimary");
305 b.Property<ushort>(
"Port");
307 b.Property<
int>(
"ProcessId");
309 b.Property<
int>(
"RebootState");
311 b.Property<
string>(
"ServerCommandsJson")
316 b.HasIndex(
"CompileJobId");
318 b.ToTable(
"ReattachInformations");
321 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
323 b.Property<
long>(
"Id")
324 .ValueGeneratedOnAdd();
326 b.Property<
string>(
"AccessToken")
327 .HasMaxLength(10000);
329 b.Property<
string>(
"AccessUser")
330 .HasMaxLength(10000);
332 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
335 b.Property<
bool?>(
"AutoUpdatesSynchronize")
338 b.Property<
string>(
"CommitterEmail")
340 .HasMaxLength(10000);
342 b.Property<
string>(
"CommitterName")
344 .HasMaxLength(10000);
346 b.Property<
long>(
"InstanceId");
348 b.Property<
bool?>(
"PostTestMergeComment")
351 b.Property<
bool?>(
"PushTestMergeCommits")
354 b.Property<
bool?>(
"ShowTestMergeCommitters")
359 b.HasIndex(
"InstanceId")
362 b.ToTable(
"RepositorySettings");
365 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
367 b.Property<
long>(
"Id")
368 .ValueGeneratedOnAdd();
370 b.Property<
long>(
"RevisionInformationId");
372 b.Property<
long>(
"TestMergeId");
376 b.HasIndex(
"RevisionInformationId");
378 b.HasIndex(
"TestMergeId");
380 b.ToTable(
"RevInfoTestMerges");
383 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
385 b.Property<
long>(
"Id")
386 .ValueGeneratedOnAdd();
388 b.Property<
string>(
"CommitSha")
392 b.Property<
long>(
"InstanceId");
394 b.Property<
string>(
"OriginCommitSha")
400 b.HasIndex(
"InstanceId",
"CommitSha")
403 b.ToTable(
"RevisionInformations");
406 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
408 b.Property<
long>(
"Id")
409 .ValueGeneratedOnAdd();
411 b.Property<
string>(
"Author")
414 b.Property<
string>(
"BodyAtMerge")
417 b.Property<
string>(
"Comment")
418 .HasMaxLength(10000);
420 b.Property<DateTimeOffset>(
"MergedAt");
422 b.Property<
long>(
"MergedById");
424 b.Property<
int?>(
"Number")
427 b.Property<
long?>(
"PrimaryRevisionInformationId")
430 b.Property<
string>(
"PullRequestRevision")
434 b.Property<
string>(
"TitleAtMerge")
437 b.Property<
string>(
"Url")
442 b.HasIndex(
"MergedById");
444 b.HasIndex(
"PrimaryRevisionInformationId")
447 b.ToTable(
"TestMerges");
450 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
452 b.Property<
long>(
"Id")
453 .ValueGeneratedOnAdd();
455 b.Property<ulong>(
"AdministrationRights");
457 b.Property<
string>(
"CanonicalName")
460 b.Property<DateTimeOffset?>(
"CreatedAt")
463 b.Property<
long?>(
"CreatedById");
465 b.Property<
bool?>(
"Enabled")
468 b.Property<ulong>(
"InstanceManagerRights");
470 b.Property<DateTimeOffset?>(
"LastPasswordUpdate");
472 b.Property<
string>(
"Name")
474 .HasMaxLength(10000);
476 b.Property<
string>(
"PasswordHash");
478 b.Property<
string>(
"SystemIdentifier");
482 b.HasIndex(
"CanonicalName")
485 b.HasIndex(
"CreatedById");
487 b.HasIndex(
"SystemIdentifier")
493 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
495 b.Property<
long>(
"Id")
496 .ValueGeneratedOnAdd();
498 b.Property<
long?>(
"AlphaId");
500 b.Property<
bool>(
"AlphaIsActive");
502 b.Property<
long?>(
"BravoId");
504 b.Property<
long>(
"InstanceId");
508 b.HasIndex(
"AlphaId");
510 b.HasIndex(
"BravoId");
512 b.HasIndex(
"InstanceId")
515 b.ToTable(
"WatchdogReattachInformations");
518 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
520 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
521 .WithMany(
"ChatSettings")
522 .HasForeignKey(
"InstanceId")
523 .OnDelete(DeleteBehavior.Cascade);
526 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
528 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
529 .WithMany(
"Channels")
530 .HasForeignKey(
"ChatSettingsId")
531 .OnDelete(DeleteBehavior.Cascade);
534 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
536 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
538 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
539 .OnDelete(DeleteBehavior.Restrict);
541 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
542 .WithMany(
"CompileJobs")
543 .HasForeignKey(
"RevisionInformationId")
544 .OnDelete(DeleteBehavior.Cascade);
547 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
549 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
550 .WithOne(
"DreamDaemonSettings")
551 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
552 .OnDelete(DeleteBehavior.Cascade);
555 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
557 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
558 .WithOne(
"DreamMakerSettings")
559 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
560 .OnDelete(DeleteBehavior.Cascade);
563 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
565 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
566 .WithMany(
"InstanceUsers")
567 .HasForeignKey(
"InstanceId")
568 .OnDelete(DeleteBehavior.Cascade);
570 b.HasOne(
"Tgstation.Server.Host.Models.User")
571 .WithMany(
"InstanceUsers")
572 .HasForeignKey(
"UserId")
573 .OnDelete(DeleteBehavior.Cascade);
576 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
578 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
580 .HasForeignKey(
"CancelledById");
582 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
584 .HasForeignKey(
"InstanceId")
585 .OnDelete(DeleteBehavior.Cascade);
587 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
589 .HasForeignKey(
"StartedById")
590 .OnDelete(DeleteBehavior.Cascade);
593 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
595 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
597 .HasForeignKey(
"CompileJobId")
598 .OnDelete(DeleteBehavior.Cascade);
601 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
603 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
604 .WithOne(
"RepositorySettings")
605 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
606 .OnDelete(DeleteBehavior.Cascade);
609 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
611 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
612 .WithMany(
"ActiveTestMerges")
613 .HasForeignKey(
"RevisionInformationId")
614 .OnDelete(DeleteBehavior.Cascade);
616 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
617 .WithMany(
"RevisonInformations")
618 .HasForeignKey(
"TestMergeId")
619 .OnDelete(DeleteBehavior.Cascade);
622 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
624 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
625 .WithMany(
"RevisionInformations")
626 .HasForeignKey(
"InstanceId")
627 .OnDelete(DeleteBehavior.Cascade);
630 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
632 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
633 .WithMany(
"TestMerges")
634 .HasForeignKey(
"MergedById")
635 .OnDelete(DeleteBehavior.Restrict);
637 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
638 .WithOne(
"PrimaryTestMerge")
639 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
640 .OnDelete(DeleteBehavior.Restrict);
643 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
645 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
646 .WithMany(
"CreatedUsers")
647 .HasForeignKey(
"CreatedById");
650 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
652 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
654 .HasForeignKey(
"AlphaId");
656 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
658 .HasForeignKey(
"BravoId");
660 b.HasOne(
"Tgstation.Server.Host.Models.Instance")
661 .WithOne(
"WatchdogReattachInformation")
662 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
663 .OnDelete(DeleteBehavior.Cascade);
665#pragma warning restore 612, 618