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<ushort?>(
"ChannelLimit")
29 b.Property<
string>(
"ConnectionString")
33 b.Property<
bool?>(
"Enabled");
35 b.Property<
long>(
"InstanceId");
37 b.Property<
string>(
"Name")
41 b.Property<
int>(
"Provider");
43 b.Property<uint?>(
"ReconnectionInterval")
48 b.HasIndex(
"InstanceId",
"Name")
51 b.ToTable(
"ChatBots");
54 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
56 b.Property<
long>(
"Id")
57 .ValueGeneratedOnAdd();
59 b.Property<
long>(
"ChatSettingsId");
61 b.Property<ulong?>(
"DiscordChannelId");
63 b.Property<
string>(
"IrcChannel")
66 b.Property<
bool?>(
"IsAdminChannel")
69 b.Property<
bool?>(
"IsUpdatesChannel")
72 b.Property<
bool?>(
"IsWatchdogChannel")
75 b.Property<
string>(
"Tag")
80 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
83 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
86 b.ToTable(
"ChatChannels");
89 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
91 b.Property<
long>(
"Id")
92 .ValueGeneratedOnAdd();
94 b.Property<
string>(
"ByondVersion")
97 b.Property<Guid?>(
"DirectoryName")
100 b.Property<
string>(
"DmeName")
103 b.Property<
long>(
"JobId");
105 b.Property<
int>(
"MinimumSecurityLevel");
107 b.Property<
string>(
"Output")
110 b.Property<
long>(
"RevisionInformationId");
114 b.HasIndex(
"DirectoryName");
119 b.HasIndex(
"RevisionInformationId");
121 b.ToTable(
"CompileJobs");
124 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
126 b.Property<
long>(
"Id")
127 .ValueGeneratedOnAdd();
129 b.Property<
string>(
"AccessToken");
131 b.Property<
bool?>(
"AllowWebClient")
134 b.Property<
bool?>(
"AutoStart")
137 b.Property<
long>(
"InstanceId");
139 b.Property<ushort?>(
"PrimaryPort")
142 b.Property<
int?>(
"ProcessId");
144 b.Property<ushort?>(
"SecondaryPort")
147 b.Property<
int>(
"SecurityLevel");
149 b.Property<
bool?>(
"SoftRestart")
152 b.Property<
bool?>(
"SoftShutdown")
155 b.Property<uint?>(
"StartupTimeout")
160 b.HasIndex(
"InstanceId")
163 b.ToTable(
"DreamDaemonSettings");
166 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
168 b.Property<
long>(
"Id")
169 .ValueGeneratedOnAdd();
171 b.Property<ushort?>(
"ApiValidationPort")
174 b.Property<
int>(
"ApiValidationSecurityLevel");
176 b.Property<
long>(
"InstanceId");
178 b.Property<
string>(
"ProjectName")
179 .HasMaxLength(10000);
183 b.HasIndex(
"InstanceId")
186 b.ToTable(
"DreamMakerSettings");
189 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
191 b.Property<
long>(
"Id")
192 .ValueGeneratedOnAdd();
194 b.Property<uint?>(
"AutoUpdateInterval")
197 b.Property<ushort?>(
"ChatBotLimit")
200 b.Property<
int>(
"ConfigurationType");
202 b.Property<
string>(
"Name")
204 .HasMaxLength(10000);
206 b.Property<
bool?>(
"Online")
209 b.Property<
string>(
"Path")
217 b.ToTable(
"Instances");
220 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
222 b.Property<
long>(
"Id")
223 .ValueGeneratedOnAdd();
225 b.Property<ulong>(
"ByondRights");
227 b.Property<ulong>(
"ChatBotRights");
229 b.Property<ulong>(
"ConfigurationRights");
231 b.Property<ulong>(
"DreamDaemonRights");
233 b.Property<ulong>(
"DreamMakerRights");
235 b.Property<
long>(
"InstanceId");
237 b.Property<ulong>(
"InstanceUserRights");
239 b.Property<ulong>(
"RepositoryRights");
241 b.Property<
long?>(
"UserId")
246 b.HasIndex(
"InstanceId");
248 b.HasIndex(
"UserId",
"InstanceId")
251 b.ToTable(
"InstanceUsers");
254 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
256 b.Property<
long>(
"Id")
257 .ValueGeneratedOnAdd();
259 b.Property<ulong?>(
"CancelRight");
261 b.Property<ulong?>(
"CancelRightsType");
263 b.Property<
bool?>(
"Cancelled")
266 b.Property<
long?>(
"CancelledById");
268 b.Property<
string>(
"Description")
271 b.Property<
string>(
"ExceptionDetails");
273 b.Property<
long>(
"InstanceId");
275 b.Property<DateTimeOffset?>(
"StartedAt")
278 b.Property<
long?>(
"StartedById")
281 b.Property<DateTimeOffset?>(
"StoppedAt");
285 b.HasIndex(
"CancelledById");
287 b.HasIndex(
"InstanceId");
289 b.HasIndex(
"StartedById");
294 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
296 b.Property<
long>(
"Id")
297 .ValueGeneratedOnAdd();
299 b.Property<
string>(
"AccessIdentifier")
302 b.Property<
string>(
"ChatChannelsJson")
305 b.Property<
string>(
"ChatCommandsJson")
308 b.Property<
long>(
"CompileJobId");
310 b.Property<
bool>(
"IsPrimary");
312 b.Property<ushort>(
"Port");
314 b.Property<
int>(
"ProcessId");
316 b.Property<
int>(
"RebootState");
318 b.Property<
string>(
"ServerCommandsJson")
323 b.HasIndex(
"CompileJobId");
325 b.ToTable(
"ReattachInformations");
328 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
330 b.Property<
long>(
"Id")
331 .ValueGeneratedOnAdd();
333 b.Property<
string>(
"AccessToken")
334 .HasMaxLength(10000);
336 b.Property<
string>(
"AccessUser")
337 .HasMaxLength(10000);
339 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
342 b.Property<
bool?>(
"AutoUpdatesSynchronize")
345 b.Property<
string>(
"CommitterEmail")
347 .HasMaxLength(10000);
349 b.Property<
string>(
"CommitterName")
351 .HasMaxLength(10000);
353 b.Property<
long>(
"InstanceId");
355 b.Property<
bool?>(
"PostTestMergeComment")
358 b.Property<
bool?>(
"PushTestMergeCommits")
361 b.Property<
bool?>(
"ShowTestMergeCommitters")
366 b.HasIndex(
"InstanceId")
369 b.ToTable(
"RepositorySettings");
372 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
374 b.Property<
long>(
"Id")
375 .ValueGeneratedOnAdd();
377 b.Property<
long>(
"RevisionInformationId");
379 b.Property<
long>(
"TestMergeId");
383 b.HasIndex(
"RevisionInformationId");
385 b.HasIndex(
"TestMergeId");
387 b.ToTable(
"RevInfoTestMerges");
390 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
392 b.Property<
long>(
"Id")
393 .ValueGeneratedOnAdd();
395 b.Property<
string>(
"CommitSha")
399 b.Property<
long>(
"InstanceId");
401 b.Property<
string>(
"OriginCommitSha")
407 b.HasIndex(
"InstanceId",
"CommitSha")
410 b.ToTable(
"RevisionInformations");
413 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
415 b.Property<
long>(
"Id")
416 .ValueGeneratedOnAdd();
418 b.Property<
string>(
"Author")
421 b.Property<
string>(
"BodyAtMerge")
424 b.Property<
string>(
"Comment")
425 .HasMaxLength(10000);
427 b.Property<DateTimeOffset>(
"MergedAt");
429 b.Property<
long?>(
"MergedById")
432 b.Property<
int>(
"Number");
434 b.Property<
long?>(
"PrimaryRevisionInformationId")
437 b.Property<
string>(
"PullRequestRevision")
441 b.Property<
string>(
"TitleAtMerge")
444 b.Property<
string>(
"Url")
449 b.HasIndex(
"MergedById");
451 b.HasIndex(
"PrimaryRevisionInformationId")
454 b.ToTable(
"TestMerges");
457 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
459 b.Property<
long?>(
"Id")
460 .ValueGeneratedOnAdd();
462 b.Property<ulong>(
"AdministrationRights");
464 b.Property<
string>(
"CanonicalName")
467 b.Property<DateTimeOffset?>(
"CreatedAt")
470 b.Property<
long?>(
"CreatedById");
472 b.Property<
bool?>(
"Enabled")
475 b.Property<ulong>(
"InstanceManagerRights");
477 b.Property<DateTimeOffset?>(
"LastPasswordUpdate");
479 b.Property<
string>(
"Name")
481 .HasMaxLength(10000);
483 b.Property<
string>(
"PasswordHash");
485 b.Property<
string>(
"SystemIdentifier");
489 b.HasIndex(
"CanonicalName")
492 b.HasIndex(
"CreatedById");
494 b.HasIndex(
"SystemIdentifier")
500 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
502 b.Property<
long>(
"Id")
503 .ValueGeneratedOnAdd();
505 b.Property<
long?>(
"AlphaId");
507 b.Property<
bool>(
"AlphaIsActive");
509 b.Property<
long?>(
"BravoId");
511 b.Property<
long>(
"InstanceId");
515 b.HasIndex(
"AlphaId");
517 b.HasIndex(
"BravoId");
519 b.HasIndex(
"InstanceId")
522 b.ToTable(
"WatchdogReattachInformations");
525 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
527 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
528 .WithMany(
"ChatSettings")
529 .HasForeignKey(
"InstanceId")
530 .OnDelete(DeleteBehavior.Cascade);
533 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
535 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
536 .WithMany(
"Channels")
537 .HasForeignKey(
"ChatSettingsId")
538 .OnDelete(DeleteBehavior.Cascade);
541 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
543 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
545 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
546 .OnDelete(DeleteBehavior.Restrict);
548 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
549 .WithMany(
"CompileJobs")
550 .HasForeignKey(
"RevisionInformationId")
551 .OnDelete(DeleteBehavior.Cascade);
554 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
556 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
557 .WithOne(
"DreamDaemonSettings")
558 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
559 .OnDelete(DeleteBehavior.Cascade);
562 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
564 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
565 .WithOne(
"DreamMakerSettings")
566 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
567 .OnDelete(DeleteBehavior.Cascade);
570 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
572 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
573 .WithMany(
"InstanceUsers")
574 .HasForeignKey(
"InstanceId")
575 .OnDelete(DeleteBehavior.Cascade);
577 b.HasOne(
"Tgstation.Server.Host.Models.User")
578 .WithMany(
"InstanceUsers")
579 .HasForeignKey(
"UserId")
580 .OnDelete(DeleteBehavior.Cascade);
583 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
585 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
587 .HasForeignKey(
"CancelledById");
589 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
591 .HasForeignKey(
"InstanceId")
592 .OnDelete(DeleteBehavior.Cascade);
594 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
596 .HasForeignKey(
"StartedById")
597 .OnDelete(DeleteBehavior.Cascade);
600 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
602 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
604 .HasForeignKey(
"CompileJobId")
605 .OnDelete(DeleteBehavior.Cascade);
608 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
610 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
611 .WithOne(
"RepositorySettings")
612 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
613 .OnDelete(DeleteBehavior.Cascade);
616 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
618 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
619 .WithMany(
"ActiveTestMerges")
620 .HasForeignKey(
"RevisionInformationId")
621 .OnDelete(DeleteBehavior.Cascade);
623 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
624 .WithMany(
"RevisonInformations")
625 .HasForeignKey(
"TestMergeId")
626 .OnDelete(DeleteBehavior.Cascade);
629 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
631 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
632 .WithMany(
"RevisionInformations")
633 .HasForeignKey(
"InstanceId")
634 .OnDelete(DeleteBehavior.Cascade);
637 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
639 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
640 .WithMany(
"TestMerges")
641 .HasForeignKey(
"MergedById")
642 .OnDelete(DeleteBehavior.Restrict);
644 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
645 .WithOne(
"PrimaryTestMerge")
646 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
647 .OnDelete(DeleteBehavior.Restrict);
650 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
652 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
653 .WithMany(
"CreatedUsers")
654 .HasForeignKey(
"CreatedById");
657 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
659 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
661 .HasForeignKey(
"AlphaId");
663 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
665 .HasForeignKey(
"BravoId");
667 b.HasOne(
"Tgstation.Server.Host.Models.Instance")
668 .WithOne(
"WatchdogReattachInformation")
669 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
670 .OnDelete(DeleteBehavior.Cascade);
672#pragma warning restore 612, 618