16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"2.1.3-rtm-32065")
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<
int>(
"MinimumSecurityLevel");
97 b.Property<
string>(
"Output");
99 b.Property<
long>(
"RevisionInformationId");
103 b.HasIndex(
"DirectoryName");
107 b.HasIndex(
"RevisionInformationId");
109 b.ToTable(
"CompileJobs");
112 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
114 b.Property<
long>(
"Id")
115 .ValueGeneratedOnAdd();
117 b.Property<
string>(
"AccessToken");
119 b.Property<
bool?>(
"AllowWebClient")
122 b.Property<
bool?>(
"AutoStart")
125 b.Property<
long>(
"InstanceId");
127 b.Property<ushort?>(
"PrimaryPort")
130 b.Property<
int?>(
"ProcessId");
132 b.Property<ushort?>(
"SecondaryPort")
135 b.Property<
int>(
"SecurityLevel");
137 b.Property<
bool?>(
"SoftRestart")
140 b.Property<
bool?>(
"SoftShutdown")
143 b.Property<uint?>(
"StartupTimeout")
148 b.HasIndex(
"InstanceId")
151 b.ToTable(
"DreamDaemonSettings");
154 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
156 b.Property<
long>(
"Id")
157 .ValueGeneratedOnAdd();
159 b.Property<ushort?>(
"ApiValidationPort")
162 b.Property<
int>(
"ApiValidationSecurityLevel");
164 b.Property<
long>(
"InstanceId");
166 b.Property<
string>(
"ProjectName");
170 b.HasIndex(
"InstanceId")
173 b.ToTable(
"DreamMakerSettings");
176 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
178 b.Property<
long>(
"Id")
179 .ValueGeneratedOnAdd();
181 b.Property<uint?>(
"AutoUpdateInterval")
184 b.Property<
int>(
"ConfigurationType");
186 b.Property<
string>(
"Name")
189 b.Property<
bool?>(
"Online")
192 b.Property<
string>(
"Path")
195 b.Property<
long?>(
"WatchdogReattachInformationId");
202 b.HasIndex(
"WatchdogReattachInformationId");
204 b.ToTable(
"Instances");
207 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
209 b.Property<
long>(
"Id")
210 .ValueGeneratedOnAdd();
212 b.Property<ulong>(
"ByondRights");
214 b.Property<ulong>(
"ChatBotRights");
216 b.Property<ulong>(
"ConfigurationRights");
218 b.Property<ulong>(
"DreamDaemonRights");
220 b.Property<ulong>(
"DreamMakerRights");
222 b.Property<
long>(
"InstanceId");
224 b.Property<ulong>(
"InstanceUserRights");
226 b.Property<ulong>(
"RepositoryRights");
228 b.Property<
long?>(
"UserId")
233 b.HasIndex(
"InstanceId");
235 b.HasIndex(
"UserId",
"InstanceId")
238 b.ToTable(
"InstanceUsers");
241 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
243 b.Property<
long>(
"Id")
244 .ValueGeneratedOnAdd();
246 b.Property<ulong?>(
"CancelRight");
248 b.Property<ulong?>(
"CancelRightsType");
250 b.Property<
bool?>(
"Cancelled")
253 b.Property<
long?>(
"CancelledById");
255 b.Property<
string>(
"Description")
258 b.Property<
string>(
"ExceptionDetails");
260 b.Property<
long>(
"InstanceId");
262 b.Property<DateTimeOffset?>(
"StartedAt")
265 b.Property<
long>(
"StartedById");
267 b.Property<DateTimeOffset?>(
"StoppedAt");
271 b.HasIndex(
"CancelledById");
273 b.HasIndex(
"InstanceId");
275 b.HasIndex(
"StartedById");
280 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
282 b.Property<
long>(
"Id")
283 .ValueGeneratedOnAdd();
285 b.Property<
string>(
"AccessIdentifier")
288 b.Property<
string>(
"ChatChannelsJson")
291 b.Property<
string>(
"ChatCommandsJson")
294 b.Property<
long?>(
"CompileJobId");
296 b.Property<
bool>(
"IsPrimary");
298 b.Property<ushort>(
"Port");
300 b.Property<
int>(
"ProcessId");
302 b.Property<
int>(
"RebootState");
304 b.Property<
string>(
"ServerCommandsJson")
309 b.HasIndex(
"CompileJobId");
311 b.ToTable(
"ReattachInformations");
314 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
316 b.Property<
long>(
"Id")
317 .ValueGeneratedOnAdd();
319 b.Property<
string>(
"AccessToken");
321 b.Property<
string>(
"AccessUser");
323 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
326 b.Property<
bool?>(
"AutoUpdatesSynchronize")
329 b.Property<
string>(
"CommitterEmail")
332 b.Property<
string>(
"CommitterName")
335 b.Property<
long>(
"InstanceId");
337 b.Property<
bool?>(
"PushTestMergeCommits")
340 b.Property<
bool?>(
"ShowTestMergeCommitters")
345 b.HasIndex(
"InstanceId")
348 b.ToTable(
"RepositorySettings");
351 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
353 b.Property<
long>(
"Id")
354 .ValueGeneratedOnAdd();
356 b.Property<
long>(
"RevisionInformationId");
358 b.Property<
long>(
"TestMergeId");
362 b.HasIndex(
"RevisionInformationId");
364 b.HasIndex(
"TestMergeId");
366 b.ToTable(
"RevInfoTestMerges");
369 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
371 b.Property<
long>(
"Id")
372 .ValueGeneratedOnAdd();
374 b.Property<
string>(
"CommitSha")
378 b.Property<
long>(
"InstanceId");
380 b.Property<
string>(
"OriginCommitSha")
386 b.HasIndex(
"CommitSha")
389 b.HasIndex(
"InstanceId");
391 b.ToTable(
"RevisionInformations");
394 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
396 b.Property<
long>(
"Id")
397 .ValueGeneratedOnAdd();
399 b.Property<
string>(
"Author")
402 b.Property<
string>(
"BodyAtMerge")
405 b.Property<
string>(
"Comment");
407 b.Property<DateTimeOffset>(
"MergedAt");
409 b.Property<
long>(
"MergedById");
411 b.Property<
int?>(
"Number")
414 b.Property<
long?>(
"PrimaryRevisionInformationId");
416 b.Property<
string>(
"PullRequestRevision")
419 b.Property<
string>(
"TitleAtMerge")
422 b.Property<
string>(
"Url")
427 b.HasIndex(
"MergedById");
429 b.HasIndex(
"PrimaryRevisionInformationId")
432 b.ToTable(
"TestMerges");
435 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
437 b.Property<
long>(
"Id")
438 .ValueGeneratedOnAdd();
440 b.Property<ulong>(
"AdministrationRights");
442 b.Property<
string>(
"CanonicalName")
445 b.Property<DateTimeOffset?>(
"CreatedAt")
448 b.Property<
long?>(
"CreatedById");
450 b.Property<
bool?>(
"Enabled")
453 b.Property<ulong>(
"InstanceManagerRights");
455 b.Property<DateTimeOffset?>(
"LastPasswordUpdate");
457 b.Property<
string>(
"Name")
460 b.Property<
string>(
"PasswordHash");
462 b.Property<
string>(
"SystemIdentifier");
466 b.HasIndex(
"CanonicalName")
469 b.HasIndex(
"CreatedById");
474 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
476 b.Property<
long>(
"Id")
477 .ValueGeneratedOnAdd();
479 b.Property<
long?>(
"AlphaId");
481 b.Property<
bool>(
"AlphaIsActive");
483 b.Property<
long?>(
"BravoId");
487 b.HasIndex(
"AlphaId");
489 b.HasIndex(
"BravoId");
491 b.ToTable(
"WatchdogReattachInformations");
494 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
496 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
497 .WithMany(
"ChatSettings")
498 .HasForeignKey(
"InstanceId")
499 .OnDelete(DeleteBehavior.Cascade);
502 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
504 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
505 .WithMany(
"Channels")
506 .HasForeignKey(
"ChatSettingsId")
507 .OnDelete(DeleteBehavior.Cascade);
510 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
512 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
514 .HasForeignKey(
"JobId");
516 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
517 .WithMany(
"CompileJobs")
518 .HasForeignKey(
"RevisionInformationId")
519 .OnDelete(DeleteBehavior.Cascade);
522 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
524 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
525 .WithOne(
"DreamDaemonSettings")
526 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
527 .OnDelete(DeleteBehavior.Cascade);
530 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
532 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
533 .WithOne(
"DreamMakerSettings")
534 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
535 .OnDelete(DeleteBehavior.Cascade);
538 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
540 b.HasOne(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"WatchdogReattachInformation")
542 .HasForeignKey(
"WatchdogReattachInformationId");
545 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
547 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
548 .WithMany(
"InstanceUsers")
549 .HasForeignKey(
"InstanceId")
550 .OnDelete(DeleteBehavior.Cascade);
552 b.HasOne(
"Tgstation.Server.Host.Models.User")
553 .WithMany(
"InstanceUsers")
554 .HasForeignKey(
"UserId")
555 .OnDelete(DeleteBehavior.Cascade);
558 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
560 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
562 .HasForeignKey(
"CancelledById");
564 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
566 .HasForeignKey(
"InstanceId")
567 .OnDelete(DeleteBehavior.Cascade);
569 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
571 .HasForeignKey(
"StartedById")
572 .OnDelete(DeleteBehavior.Cascade);
575 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
577 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
579 .HasForeignKey(
"CompileJobId");
582 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
584 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
585 .WithOne(
"RepositorySettings")
586 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
587 .OnDelete(DeleteBehavior.Cascade);
590 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
592 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
593 .WithMany(
"ActiveTestMerges")
594 .HasForeignKey(
"RevisionInformationId")
595 .OnDelete(DeleteBehavior.Cascade);
597 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
598 .WithMany(
"RevisonInformations")
599 .HasForeignKey(
"TestMergeId")
600 .OnDelete(DeleteBehavior.Cascade);
603 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
605 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
606 .WithMany(
"RevisionInformations")
607 .HasForeignKey(
"InstanceId")
608 .OnDelete(DeleteBehavior.Cascade);
611 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
613 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
614 .WithMany(
"TestMerges")
615 .HasForeignKey(
"MergedById")
616 .OnDelete(DeleteBehavior.Restrict);
618 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
619 .WithOne(
"PrimaryTestMerge")
620 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
621 .OnDelete(DeleteBehavior.SetNull);
624 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
626 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
627 .WithMany(
"CreatedUsers")
628 .HasForeignKey(
"CreatedById");
631 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
633 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
635 .HasForeignKey(
"AlphaId");
637 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
639 .HasForeignKey(
"BravoId");
641#pragma warning restore 612, 618