16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.3");
20 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
22 b.Property<
long>(
"Id")
23 .ValueGeneratedOnAdd()
24 .HasColumnType(
"INTEGER");
26 b.Property<ushort?>(
"ChannelLimit")
28 .HasColumnType(
"INTEGER");
30 b.Property<
string>(
"ConnectionString")
32 .HasColumnType(
"TEXT")
35 b.Property<
bool?>(
"Enabled")
36 .HasColumnType(
"INTEGER");
38 b.Property<
long>(
"InstanceId")
39 .HasColumnType(
"INTEGER");
41 b.Property<
string>(
"Name")
43 .HasColumnType(
"TEXT")
46 b.Property<
int>(
"Provider")
47 .HasColumnType(
"INTEGER");
49 b.Property<uint?>(
"ReconnectionInterval")
51 .HasColumnType(
"INTEGER");
55 b.HasIndex(
"InstanceId",
"Name")
58 b.ToTable(
"ChatBots");
61 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
63 b.Property<
long>(
"Id")
64 .ValueGeneratedOnAdd()
65 .HasColumnType(
"INTEGER");
67 b.Property<
long>(
"ChatSettingsId")
68 .HasColumnType(
"INTEGER");
70 b.Property<ulong?>(
"DiscordChannelId")
71 .HasColumnType(
"INTEGER");
73 b.Property<
string>(
"IrcChannel")
74 .HasColumnType(
"TEXT")
77 b.Property<
bool?>(
"IsAdminChannel")
79 .HasColumnType(
"INTEGER");
81 b.Property<
bool?>(
"IsUpdatesChannel")
83 .HasColumnType(
"INTEGER");
85 b.Property<
bool?>(
"IsWatchdogChannel")
87 .HasColumnType(
"INTEGER");
89 b.Property<
string>(
"Tag")
90 .HasColumnType(
"TEXT")
95 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
98 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
101 b.ToTable(
"ChatChannels");
104 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
106 b.Property<
long>(
"Id")
107 .ValueGeneratedOnAdd()
108 .HasColumnType(
"INTEGER");
110 b.Property<
string>(
"ByondVersion")
112 .HasColumnType(
"TEXT");
114 b.Property<
int?>(
"DMApiMajorVersion")
115 .HasColumnType(
"INTEGER");
117 b.Property<
int?>(
"DMApiMinorVersion")
118 .HasColumnType(
"INTEGER");
120 b.Property<
int?>(
"DMApiPatchVersion")
121 .HasColumnType(
"INTEGER");
123 b.Property<Guid?>(
"DirectoryName")
125 .HasColumnType(
"TEXT");
127 b.Property<
string>(
"DmeName")
129 .HasColumnType(
"TEXT");
131 b.Property<
long>(
"JobId")
132 .HasColumnType(
"INTEGER");
134 b.Property<
int>(
"MinimumSecurityLevel")
135 .HasColumnType(
"INTEGER");
137 b.Property<
string>(
"Output")
139 .HasColumnType(
"TEXT");
141 b.Property<
long>(
"RevisionInformationId")
142 .HasColumnType(
"INTEGER");
146 b.HasIndex(
"DirectoryName");
151 b.HasIndex(
"RevisionInformationId");
153 b.ToTable(
"CompileJobs");
156 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
158 b.Property<
long>(
"Id")
159 .ValueGeneratedOnAdd()
160 .HasColumnType(
"INTEGER");
162 b.Property<
string>(
"AccessToken")
163 .HasColumnType(
"TEXT");
165 b.Property<
bool?>(
"AllowWebClient")
167 .HasColumnType(
"INTEGER");
169 b.Property<
bool?>(
"AutoStart")
171 .HasColumnType(
"INTEGER");
173 b.Property<uint?>(
"HeartbeatSeconds")
175 .HasColumnType(
"INTEGER");
177 b.Property<
long>(
"InstanceId")
178 .HasColumnType(
"INTEGER");
180 b.Property<ushort?>(
"PrimaryPort")
182 .HasColumnType(
"INTEGER");
184 b.Property<
int?>(
"ProcessId")
185 .HasColumnType(
"INTEGER");
187 b.Property<ushort?>(
"SecondaryPort")
189 .HasColumnType(
"INTEGER");
191 b.Property<
int>(
"SecurityLevel")
192 .HasColumnType(
"INTEGER");
194 b.Property<
bool?>(
"SoftRestart")
196 .HasColumnType(
"INTEGER");
198 b.Property<
bool?>(
"SoftShutdown")
200 .HasColumnType(
"INTEGER");
202 b.Property<uint?>(
"StartupTimeout")
204 .HasColumnType(
"INTEGER");
208 b.HasIndex(
"InstanceId")
211 b.ToTable(
"DreamDaemonSettings");
214 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
216 b.Property<
long>(
"Id")
217 .ValueGeneratedOnAdd()
218 .HasColumnType(
"INTEGER");
220 b.Property<ushort?>(
"ApiValidationPort")
222 .HasColumnType(
"INTEGER");
224 b.Property<
int>(
"ApiValidationSecurityLevel")
225 .HasColumnType(
"INTEGER");
227 b.Property<
long>(
"InstanceId")
228 .HasColumnType(
"INTEGER");
230 b.Property<
string>(
"ProjectName")
231 .HasColumnType(
"TEXT")
232 .HasMaxLength(10000);
236 b.HasIndex(
"InstanceId")
239 b.ToTable(
"DreamMakerSettings");
242 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
244 b.Property<
long>(
"Id")
245 .ValueGeneratedOnAdd()
246 .HasColumnType(
"INTEGER");
248 b.Property<uint?>(
"AutoUpdateInterval")
250 .HasColumnType(
"INTEGER");
252 b.Property<ushort?>(
"ChatBotLimit")
254 .HasColumnType(
"INTEGER");
256 b.Property<
int>(
"ConfigurationType")
257 .HasColumnType(
"INTEGER");
259 b.Property<
string>(
"Name")
261 .HasColumnType(
"TEXT")
262 .HasMaxLength(10000);
264 b.Property<
bool?>(
"Online")
266 .HasColumnType(
"INTEGER");
268 b.Property<
string>(
"Path")
270 .HasColumnType(
"TEXT");
277 b.ToTable(
"Instances");
280 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
282 b.Property<
long>(
"Id")
283 .ValueGeneratedOnAdd()
284 .HasColumnType(
"INTEGER");
286 b.Property<ulong>(
"ByondRights")
287 .HasColumnType(
"INTEGER");
289 b.Property<ulong>(
"ChatBotRights")
290 .HasColumnType(
"INTEGER");
292 b.Property<ulong>(
"ConfigurationRights")
293 .HasColumnType(
"INTEGER");
295 b.Property<ulong>(
"DreamDaemonRights")
296 .HasColumnType(
"INTEGER");
298 b.Property<ulong>(
"DreamMakerRights")
299 .HasColumnType(
"INTEGER");
301 b.Property<
long>(
"InstanceId")
302 .HasColumnType(
"INTEGER");
304 b.Property<ulong>(
"InstanceUserRights")
305 .HasColumnType(
"INTEGER");
307 b.Property<ulong>(
"RepositoryRights")
308 .HasColumnType(
"INTEGER");
310 b.Property<
long?>(
"UserId")
312 .HasColumnType(
"INTEGER");
316 b.HasIndex(
"InstanceId");
318 b.HasIndex(
"UserId",
"InstanceId")
321 b.ToTable(
"InstanceUsers");
324 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
326 b.Property<
long>(
"Id")
327 .ValueGeneratedOnAdd()
328 .HasColumnType(
"INTEGER");
330 b.Property<ulong?>(
"CancelRight")
331 .HasColumnType(
"INTEGER");
333 b.Property<ulong?>(
"CancelRightsType")
334 .HasColumnType(
"INTEGER");
336 b.Property<
bool?>(
"Cancelled")
338 .HasColumnType(
"INTEGER");
340 b.Property<
long?>(
"CancelledById")
341 .HasColumnType(
"INTEGER");
343 b.Property<
string>(
"Description")
345 .HasColumnType(
"TEXT");
347 b.Property<uint?>(
"ErrorCode")
348 .HasColumnType(
"INTEGER");
350 b.Property<
string>(
"ExceptionDetails")
351 .HasColumnType(
"TEXT");
353 b.Property<
long>(
"InstanceId")
354 .HasColumnType(
"INTEGER");
356 b.Property<DateTimeOffset?>(
"StartedAt")
358 .HasColumnType(
"TEXT");
360 b.Property<
long>(
"StartedById")
361 .HasColumnType(
"INTEGER");
363 b.Property<DateTimeOffset?>(
"StoppedAt")
364 .HasColumnType(
"TEXT");
368 b.HasIndex(
"CancelledById");
370 b.HasIndex(
"InstanceId");
372 b.HasIndex(
"StartedById");
377 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
379 b.Property<
long>(
"Id")
380 .ValueGeneratedOnAdd()
381 .HasColumnType(
"INTEGER");
383 b.Property<
string>(
"AccessIdentifier")
385 .HasColumnType(
"TEXT");
387 b.Property<
long>(
"CompileJobId")
388 .HasColumnType(
"INTEGER");
390 b.Property<
bool>(
"IsPrimary")
391 .HasColumnType(
"INTEGER");
393 b.Property<
int>(
"LaunchSecurityLevel")
394 .HasColumnType(
"INTEGER");
396 b.Property<ushort>(
"Port")
397 .HasColumnType(
"INTEGER");
399 b.Property<
int>(
"ProcessId")
400 .HasColumnType(
"INTEGER");
402 b.Property<
int>(
"RebootState")
403 .HasColumnType(
"INTEGER");
407 b.HasIndex(
"CompileJobId");
409 b.ToTable(
"ReattachInformations");
412 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
414 b.Property<
long>(
"Id")
415 .ValueGeneratedOnAdd()
416 .HasColumnType(
"INTEGER");
418 b.Property<
string>(
"AccessToken")
419 .HasColumnType(
"TEXT")
420 .HasMaxLength(10000);
422 b.Property<
string>(
"AccessUser")
423 .HasColumnType(
"TEXT")
424 .HasMaxLength(10000);
426 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
428 .HasColumnType(
"INTEGER");
430 b.Property<
bool?>(
"AutoUpdatesSynchronize")
432 .HasColumnType(
"INTEGER");
434 b.Property<
string>(
"CommitterEmail")
436 .HasColumnType(
"TEXT")
437 .HasMaxLength(10000);
439 b.Property<
string>(
"CommitterName")
441 .HasColumnType(
"TEXT")
442 .HasMaxLength(10000);
444 b.Property<
long>(
"InstanceId")
445 .HasColumnType(
"INTEGER");
447 b.Property<
bool?>(
"PostTestMergeComment")
449 .HasColumnType(
"INTEGER");
451 b.Property<
bool?>(
"PushTestMergeCommits")
453 .HasColumnType(
"INTEGER");
455 b.Property<
bool?>(
"ShowTestMergeCommitters")
457 .HasColumnType(
"INTEGER");
461 b.HasIndex(
"InstanceId")
464 b.ToTable(
"RepositorySettings");
467 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
469 b.Property<
long>(
"Id")
470 .ValueGeneratedOnAdd()
471 .HasColumnType(
"INTEGER");
473 b.Property<
long>(
"RevisionInformationId")
474 .HasColumnType(
"INTEGER");
476 b.Property<
long>(
"TestMergeId")
477 .HasColumnType(
"INTEGER");
481 b.HasIndex(
"RevisionInformationId");
483 b.HasIndex(
"TestMergeId");
485 b.ToTable(
"RevInfoTestMerges");
488 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
490 b.Property<
long>(
"Id")
491 .ValueGeneratedOnAdd()
492 .HasColumnType(
"INTEGER");
494 b.Property<
string>(
"CommitSha")
496 .HasColumnType(
"TEXT")
499 b.Property<
long>(
"InstanceId")
500 .HasColumnType(
"INTEGER");
502 b.Property<
string>(
"OriginCommitSha")
504 .HasColumnType(
"TEXT")
509 b.HasIndex(
"InstanceId",
"CommitSha")
512 b.ToTable(
"RevisionInformations");
515 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
517 b.Property<
long>(
"Id")
518 .ValueGeneratedOnAdd()
519 .HasColumnType(
"INTEGER");
521 b.Property<
string>(
"Author")
523 .HasColumnType(
"TEXT");
525 b.Property<
string>(
"BodyAtMerge")
527 .HasColumnType(
"TEXT");
529 b.Property<
string>(
"Comment")
530 .HasColumnType(
"TEXT")
531 .HasMaxLength(10000);
533 b.Property<DateTimeOffset>(
"MergedAt")
534 .HasColumnType(
"TEXT");
536 b.Property<
long>(
"MergedById")
537 .HasColumnType(
"INTEGER");
539 b.Property<
int>(
"Number")
540 .HasColumnType(
"INTEGER");
542 b.Property<
long?>(
"PrimaryRevisionInformationId")
544 .HasColumnType(
"INTEGER");
546 b.Property<
string>(
"PullRequestRevision")
548 .HasColumnType(
"TEXT")
551 b.Property<
string>(
"TitleAtMerge")
553 .HasColumnType(
"TEXT");
555 b.Property<
string>(
"Url")
557 .HasColumnType(
"TEXT");
561 b.HasIndex(
"MergedById");
563 b.HasIndex(
"PrimaryRevisionInformationId")
566 b.ToTable(
"TestMerges");
569 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
571 b.Property<
long?>(
"Id")
572 .ValueGeneratedOnAdd()
573 .HasColumnType(
"INTEGER");
575 b.Property<ulong>(
"AdministrationRights")
576 .HasColumnType(
"INTEGER");
578 b.Property<
string>(
"CanonicalName")
580 .HasColumnType(
"TEXT");
582 b.Property<DateTimeOffset?>(
"CreatedAt")
584 .HasColumnType(
"TEXT");
586 b.Property<
long?>(
"CreatedById")
587 .HasColumnType(
"INTEGER");
589 b.Property<
bool?>(
"Enabled")
591 .HasColumnType(
"INTEGER");
593 b.Property<ulong>(
"InstanceManagerRights")
594 .HasColumnType(
"INTEGER");
596 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
597 .HasColumnType(
"TEXT");
599 b.Property<
string>(
"Name")
601 .HasColumnType(
"TEXT")
602 .HasMaxLength(10000);
604 b.Property<
string>(
"PasswordHash")
605 .HasColumnType(
"TEXT");
607 b.Property<
string>(
"SystemIdentifier")
608 .HasColumnType(
"TEXT");
612 b.HasIndex(
"CanonicalName")
615 b.HasIndex(
"CreatedById");
617 b.HasIndex(
"SystemIdentifier")
623 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
625 b.Property<
long>(
"Id")
626 .ValueGeneratedOnAdd()
627 .HasColumnType(
"INTEGER");
629 b.Property<
long?>(
"AlphaId")
630 .HasColumnType(
"INTEGER");
632 b.Property<
bool>(
"AlphaIsActive")
633 .HasColumnType(
"INTEGER");
635 b.Property<
long?>(
"BravoId")
636 .HasColumnType(
"INTEGER");
638 b.Property<
long>(
"InstanceId")
639 .HasColumnType(
"INTEGER");
643 b.HasIndex(
"AlphaId");
645 b.HasIndex(
"BravoId");
647 b.HasIndex(
"InstanceId")
650 b.ToTable(
"WatchdogReattachInformations");
653 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
655 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
656 .WithMany(
"ChatSettings")
657 .HasForeignKey(
"InstanceId")
658 .OnDelete(DeleteBehavior.Cascade)
662 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
664 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
665 .WithMany(
"Channels")
666 .HasForeignKey(
"ChatSettingsId")
667 .OnDelete(DeleteBehavior.Cascade)
671 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
673 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
675 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
676 .OnDelete(DeleteBehavior.Cascade)
679 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
680 .WithMany(
"CompileJobs")
681 .HasForeignKey(
"RevisionInformationId")
682 .OnDelete(DeleteBehavior.ClientNoAction)
686 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
688 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
689 .WithOne(
"DreamDaemonSettings")
690 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
691 .OnDelete(DeleteBehavior.Cascade)
695 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
697 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
698 .WithOne(
"DreamMakerSettings")
699 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
700 .OnDelete(DeleteBehavior.Cascade)
704 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
706 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
707 .WithMany(
"InstanceUsers")
708 .HasForeignKey(
"InstanceId")
709 .OnDelete(DeleteBehavior.Cascade)
712 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
713 .WithMany(
"InstanceUsers")
714 .HasForeignKey(
"UserId")
715 .OnDelete(DeleteBehavior.Cascade)
719 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
721 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
723 .HasForeignKey(
"CancelledById");
725 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
727 .HasForeignKey(
"InstanceId")
728 .OnDelete(DeleteBehavior.Cascade)
731 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
733 .HasForeignKey(
"StartedById")
734 .OnDelete(DeleteBehavior.Cascade)
738 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
740 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
742 .HasForeignKey(
"CompileJobId")
743 .OnDelete(DeleteBehavior.Cascade)
747 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
749 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
750 .WithOne(
"RepositorySettings")
751 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
752 .OnDelete(DeleteBehavior.Cascade)
756 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
758 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
759 .WithMany(
"ActiveTestMerges")
760 .HasForeignKey(
"RevisionInformationId")
761 .OnDelete(DeleteBehavior.Cascade)
764 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
765 .WithMany(
"RevisonInformations")
766 .HasForeignKey(
"TestMergeId")
767 .OnDelete(DeleteBehavior.ClientNoAction)
771 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
773 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
774 .WithMany(
"RevisionInformations")
775 .HasForeignKey(
"InstanceId")
776 .OnDelete(DeleteBehavior.Cascade)
780 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
782 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
783 .WithMany(
"TestMerges")
784 .HasForeignKey(
"MergedById")
785 .OnDelete(DeleteBehavior.Restrict)
788 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
789 .WithOne(
"PrimaryTestMerge")
790 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
791 .OnDelete(DeleteBehavior.Cascade)
795 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
797 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
798 .WithMany(
"CreatedUsers")
799 .HasForeignKey(
"CreatedById");
802 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
804 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
806 .HasForeignKey(
"AlphaId");
808 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
810 .HasForeignKey(
"BravoId");
812 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
813 .WithOne(
"WatchdogReattachInformation")
814 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
815 .OnDelete(DeleteBehavior.Cascade)
818#pragma warning restore 612, 618