16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"2.1.4-rtm-31024")
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")
92 b.Property<
string>(
"DmeName")
95 b.Property<
long>(
"JobId");
97 b.Property<
int>(
"MinimumSecurityLevel");
99 b.Property<
string>(
"Output")
102 b.Property<
long>(
"RevisionInformationId");
106 b.HasIndex(
"DirectoryName");
111 b.HasIndex(
"RevisionInformationId");
113 b.ToTable(
"CompileJobs");
116 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
118 b.Property<
long>(
"Id")
119 .ValueGeneratedOnAdd();
121 b.Property<
string>(
"AccessToken");
123 b.Property<
bool?>(
"AllowWebClient")
126 b.Property<
bool?>(
"AutoStart")
129 b.Property<
long>(
"InstanceId");
131 b.Property<ushort?>(
"PrimaryPort")
134 b.Property<
int?>(
"ProcessId");
136 b.Property<ushort?>(
"SecondaryPort")
139 b.Property<
int>(
"SecurityLevel");
141 b.Property<
bool?>(
"SoftRestart")
144 b.Property<
bool?>(
"SoftShutdown")
147 b.Property<uint?>(
"StartupTimeout")
152 b.HasIndex(
"InstanceId")
155 b.ToTable(
"DreamDaemonSettings");
158 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
160 b.Property<
long>(
"Id")
161 .ValueGeneratedOnAdd();
163 b.Property<ushort?>(
"ApiValidationPort")
166 b.Property<
int>(
"ApiValidationSecurityLevel");
168 b.Property<
long>(
"InstanceId");
170 b.Property<
string>(
"ProjectName");
174 b.HasIndex(
"InstanceId")
177 b.ToTable(
"DreamMakerSettings");
180 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
182 b.Property<
long>(
"Id")
183 .ValueGeneratedOnAdd();
185 b.Property<uint?>(
"AutoUpdateInterval")
188 b.Property<
int>(
"ConfigurationType");
190 b.Property<
string>(
"Name")
193 b.Property<
bool?>(
"Online")
196 b.Property<
string>(
"Path")
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?>(
"PostTestMergeComment")
340 b.Property<
bool?>(
"PushTestMergeCommits")
343 b.Property<
bool?>(
"ShowTestMergeCommitters")
348 b.HasIndex(
"InstanceId")
351 b.ToTable(
"RepositorySettings");
354 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
356 b.Property<
long>(
"Id")
357 .ValueGeneratedOnAdd();
359 b.Property<
long>(
"RevisionInformationId");
361 b.Property<
long>(
"TestMergeId");
365 b.HasIndex(
"RevisionInformationId");
367 b.HasIndex(
"TestMergeId");
369 b.ToTable(
"RevInfoTestMerges");
372 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
374 b.Property<
long>(
"Id")
375 .ValueGeneratedOnAdd();
377 b.Property<
string>(
"CommitSha")
381 b.Property<
long>(
"InstanceId");
383 b.Property<
string>(
"OriginCommitSha")
389 b.HasIndex(
"CommitSha")
392 b.HasIndex(
"InstanceId");
394 b.ToTable(
"RevisionInformations");
397 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
399 b.Property<
long>(
"Id")
400 .ValueGeneratedOnAdd();
402 b.Property<
string>(
"Author")
405 b.Property<
string>(
"BodyAtMerge")
408 b.Property<
string>(
"Comment");
410 b.Property<DateTimeOffset>(
"MergedAt");
412 b.Property<
long>(
"MergedById");
414 b.Property<
int?>(
"Number")
417 b.Property<
long?>(
"PrimaryRevisionInformationId")
420 b.Property<
string>(
"PullRequestRevision")
423 b.Property<
string>(
"TitleAtMerge")
426 b.Property<
string>(
"Url")
431 b.HasIndex(
"MergedById");
433 b.HasIndex(
"PrimaryRevisionInformationId")
436 b.ToTable(
"TestMerges");
439 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
441 b.Property<
long>(
"Id")
442 .ValueGeneratedOnAdd();
444 b.Property<ulong>(
"AdministrationRights");
446 b.Property<
string>(
"CanonicalName")
449 b.Property<DateTimeOffset?>(
"CreatedAt")
452 b.Property<
long?>(
"CreatedById");
454 b.Property<
bool?>(
"Enabled")
457 b.Property<ulong>(
"InstanceManagerRights");
459 b.Property<DateTimeOffset?>(
"LastPasswordUpdate");
461 b.Property<
string>(
"Name")
464 b.Property<
string>(
"PasswordHash");
466 b.Property<
string>(
"SystemIdentifier");
470 b.HasIndex(
"CanonicalName")
473 b.HasIndex(
"CreatedById");
478 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
480 b.Property<
long>(
"Id")
481 .ValueGeneratedOnAdd();
483 b.Property<
long?>(
"AlphaId");
485 b.Property<
bool>(
"AlphaIsActive");
487 b.Property<
long?>(
"BravoId");
489 b.Property<
long>(
"InstanceId");
493 b.HasIndex(
"AlphaId");
495 b.HasIndex(
"BravoId");
497 b.HasIndex(
"InstanceId")
500 b.ToTable(
"WatchdogReattachInformations");
503 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
505 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
506 .WithMany(
"ChatSettings")
507 .HasForeignKey(
"InstanceId")
508 .OnDelete(DeleteBehavior.Cascade);
511 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
513 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
514 .WithMany(
"Channels")
515 .HasForeignKey(
"ChatSettingsId")
516 .OnDelete(DeleteBehavior.Cascade);
519 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
521 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
523 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
524 .OnDelete(DeleteBehavior.Restrict);
526 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
527 .WithMany(
"CompileJobs")
528 .HasForeignKey(
"RevisionInformationId")
529 .OnDelete(DeleteBehavior.Cascade);
532 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
534 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
535 .WithOne(
"DreamDaemonSettings")
536 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
537 .OnDelete(DeleteBehavior.Cascade);
540 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
542 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
543 .WithOne(
"DreamMakerSettings")
544 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
545 .OnDelete(DeleteBehavior.Cascade);
548 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
550 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
551 .WithMany(
"InstanceUsers")
552 .HasForeignKey(
"InstanceId")
553 .OnDelete(DeleteBehavior.Cascade);
555 b.HasOne(
"Tgstation.Server.Host.Models.User")
556 .WithMany(
"InstanceUsers")
557 .HasForeignKey(
"UserId")
558 .OnDelete(DeleteBehavior.Cascade);
561 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
563 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
565 .HasForeignKey(
"CancelledById");
567 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
569 .HasForeignKey(
"InstanceId")
570 .OnDelete(DeleteBehavior.Cascade);
572 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
574 .HasForeignKey(
"StartedById")
575 .OnDelete(DeleteBehavior.Cascade);
578 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
580 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
582 .HasForeignKey(
"CompileJobId")
583 .OnDelete(DeleteBehavior.Cascade);
586 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
588 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
589 .WithOne(
"RepositorySettings")
590 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
591 .OnDelete(DeleteBehavior.Cascade);
594 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
596 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
597 .WithMany(
"ActiveTestMerges")
598 .HasForeignKey(
"RevisionInformationId")
599 .OnDelete(DeleteBehavior.Cascade);
601 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
602 .WithMany(
"RevisonInformations")
603 .HasForeignKey(
"TestMergeId")
604 .OnDelete(DeleteBehavior.Cascade);
607 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
609 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
610 .WithMany(
"RevisionInformations")
611 .HasForeignKey(
"InstanceId")
612 .OnDelete(DeleteBehavior.Cascade);
615 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
617 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
618 .WithMany(
"TestMerges")
619 .HasForeignKey(
"MergedById")
620 .OnDelete(DeleteBehavior.Restrict);
622 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
623 .WithOne(
"PrimaryTestMerge")
624 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
625 .OnDelete(DeleteBehavior.Restrict);
628 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
630 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
631 .WithMany(
"CreatedUsers")
632 .HasForeignKey(
"CreatedById");
635 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
637 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
639 .HasForeignKey(
"AlphaId");
641 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
643 .HasForeignKey(
"BravoId");
645 b.HasOne(
"Tgstation.Server.Host.Models.Instance")
646 .WithOne(
"WatchdogReattachInformation")
647 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
648 .OnDelete(DeleteBehavior.Cascade);
650#pragma warning restore 612, 618