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")
580 .OnDelete(DeleteBehavior.Cascade);
583 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
585 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
586 .WithOne(
"RepositorySettings")
587 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
588 .OnDelete(DeleteBehavior.Cascade);
591 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
593 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
594 .WithMany(
"ActiveTestMerges")
595 .HasForeignKey(
"RevisionInformationId")
596 .OnDelete(DeleteBehavior.Cascade);
598 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
599 .WithMany(
"RevisonInformations")
600 .HasForeignKey(
"TestMergeId")
601 .OnDelete(DeleteBehavior.Cascade);
604 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
606 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
607 .WithMany(
"RevisionInformations")
608 .HasForeignKey(
"InstanceId")
609 .OnDelete(DeleteBehavior.Cascade);
612 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
614 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
615 .WithMany(
"TestMerges")
616 .HasForeignKey(
"MergedById")
617 .OnDelete(DeleteBehavior.Restrict);
619 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
620 .WithOne(
"PrimaryTestMerge")
621 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
622 .OnDelete(DeleteBehavior.Restrict);
625 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
627 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
628 .WithMany(
"CreatedUsers")
629 .HasForeignKey(
"CreatedById");
632 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
634 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
636 .HasForeignKey(
"AlphaId");
638 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
640 .HasForeignKey(
"BravoId");
642 b.HasOne(
"Tgstation.Server.Host.Models.Instance")
643 .WithOne(
"WatchdogReattachInformation")
644 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
645 .OnDelete(DeleteBehavior.Cascade);
647#pragma warning restore 612, 618