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<
long>(
"InstanceId")
174 .HasColumnType(
"INTEGER");
176 b.Property<ushort?>(
"PrimaryPort")
178 .HasColumnType(
"INTEGER");
180 b.Property<
int?>(
"ProcessId")
181 .HasColumnType(
"INTEGER");
183 b.Property<ushort?>(
"SecondaryPort")
185 .HasColumnType(
"INTEGER");
187 b.Property<
int>(
"SecurityLevel")
188 .HasColumnType(
"INTEGER");
190 b.Property<
bool?>(
"SoftRestart")
192 .HasColumnType(
"INTEGER");
194 b.Property<
bool?>(
"SoftShutdown")
196 .HasColumnType(
"INTEGER");
198 b.Property<uint?>(
"StartupTimeout")
200 .HasColumnType(
"INTEGER");
204 b.HasIndex(
"InstanceId")
207 b.ToTable(
"DreamDaemonSettings");
210 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
212 b.Property<
long>(
"Id")
213 .ValueGeneratedOnAdd()
214 .HasColumnType(
"INTEGER");
216 b.Property<ushort?>(
"ApiValidationPort")
218 .HasColumnType(
"INTEGER");
220 b.Property<
int>(
"ApiValidationSecurityLevel")
221 .HasColumnType(
"INTEGER");
223 b.Property<
long>(
"InstanceId")
224 .HasColumnType(
"INTEGER");
226 b.Property<
string>(
"ProjectName")
227 .HasColumnType(
"TEXT")
228 .HasMaxLength(10000);
232 b.HasIndex(
"InstanceId")
235 b.ToTable(
"DreamMakerSettings");
238 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
240 b.Property<
long>(
"Id")
241 .ValueGeneratedOnAdd()
242 .HasColumnType(
"INTEGER");
244 b.Property<uint?>(
"AutoUpdateInterval")
246 .HasColumnType(
"INTEGER");
248 b.Property<ushort?>(
"ChatBotLimit")
250 .HasColumnType(
"INTEGER");
252 b.Property<
int>(
"ConfigurationType")
253 .HasColumnType(
"INTEGER");
255 b.Property<
string>(
"Name")
257 .HasColumnType(
"TEXT")
258 .HasMaxLength(10000);
260 b.Property<
bool?>(
"Online")
262 .HasColumnType(
"INTEGER");
264 b.Property<
string>(
"Path")
266 .HasColumnType(
"TEXT");
273 b.ToTable(
"Instances");
276 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
278 b.Property<
long>(
"Id")
279 .ValueGeneratedOnAdd()
280 .HasColumnType(
"INTEGER");
282 b.Property<ulong>(
"ByondRights")
283 .HasColumnType(
"INTEGER");
285 b.Property<ulong>(
"ChatBotRights")
286 .HasColumnType(
"INTEGER");
288 b.Property<ulong>(
"ConfigurationRights")
289 .HasColumnType(
"INTEGER");
291 b.Property<ulong>(
"DreamDaemonRights")
292 .HasColumnType(
"INTEGER");
294 b.Property<ulong>(
"DreamMakerRights")
295 .HasColumnType(
"INTEGER");
297 b.Property<
long>(
"InstanceId")
298 .HasColumnType(
"INTEGER");
300 b.Property<ulong>(
"InstanceUserRights")
301 .HasColumnType(
"INTEGER");
303 b.Property<ulong>(
"RepositoryRights")
304 .HasColumnType(
"INTEGER");
306 b.Property<
long?>(
"UserId")
308 .HasColumnType(
"INTEGER");
312 b.HasIndex(
"InstanceId");
314 b.HasIndex(
"UserId",
"InstanceId")
317 b.ToTable(
"InstanceUsers");
320 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
322 b.Property<
long>(
"Id")
323 .ValueGeneratedOnAdd()
324 .HasColumnType(
"INTEGER");
326 b.Property<ulong?>(
"CancelRight")
327 .HasColumnType(
"INTEGER");
329 b.Property<ulong?>(
"CancelRightsType")
330 .HasColumnType(
"INTEGER");
332 b.Property<
bool?>(
"Cancelled")
334 .HasColumnType(
"INTEGER");
336 b.Property<
long?>(
"CancelledById")
337 .HasColumnType(
"INTEGER");
339 b.Property<
string>(
"Description")
341 .HasColumnType(
"TEXT");
343 b.Property<uint?>(
"ErrorCode")
344 .HasColumnType(
"INTEGER");
346 b.Property<
string>(
"ExceptionDetails")
347 .HasColumnType(
"TEXT");
349 b.Property<
long>(
"InstanceId")
350 .HasColumnType(
"INTEGER");
352 b.Property<DateTimeOffset?>(
"StartedAt")
354 .HasColumnType(
"TEXT");
356 b.Property<
long>(
"StartedById")
357 .HasColumnType(
"INTEGER");
359 b.Property<DateTimeOffset?>(
"StoppedAt")
360 .HasColumnType(
"TEXT");
364 b.HasIndex(
"CancelledById");
366 b.HasIndex(
"InstanceId");
368 b.HasIndex(
"StartedById");
373 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
375 b.Property<
long>(
"Id")
376 .ValueGeneratedOnAdd()
377 .HasColumnType(
"INTEGER");
379 b.Property<
string>(
"AccessIdentifier")
381 .HasColumnType(
"TEXT");
383 b.Property<
long>(
"CompileJobId")
384 .HasColumnType(
"INTEGER");
386 b.Property<
bool>(
"IsPrimary")
387 .HasColumnType(
"INTEGER");
389 b.Property<
int>(
"LaunchSecurityLevel")
390 .HasColumnType(
"INTEGER");
392 b.Property<ushort>(
"Port")
393 .HasColumnType(
"INTEGER");
395 b.Property<
int>(
"ProcessId")
396 .HasColumnType(
"INTEGER");
398 b.Property<
int>(
"RebootState")
399 .HasColumnType(
"INTEGER");
403 b.HasIndex(
"CompileJobId");
405 b.ToTable(
"ReattachInformations");
408 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
410 b.Property<
long>(
"Id")
411 .ValueGeneratedOnAdd()
412 .HasColumnType(
"INTEGER");
414 b.Property<
string>(
"AccessToken")
415 .HasColumnType(
"TEXT")
416 .HasMaxLength(10000);
418 b.Property<
string>(
"AccessUser")
419 .HasColumnType(
"TEXT")
420 .HasMaxLength(10000);
422 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
424 .HasColumnType(
"INTEGER");
426 b.Property<
bool?>(
"AutoUpdatesSynchronize")
428 .HasColumnType(
"INTEGER");
430 b.Property<
string>(
"CommitterEmail")
432 .HasColumnType(
"TEXT")
433 .HasMaxLength(10000);
435 b.Property<
string>(
"CommitterName")
437 .HasColumnType(
"TEXT")
438 .HasMaxLength(10000);
440 b.Property<
long>(
"InstanceId")
441 .HasColumnType(
"INTEGER");
443 b.Property<
bool?>(
"PostTestMergeComment")
445 .HasColumnType(
"INTEGER");
447 b.Property<
bool?>(
"PushTestMergeCommits")
449 .HasColumnType(
"INTEGER");
451 b.Property<
bool?>(
"ShowTestMergeCommitters")
453 .HasColumnType(
"INTEGER");
457 b.HasIndex(
"InstanceId")
460 b.ToTable(
"RepositorySettings");
463 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
465 b.Property<
long>(
"Id")
466 .ValueGeneratedOnAdd()
467 .HasColumnType(
"INTEGER");
469 b.Property<
long>(
"RevisionInformationId")
470 .HasColumnType(
"INTEGER");
472 b.Property<
long>(
"TestMergeId")
473 .HasColumnType(
"INTEGER");
477 b.HasIndex(
"RevisionInformationId");
479 b.HasIndex(
"TestMergeId");
481 b.ToTable(
"RevInfoTestMerges");
484 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
486 b.Property<
long>(
"Id")
487 .ValueGeneratedOnAdd()
488 .HasColumnType(
"INTEGER");
490 b.Property<
string>(
"CommitSha")
492 .HasColumnType(
"TEXT")
495 b.Property<
long>(
"InstanceId")
496 .HasColumnType(
"INTEGER");
498 b.Property<
string>(
"OriginCommitSha")
500 .HasColumnType(
"TEXT")
505 b.HasIndex(
"InstanceId",
"CommitSha")
508 b.ToTable(
"RevisionInformations");
511 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
513 b.Property<
long>(
"Id")
514 .ValueGeneratedOnAdd()
515 .HasColumnType(
"INTEGER");
517 b.Property<
string>(
"Author")
519 .HasColumnType(
"TEXT");
521 b.Property<
string>(
"BodyAtMerge")
523 .HasColumnType(
"TEXT");
525 b.Property<
string>(
"Comment")
526 .HasColumnType(
"TEXT")
527 .HasMaxLength(10000);
529 b.Property<DateTimeOffset>(
"MergedAt")
530 .HasColumnType(
"TEXT");
532 b.Property<
long>(
"MergedById")
533 .HasColumnType(
"INTEGER");
535 b.Property<
int>(
"Number")
536 .HasColumnType(
"INTEGER");
538 b.Property<
long?>(
"PrimaryRevisionInformationId")
540 .HasColumnType(
"INTEGER");
542 b.Property<
string>(
"PullRequestRevision")
544 .HasColumnType(
"TEXT")
547 b.Property<
string>(
"TitleAtMerge")
549 .HasColumnType(
"TEXT");
551 b.Property<
string>(
"Url")
553 .HasColumnType(
"TEXT");
557 b.HasIndex(
"MergedById");
559 b.HasIndex(
"PrimaryRevisionInformationId")
562 b.ToTable(
"TestMerges");
565 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
567 b.Property<
long?>(
"Id")
568 .ValueGeneratedOnAdd()
569 .HasColumnType(
"INTEGER");
571 b.Property<ulong>(
"AdministrationRights")
572 .HasColumnType(
"INTEGER");
574 b.Property<
string>(
"CanonicalName")
576 .HasColumnType(
"TEXT");
578 b.Property<DateTimeOffset?>(
"CreatedAt")
580 .HasColumnType(
"TEXT");
582 b.Property<
long?>(
"CreatedById")
583 .HasColumnType(
"INTEGER");
585 b.Property<
bool?>(
"Enabled")
587 .HasColumnType(
"INTEGER");
589 b.Property<ulong>(
"InstanceManagerRights")
590 .HasColumnType(
"INTEGER");
592 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
593 .HasColumnType(
"TEXT");
595 b.Property<
string>(
"Name")
597 .HasColumnType(
"TEXT")
598 .HasMaxLength(10000);
600 b.Property<
string>(
"PasswordHash")
601 .HasColumnType(
"TEXT");
603 b.Property<
string>(
"SystemIdentifier")
604 .HasColumnType(
"TEXT");
608 b.HasIndex(
"CanonicalName")
611 b.HasIndex(
"CreatedById");
613 b.HasIndex(
"SystemIdentifier")
619 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
621 b.Property<
long>(
"Id")
622 .ValueGeneratedOnAdd()
623 .HasColumnType(
"INTEGER");
625 b.Property<
long?>(
"AlphaId")
626 .HasColumnType(
"INTEGER");
628 b.Property<
bool>(
"AlphaIsActive")
629 .HasColumnType(
"INTEGER");
631 b.Property<
long?>(
"BravoId")
632 .HasColumnType(
"INTEGER");
634 b.Property<
long>(
"InstanceId")
635 .HasColumnType(
"INTEGER");
639 b.HasIndex(
"AlphaId");
641 b.HasIndex(
"BravoId");
643 b.HasIndex(
"InstanceId")
646 b.ToTable(
"WatchdogReattachInformations");
649 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
651 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
652 .WithMany(
"ChatSettings")
653 .HasForeignKey(
"InstanceId")
654 .OnDelete(DeleteBehavior.Cascade)
658 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
660 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
661 .WithMany(
"Channels")
662 .HasForeignKey(
"ChatSettingsId")
663 .OnDelete(DeleteBehavior.Cascade)
667 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
669 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
671 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
672 .OnDelete(DeleteBehavior.Cascade)
675 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
676 .WithMany(
"CompileJobs")
677 .HasForeignKey(
"RevisionInformationId")
678 .OnDelete(DeleteBehavior.ClientNoAction)
682 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
684 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
685 .WithOne(
"DreamDaemonSettings")
686 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
687 .OnDelete(DeleteBehavior.Cascade)
691 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
693 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
694 .WithOne(
"DreamMakerSettings")
695 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
696 .OnDelete(DeleteBehavior.Cascade)
700 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
702 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
703 .WithMany(
"InstanceUsers")
704 .HasForeignKey(
"InstanceId")
705 .OnDelete(DeleteBehavior.Cascade)
708 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
709 .WithMany(
"InstanceUsers")
710 .HasForeignKey(
"UserId")
711 .OnDelete(DeleteBehavior.Cascade)
715 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
717 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
719 .HasForeignKey(
"CancelledById");
721 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
723 .HasForeignKey(
"InstanceId")
724 .OnDelete(DeleteBehavior.Cascade)
727 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
729 .HasForeignKey(
"StartedById")
730 .OnDelete(DeleteBehavior.Cascade)
734 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
736 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
738 .HasForeignKey(
"CompileJobId")
739 .OnDelete(DeleteBehavior.Cascade)
743 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
745 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
746 .WithOne(
"RepositorySettings")
747 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
748 .OnDelete(DeleteBehavior.Cascade)
752 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
754 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
755 .WithMany(
"ActiveTestMerges")
756 .HasForeignKey(
"RevisionInformationId")
757 .OnDelete(DeleteBehavior.Cascade)
760 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
761 .WithMany(
"RevisonInformations")
762 .HasForeignKey(
"TestMergeId")
763 .OnDelete(DeleteBehavior.ClientNoAction)
767 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
769 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
770 .WithMany(
"RevisionInformations")
771 .HasForeignKey(
"InstanceId")
772 .OnDelete(DeleteBehavior.Cascade)
776 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
778 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
779 .WithMany(
"TestMerges")
780 .HasForeignKey(
"MergedById")
781 .OnDelete(DeleteBehavior.Restrict)
784 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
785 .WithOne(
"PrimaryTestMerge")
786 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
787 .OnDelete(DeleteBehavior.Cascade)
791 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
793 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
794 .WithMany(
"CreatedUsers")
795 .HasForeignKey(
"CreatedById");
798 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
800 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
802 .HasForeignKey(
"AlphaId");
804 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
806 .HasForeignKey(
"BravoId");
808 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
809 .WithOne(
"WatchdogReattachInformation")
810 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
811 .OnDelete(DeleteBehavior.Cascade)
814#pragma warning restore 612, 618