16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"2.1.2-rtm-30932")
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");
40 b.HasIndex(
"InstanceId");
45 b.ToTable(
"ChatBots");
48 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
50 b.Property<
long>(
"Id")
51 .ValueGeneratedOnAdd();
53 b.Property<
long>(
"ChatSettingsId");
55 b.Property<ulong?>(
"DiscordChannelId");
57 b.Property<
string>(
"IrcChannel");
59 b.Property<
bool?>(
"IsAdminChannel")
62 b.Property<
bool?>(
"IsUpdatesChannel")
65 b.Property<
bool?>(
"IsWatchdogChannel")
68 b.Property<
string>(
"Tag");
72 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
75 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
78 b.ToTable(
"ChatChannels");
81 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
83 b.Property<
long>(
"Id")
84 .ValueGeneratedOnAdd();
86 b.Property<
string>(
"ByondVersion")
89 b.Property<Guid?>(
"DirectoryName");
91 b.Property<
string>(
"DmeName");
93 b.Property<
long?>(
"JobId");
95 b.Property<
string>(
"Output");
97 b.Property<
long>(
"RevisionInformationId");
101 b.HasIndex(
"DirectoryName");
105 b.HasIndex(
"RevisionInformationId");
107 b.ToTable(
"CompileJobs");
110 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
112 b.Property<
long>(
"Id")
113 .ValueGeneratedOnAdd();
115 b.Property<
string>(
"AccessToken");
117 b.Property<
bool?>(
"AllowWebClient")
120 b.Property<
bool?>(
"AutoStart")
123 b.Property<
long>(
"InstanceId");
125 b.Property<ushort?>(
"PrimaryPort")
128 b.Property<
int?>(
"ProcessId");
130 b.Property<ushort?>(
"SecondaryPort")
133 b.Property<
int>(
"SecurityLevel");
135 b.Property<
bool?>(
"SoftRestart")
138 b.Property<
bool?>(
"SoftShutdown")
141 b.Property<uint?>(
"StartupTimeout")
146 b.HasIndex(
"InstanceId")
149 b.ToTable(
"DreamDaemonSettings");
152 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
154 b.Property<
long>(
"Id")
155 .ValueGeneratedOnAdd();
157 b.Property<ushort?>(
"ApiValidationPort")
160 b.Property<
long>(
"InstanceId");
162 b.Property<
string>(
"ProjectName");
166 b.HasIndex(
"InstanceId")
169 b.ToTable(
"DreamMakerSettings");
172 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
174 b.Property<
long>(
"Id")
175 .ValueGeneratedOnAdd();
177 b.Property<uint?>(
"AutoUpdateInterval")
180 b.Property<
int>(
"ConfigurationType");
182 b.Property<
string>(
"Name")
185 b.Property<
bool?>(
"Online")
188 b.Property<
string>(
"Path")
191 b.Property<
long?>(
"WatchdogReattachInformationId");
198 b.HasIndex(
"WatchdogReattachInformationId");
200 b.ToTable(
"Instances");
203 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
205 b.Property<
long>(
"Id")
206 .ValueGeneratedOnAdd();
208 b.Property<ulong>(
"ByondRights");
210 b.Property<ulong>(
"ChatBotRights");
212 b.Property<ulong>(
"ConfigurationRights");
214 b.Property<ulong>(
"DreamDaemonRights");
216 b.Property<ulong>(
"DreamMakerRights");
218 b.Property<
long>(
"InstanceId");
220 b.Property<ulong>(
"InstanceUserRights");
222 b.Property<ulong>(
"RepositoryRights");
224 b.Property<
long?>(
"UserId")
229 b.HasIndex(
"InstanceId");
231 b.HasIndex(
"UserId",
"InstanceId")
234 b.ToTable(
"InstanceUsers");
237 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
239 b.Property<
long>(
"Id")
240 .ValueGeneratedOnAdd();
242 b.Property<ulong?>(
"CancelRight");
244 b.Property<ulong?>(
"CancelRightsType");
246 b.Property<
bool?>(
"Cancelled")
249 b.Property<
long?>(
"CancelledById");
251 b.Property<
string>(
"Description")
254 b.Property<
string>(
"ExceptionDetails");
256 b.Property<
long>(
"InstanceId");
258 b.Property<DateTimeOffset?>(
"StartedAt")
261 b.Property<
long>(
"StartedById");
263 b.Property<DateTimeOffset?>(
"StoppedAt");
267 b.HasIndex(
"CancelledById");
269 b.HasIndex(
"InstanceId");
271 b.HasIndex(
"StartedById");
276 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
278 b.Property<
long>(
"Id")
279 .ValueGeneratedOnAdd();
281 b.Property<
string>(
"AccessIdentifier")
284 b.Property<
string>(
"ChatChannelsJson")
287 b.Property<
string>(
"ChatCommandsJson")
290 b.Property<
long?>(
"CompileJobId");
292 b.Property<
bool>(
"IsPrimary");
294 b.Property<ushort>(
"Port");
296 b.Property<
int>(
"ProcessId");
298 b.Property<
int>(
"RebootState");
300 b.Property<
string>(
"ServerCommandsJson")
305 b.HasIndex(
"CompileJobId");
307 b.ToTable(
"ReattachInformations");
310 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
312 b.Property<
long>(
"Id")
313 .ValueGeneratedOnAdd();
315 b.Property<
string>(
"AccessToken");
317 b.Property<
string>(
"AccessUser");
319 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
322 b.Property<
bool?>(
"AutoUpdatesSynchronize")
325 b.Property<
string>(
"CommitterEmail")
328 b.Property<
string>(
"CommitterName")
331 b.Property<
long>(
"InstanceId");
333 b.Property<
bool?>(
"PushTestMergeCommits")
336 b.Property<
bool?>(
"ShowTestMergeCommitters")
341 b.HasIndex(
"InstanceId")
344 b.ToTable(
"RepositorySettings");
347 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
349 b.Property<
long>(
"Id")
350 .ValueGeneratedOnAdd();
352 b.Property<
long>(
"RevisionInformationId");
354 b.Property<
long>(
"TestMergeId");
358 b.HasIndex(
"RevisionInformationId");
360 b.HasIndex(
"TestMergeId");
362 b.ToTable(
"RevInfoTestMerges");
365 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
367 b.Property<
long>(
"Id")
368 .ValueGeneratedOnAdd();
370 b.Property<
string>(
"CommitSha")
374 b.Property<
long>(
"InstanceId");
376 b.Property<
string>(
"OriginCommitSha")
382 b.HasIndex(
"CommitSha")
385 b.HasIndex(
"InstanceId");
387 b.ToTable(
"RevisionInformations");
390 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
392 b.Property<
long>(
"Id")
393 .ValueGeneratedOnAdd();
395 b.Property<
string>(
"Author")
398 b.Property<
string>(
"BodyAtMerge")
401 b.Property<
string>(
"Comment");
403 b.Property<DateTimeOffset>(
"MergedAt");
405 b.Property<
long>(
"MergedById");
407 b.Property<
int?>(
"Number")
410 b.Property<
long?>(
"PrimaryRevisionInformationId");
412 b.Property<
string>(
"PullRequestRevision")
415 b.Property<
string>(
"TitleAtMerge")
418 b.Property<
string>(
"Url")
423 b.HasIndex(
"MergedById");
425 b.HasIndex(
"PrimaryRevisionInformationId")
428 b.ToTable(
"TestMerges");
431 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
433 b.Property<
long>(
"Id")
434 .ValueGeneratedOnAdd();
436 b.Property<ulong>(
"AdministrationRights");
438 b.Property<
string>(
"CanonicalName")
441 b.Property<DateTimeOffset?>(
"CreatedAt")
444 b.Property<
long?>(
"CreatedById");
446 b.Property<
bool?>(
"Enabled")
449 b.Property<ulong>(
"InstanceManagerRights");
451 b.Property<DateTimeOffset?>(
"LastPasswordUpdate");
453 b.Property<
string>(
"Name")
456 b.Property<
string>(
"PasswordHash");
458 b.Property<
string>(
"SystemIdentifier");
462 b.HasIndex(
"CanonicalName")
465 b.HasIndex(
"CreatedById");
470 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
472 b.Property<
long>(
"Id")
473 .ValueGeneratedOnAdd();
475 b.Property<
long?>(
"AlphaId");
477 b.Property<
bool>(
"AlphaIsActive");
479 b.Property<
long?>(
"BravoId");
483 b.HasIndex(
"AlphaId");
485 b.HasIndex(
"BravoId");
487 b.ToTable(
"WatchdogReattachInformations");
490 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
492 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
493 .WithMany(
"ChatSettings")
494 .HasForeignKey(
"InstanceId")
495 .OnDelete(DeleteBehavior.Cascade);
498 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
500 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
501 .WithMany(
"Channels")
502 .HasForeignKey(
"ChatSettingsId")
503 .OnDelete(DeleteBehavior.Cascade);
506 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
508 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
510 .HasForeignKey(
"JobId");
512 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
513 .WithMany(
"CompileJobs")
514 .HasForeignKey(
"RevisionInformationId")
515 .OnDelete(DeleteBehavior.Cascade);
518 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
520 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
521 .WithOne(
"DreamDaemonSettings")
522 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
523 .OnDelete(DeleteBehavior.Cascade);
526 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
528 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
529 .WithOne(
"DreamMakerSettings")
530 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
531 .OnDelete(DeleteBehavior.Cascade);
534 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
536 b.HasOne(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"WatchdogReattachInformation")
538 .HasForeignKey(
"WatchdogReattachInformationId");
541 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
543 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
544 .WithMany(
"InstanceUsers")
545 .HasForeignKey(
"InstanceId")
546 .OnDelete(DeleteBehavior.Cascade);
548 b.HasOne(
"Tgstation.Server.Host.Models.User")
549 .WithMany(
"InstanceUsers")
550 .HasForeignKey(
"UserId")
551 .OnDelete(DeleteBehavior.Cascade);
554 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
556 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
558 .HasForeignKey(
"CancelledById");
560 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
562 .HasForeignKey(
"InstanceId")
563 .OnDelete(DeleteBehavior.Cascade);
565 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
567 .HasForeignKey(
"StartedById")
568 .OnDelete(DeleteBehavior.Cascade);
571 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
573 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
575 .HasForeignKey(
"CompileJobId");
578 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
580 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
581 .WithOne(
"RepositorySettings")
582 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
583 .OnDelete(DeleteBehavior.Cascade);
586 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
588 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
589 .WithMany(
"ActiveTestMerges")
590 .HasForeignKey(
"RevisionInformationId")
591 .OnDelete(DeleteBehavior.Cascade);
593 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
594 .WithMany(
"RevisonInformations")
595 .HasForeignKey(
"TestMergeId")
596 .OnDelete(DeleteBehavior.Cascade);
599 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
601 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
602 .WithMany(
"RevisionInformations")
603 .HasForeignKey(
"InstanceId")
604 .OnDelete(DeleteBehavior.Cascade);
607 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
609 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
610 .WithMany(
"TestMerges")
611 .HasForeignKey(
"MergedById")
612 .OnDelete(DeleteBehavior.Restrict);
614 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
615 .WithOne(
"PrimaryTestMerge")
616 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
617 .OnDelete(DeleteBehavior.SetNull);
620 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
622 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
623 .WithMany(
"CreatedUsers")
624 .HasForeignKey(
"CreatedById");
627 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
629 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
631 .HasForeignKey(
"AlphaId");
633 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
635 .HasForeignKey(
"BravoId");
637#pragma warning restore 612, 618