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")
29 b.Property<
bool?>(
"Enabled");
31 b.Property<
long>(
"InstanceId");
33 b.Property<
string>(
"Name")
36 b.Property<
int?>(
"Provider");
38 b.Property<uint?>(
"ReconnectionInterval")
43 b.HasIndex(
"InstanceId");
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");
62 b.Property<
bool?>(
"IsAdminChannel")
65 b.Property<
bool?>(
"IsUpdatesChannel")
68 b.Property<
bool?>(
"IsWatchdogChannel")
71 b.Property<
string>(
"Tag");
75 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
78 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
81 b.ToTable(
"ChatChannels");
84 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
86 b.Property<
long>(
"Id")
87 .ValueGeneratedOnAdd();
89 b.Property<
string>(
"ByondVersion")
92 b.Property<Guid?>(
"DirectoryName")
95 b.Property<
string>(
"DmeName")
98 b.Property<
long>(
"JobId");
100 b.Property<
int>(
"MinimumSecurityLevel");
102 b.Property<
string>(
"Output")
105 b.Property<
long>(
"RevisionInformationId");
109 b.HasIndex(
"DirectoryName");
114 b.HasIndex(
"RevisionInformationId");
116 b.ToTable(
"CompileJobs");
119 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
121 b.Property<
long>(
"Id")
122 .ValueGeneratedOnAdd();
124 b.Property<
string>(
"AccessToken");
126 b.Property<
bool?>(
"AllowWebClient")
129 b.Property<
bool?>(
"AutoStart")
132 b.Property<
long>(
"InstanceId");
134 b.Property<ushort?>(
"PrimaryPort")
137 b.Property<
int?>(
"ProcessId");
139 b.Property<ushort?>(
"SecondaryPort")
142 b.Property<
int>(
"SecurityLevel");
144 b.Property<
bool?>(
"SoftRestart")
147 b.Property<
bool?>(
"SoftShutdown")
150 b.Property<uint?>(
"StartupTimeout")
155 b.HasIndex(
"InstanceId")
158 b.ToTable(
"DreamDaemonSettings");
161 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
163 b.Property<
long>(
"Id")
164 .ValueGeneratedOnAdd();
166 b.Property<ushort?>(
"ApiValidationPort")
169 b.Property<
int>(
"ApiValidationSecurityLevel");
171 b.Property<
long>(
"InstanceId");
173 b.Property<
string>(
"ProjectName");
177 b.HasIndex(
"InstanceId")
180 b.ToTable(
"DreamMakerSettings");
183 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
185 b.Property<
long>(
"Id")
186 .ValueGeneratedOnAdd();
188 b.Property<uint?>(
"AutoUpdateInterval")
191 b.Property<
int>(
"ConfigurationType");
193 b.Property<
string>(
"Name")
196 b.Property<
bool?>(
"Online")
199 b.Property<
string>(
"Path")
207 b.ToTable(
"Instances");
210 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
212 b.Property<
long>(
"Id")
213 .ValueGeneratedOnAdd();
215 b.Property<ulong>(
"ByondRights");
217 b.Property<ulong>(
"ChatBotRights");
219 b.Property<ulong>(
"ConfigurationRights");
221 b.Property<ulong>(
"DreamDaemonRights");
223 b.Property<ulong>(
"DreamMakerRights");
225 b.Property<
long>(
"InstanceId");
227 b.Property<ulong>(
"InstanceUserRights");
229 b.Property<ulong>(
"RepositoryRights");
231 b.Property<
long?>(
"UserId")
236 b.HasIndex(
"InstanceId");
238 b.HasIndex(
"UserId",
"InstanceId")
241 b.ToTable(
"InstanceUsers");
244 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
246 b.Property<
long>(
"Id")
247 .ValueGeneratedOnAdd();
249 b.Property<ulong?>(
"CancelRight");
251 b.Property<ulong?>(
"CancelRightsType");
253 b.Property<
bool?>(
"Cancelled")
256 b.Property<
long?>(
"CancelledById");
258 b.Property<
string>(
"Description")
261 b.Property<
string>(
"ExceptionDetails");
263 b.Property<
long>(
"InstanceId");
265 b.Property<DateTimeOffset?>(
"StartedAt")
268 b.Property<
long>(
"StartedById");
270 b.Property<DateTimeOffset?>(
"StoppedAt");
274 b.HasIndex(
"CancelledById");
276 b.HasIndex(
"InstanceId");
278 b.HasIndex(
"StartedById");
283 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
285 b.Property<
long>(
"Id")
286 .ValueGeneratedOnAdd();
288 b.Property<
string>(
"AccessIdentifier")
291 b.Property<
string>(
"ChatChannelsJson")
294 b.Property<
string>(
"ChatCommandsJson")
297 b.Property<
long>(
"CompileJobId");
299 b.Property<
bool>(
"IsPrimary");
301 b.Property<ushort>(
"Port");
303 b.Property<
int>(
"ProcessId");
305 b.Property<
int>(
"RebootState");
307 b.Property<
string>(
"ServerCommandsJson")
312 b.HasIndex(
"CompileJobId");
314 b.ToTable(
"ReattachInformations");
317 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
319 b.Property<
long>(
"Id")
320 .ValueGeneratedOnAdd();
322 b.Property<
string>(
"AccessToken");
324 b.Property<
string>(
"AccessUser");
326 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
329 b.Property<
bool?>(
"AutoUpdatesSynchronize")
332 b.Property<
string>(
"CommitterEmail")
335 b.Property<
string>(
"CommitterName")
338 b.Property<
long>(
"InstanceId");
340 b.Property<
bool?>(
"PostTestMergeComment")
343 b.Property<
bool?>(
"PushTestMergeCommits")
346 b.Property<
bool?>(
"ShowTestMergeCommitters")
351 b.HasIndex(
"InstanceId")
354 b.ToTable(
"RepositorySettings");
357 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
359 b.Property<
long>(
"Id")
360 .ValueGeneratedOnAdd();
362 b.Property<
long>(
"RevisionInformationId");
364 b.Property<
long>(
"TestMergeId");
368 b.HasIndex(
"RevisionInformationId");
370 b.HasIndex(
"TestMergeId");
372 b.ToTable(
"RevInfoTestMerges");
375 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
377 b.Property<
long>(
"Id")
378 .ValueGeneratedOnAdd();
380 b.Property<
string>(
"CommitSha")
384 b.Property<
long>(
"InstanceId");
386 b.Property<
string>(
"OriginCommitSha")
392 b.HasIndex(
"InstanceId",
"CommitSha")
395 b.ToTable(
"RevisionInformations");
398 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
400 b.Property<
long>(
"Id")
401 .ValueGeneratedOnAdd();
403 b.Property<
string>(
"Author")
406 b.Property<
string>(
"BodyAtMerge")
409 b.Property<
string>(
"Comment");
411 b.Property<DateTimeOffset>(
"MergedAt");
413 b.Property<
long>(
"MergedById");
415 b.Property<
int?>(
"Number")
418 b.Property<
long?>(
"PrimaryRevisionInformationId")
421 b.Property<
string>(
"PullRequestRevision")
424 b.Property<
string>(
"TitleAtMerge")
427 b.Property<
string>(
"Url")
432 b.HasIndex(
"MergedById");
434 b.HasIndex(
"PrimaryRevisionInformationId")
437 b.ToTable(
"TestMerges");
440 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
442 b.Property<
long>(
"Id")
443 .ValueGeneratedOnAdd();
445 b.Property<ulong>(
"AdministrationRights");
447 b.Property<
string>(
"CanonicalName")
450 b.Property<DateTimeOffset?>(
"CreatedAt")
453 b.Property<
long?>(
"CreatedById");
455 b.Property<
bool?>(
"Enabled")
458 b.Property<ulong>(
"InstanceManagerRights");
460 b.Property<DateTimeOffset?>(
"LastPasswordUpdate");
462 b.Property<
string>(
"Name")
465 b.Property<
string>(
"PasswordHash");
467 b.Property<
string>(
"SystemIdentifier");
471 b.HasIndex(
"CanonicalName")
474 b.HasIndex(
"CreatedById");
479 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
481 b.Property<
long>(
"Id")
482 .ValueGeneratedOnAdd();
484 b.Property<
long?>(
"AlphaId");
486 b.Property<
bool>(
"AlphaIsActive");
488 b.Property<
long?>(
"BravoId");
490 b.Property<
long>(
"InstanceId");
494 b.HasIndex(
"AlphaId");
496 b.HasIndex(
"BravoId");
498 b.HasIndex(
"InstanceId")
501 b.ToTable(
"WatchdogReattachInformations");
504 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
506 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
507 .WithMany(
"ChatSettings")
508 .HasForeignKey(
"InstanceId")
509 .OnDelete(DeleteBehavior.Cascade);
512 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
514 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
515 .WithMany(
"Channels")
516 .HasForeignKey(
"ChatSettingsId")
517 .OnDelete(DeleteBehavior.Cascade);
520 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
522 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
524 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
525 .OnDelete(DeleteBehavior.Restrict);
527 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
528 .WithMany(
"CompileJobs")
529 .HasForeignKey(
"RevisionInformationId")
530 .OnDelete(DeleteBehavior.Cascade);
533 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
535 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
536 .WithOne(
"DreamDaemonSettings")
537 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
538 .OnDelete(DeleteBehavior.Cascade);
541 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
543 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
544 .WithOne(
"DreamMakerSettings")
545 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
546 .OnDelete(DeleteBehavior.Cascade);
549 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
551 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
552 .WithMany(
"InstanceUsers")
553 .HasForeignKey(
"InstanceId")
554 .OnDelete(DeleteBehavior.Cascade);
556 b.HasOne(
"Tgstation.Server.Host.Models.User")
557 .WithMany(
"InstanceUsers")
558 .HasForeignKey(
"UserId")
559 .OnDelete(DeleteBehavior.Cascade);
562 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
564 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
566 .HasForeignKey(
"CancelledById");
568 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
570 .HasForeignKey(
"InstanceId")
571 .OnDelete(DeleteBehavior.Cascade);
573 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
575 .HasForeignKey(
"StartedById")
576 .OnDelete(DeleteBehavior.Cascade);
579 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
581 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
583 .HasForeignKey(
"CompileJobId")
584 .OnDelete(DeleteBehavior.Cascade);
587 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
589 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
590 .WithOne(
"RepositorySettings")
591 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
592 .OnDelete(DeleteBehavior.Cascade);
595 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
597 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
598 .WithMany(
"ActiveTestMerges")
599 .HasForeignKey(
"RevisionInformationId")
600 .OnDelete(DeleteBehavior.Cascade);
602 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
603 .WithMany(
"RevisonInformations")
604 .HasForeignKey(
"TestMergeId")
605 .OnDelete(DeleteBehavior.Cascade);
608 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
610 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
611 .WithMany(
"RevisionInformations")
612 .HasForeignKey(
"InstanceId")
613 .OnDelete(DeleteBehavior.Cascade);
616 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
618 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
619 .WithMany(
"TestMerges")
620 .HasForeignKey(
"MergedById")
621 .OnDelete(DeleteBehavior.Restrict);
623 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
624 .WithOne(
"PrimaryTestMerge")
625 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
626 .OnDelete(DeleteBehavior.Restrict);
629 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
631 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
632 .WithMany(
"CreatedUsers")
633 .HasForeignKey(
"CreatedById");
636 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
638 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
640 .HasForeignKey(
"AlphaId");
642 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
644 .HasForeignKey(
"BravoId");
646 b.HasOne(
"Tgstation.Server.Host.Models.Instance")
647 .WithOne(
"WatchdogReattachInformation")
648 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
649 .OnDelete(DeleteBehavior.Cascade);
651#pragma warning restore 612, 618