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")
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?>(
"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")
417 b.Property<
string>(
"PullRequestRevision")
420 b.Property<
string>(
"TitleAtMerge")
423 b.Property<
string>(
"Url")
428 b.HasIndex(
"MergedById");
430 b.HasIndex(
"PrimaryRevisionInformationId")
433 b.ToTable(
"TestMerges");
436 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
438 b.Property<
long>(
"Id")
439 .ValueGeneratedOnAdd();
441 b.Property<ulong>(
"AdministrationRights");
443 b.Property<
string>(
"CanonicalName")
446 b.Property<DateTimeOffset?>(
"CreatedAt")
449 b.Property<
long?>(
"CreatedById");
451 b.Property<
bool?>(
"Enabled")
454 b.Property<ulong>(
"InstanceManagerRights");
456 b.Property<DateTimeOffset?>(
"LastPasswordUpdate");
458 b.Property<
string>(
"Name")
461 b.Property<
string>(
"PasswordHash");
463 b.Property<
string>(
"SystemIdentifier");
467 b.HasIndex(
"CanonicalName")
470 b.HasIndex(
"CreatedById");
475 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
477 b.Property<
long>(
"Id")
478 .ValueGeneratedOnAdd();
480 b.Property<
long?>(
"AlphaId");
482 b.Property<
bool>(
"AlphaIsActive");
484 b.Property<
long?>(
"BravoId");
486 b.Property<
long>(
"InstanceId");
490 b.HasIndex(
"AlphaId");
492 b.HasIndex(
"BravoId");
494 b.HasIndex(
"InstanceId")
497 b.ToTable(
"WatchdogReattachInformations");
500 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
502 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
503 .WithMany(
"ChatSettings")
504 .HasForeignKey(
"InstanceId")
505 .OnDelete(DeleteBehavior.Cascade);
508 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
510 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
511 .WithMany(
"Channels")
512 .HasForeignKey(
"ChatSettingsId")
513 .OnDelete(DeleteBehavior.Cascade);
516 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
518 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
520 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
521 .OnDelete(DeleteBehavior.Restrict);
523 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
524 .WithMany(
"CompileJobs")
525 .HasForeignKey(
"RevisionInformationId")
526 .OnDelete(DeleteBehavior.Cascade);
529 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
531 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
532 .WithOne(
"DreamDaemonSettings")
533 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
534 .OnDelete(DeleteBehavior.Cascade);
537 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
539 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
540 .WithOne(
"DreamMakerSettings")
541 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
542 .OnDelete(DeleteBehavior.Cascade);
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.Restrict);
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 b.HasOne(
"Tgstation.Server.Host.Models.Instance")
642 .WithOne(
"WatchdogReattachInformation")
643 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
644 .OnDelete(DeleteBehavior.Cascade);
646#pragma warning restore 612, 618