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<
bool?>(
"AllowWebClient")
164 .HasColumnType(
"INTEGER");
166 b.Property<
bool?>(
"AutoStart")
168 .HasColumnType(
"INTEGER");
170 b.Property<uint?>(
"HeartbeatSeconds")
172 .HasColumnType(
"INTEGER");
174 b.Property<
long>(
"InstanceId")
175 .HasColumnType(
"INTEGER");
177 b.Property<ushort?>(
"PrimaryPort")
179 .HasColumnType(
"INTEGER");
181 b.Property<ushort?>(
"SecondaryPort")
183 .HasColumnType(
"INTEGER");
185 b.Property<
int>(
"SecurityLevel")
186 .HasColumnType(
"INTEGER");
188 b.Property<uint?>(
"StartupTimeout")
190 .HasColumnType(
"INTEGER");
194 b.HasIndex(
"InstanceId")
197 b.ToTable(
"DreamDaemonSettings");
200 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
202 b.Property<
long>(
"Id")
203 .ValueGeneratedOnAdd()
204 .HasColumnType(
"INTEGER");
206 b.Property<ushort?>(
"ApiValidationPort")
208 .HasColumnType(
"INTEGER");
210 b.Property<
int>(
"ApiValidationSecurityLevel")
211 .HasColumnType(
"INTEGER");
213 b.Property<
long>(
"InstanceId")
214 .HasColumnType(
"INTEGER");
216 b.Property<
string>(
"ProjectName")
217 .HasColumnType(
"TEXT")
218 .HasMaxLength(10000);
222 b.HasIndex(
"InstanceId")
225 b.ToTable(
"DreamMakerSettings");
228 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
230 b.Property<
long>(
"Id")
231 .ValueGeneratedOnAdd()
232 .HasColumnType(
"INTEGER");
234 b.Property<uint?>(
"AutoUpdateInterval")
236 .HasColumnType(
"INTEGER");
238 b.Property<ushort?>(
"ChatBotLimit")
240 .HasColumnType(
"INTEGER");
242 b.Property<
int>(
"ConfigurationType")
243 .HasColumnType(
"INTEGER");
245 b.Property<
string>(
"Name")
247 .HasColumnType(
"TEXT")
248 .HasMaxLength(10000);
250 b.Property<
bool?>(
"Online")
252 .HasColumnType(
"INTEGER");
254 b.Property<
string>(
"Path")
256 .HasColumnType(
"TEXT");
263 b.ToTable(
"Instances");
266 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
268 b.Property<
long>(
"Id")
269 .ValueGeneratedOnAdd()
270 .HasColumnType(
"INTEGER");
272 b.Property<ulong>(
"ByondRights")
273 .HasColumnType(
"INTEGER");
275 b.Property<ulong>(
"ChatBotRights")
276 .HasColumnType(
"INTEGER");
278 b.Property<ulong>(
"ConfigurationRights")
279 .HasColumnType(
"INTEGER");
281 b.Property<ulong>(
"DreamDaemonRights")
282 .HasColumnType(
"INTEGER");
284 b.Property<ulong>(
"DreamMakerRights")
285 .HasColumnType(
"INTEGER");
287 b.Property<
long>(
"InstanceId")
288 .HasColumnType(
"INTEGER");
290 b.Property<ulong>(
"InstanceUserRights")
291 .HasColumnType(
"INTEGER");
293 b.Property<ulong>(
"RepositoryRights")
294 .HasColumnType(
"INTEGER");
296 b.Property<
long?>(
"UserId")
298 .HasColumnType(
"INTEGER");
302 b.HasIndex(
"InstanceId");
304 b.HasIndex(
"UserId",
"InstanceId")
307 b.ToTable(
"InstanceUsers");
310 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
312 b.Property<
long>(
"Id")
313 .ValueGeneratedOnAdd()
314 .HasColumnType(
"INTEGER");
316 b.Property<ulong?>(
"CancelRight")
317 .HasColumnType(
"INTEGER");
319 b.Property<ulong?>(
"CancelRightsType")
320 .HasColumnType(
"INTEGER");
322 b.Property<
bool?>(
"Cancelled")
324 .HasColumnType(
"INTEGER");
326 b.Property<
long?>(
"CancelledById")
327 .HasColumnType(
"INTEGER");
329 b.Property<
string>(
"Description")
331 .HasColumnType(
"TEXT");
333 b.Property<uint?>(
"ErrorCode")
334 .HasColumnType(
"INTEGER");
336 b.Property<
string>(
"ExceptionDetails")
337 .HasColumnType(
"TEXT");
339 b.Property<
long>(
"InstanceId")
340 .HasColumnType(
"INTEGER");
342 b.Property<DateTimeOffset?>(
"StartedAt")
344 .HasColumnType(
"TEXT");
346 b.Property<
long>(
"StartedById")
347 .HasColumnType(
"INTEGER");
349 b.Property<DateTimeOffset?>(
"StoppedAt")
350 .HasColumnType(
"TEXT");
354 b.HasIndex(
"CancelledById");
356 b.HasIndex(
"InstanceId");
358 b.HasIndex(
"StartedById");
363 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
365 b.Property<
long>(
"Id")
366 .ValueGeneratedOnAdd()
367 .HasColumnType(
"INTEGER");
369 b.Property<
string>(
"AccessIdentifier")
371 .HasColumnType(
"TEXT");
373 b.Property<
long>(
"CompileJobId")
374 .HasColumnType(
"INTEGER");
376 b.Property<
bool>(
"IsPrimary")
377 .HasColumnType(
"INTEGER");
379 b.Property<
int>(
"LaunchSecurityLevel")
380 .HasColumnType(
"INTEGER");
382 b.Property<ushort>(
"Port")
383 .HasColumnType(
"INTEGER");
385 b.Property<
int>(
"ProcessId")
386 .HasColumnType(
"INTEGER");
388 b.Property<
int>(
"RebootState")
389 .HasColumnType(
"INTEGER");
393 b.HasIndex(
"CompileJobId");
395 b.ToTable(
"ReattachInformations");
398 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
400 b.Property<
long>(
"Id")
401 .ValueGeneratedOnAdd()
402 .HasColumnType(
"INTEGER");
404 b.Property<
string>(
"AccessToken")
405 .HasColumnType(
"TEXT")
406 .HasMaxLength(10000);
408 b.Property<
string>(
"AccessUser")
409 .HasColumnType(
"TEXT")
410 .HasMaxLength(10000);
412 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
414 .HasColumnType(
"INTEGER");
416 b.Property<
bool?>(
"AutoUpdatesSynchronize")
418 .HasColumnType(
"INTEGER");
420 b.Property<
string>(
"CommitterEmail")
422 .HasColumnType(
"TEXT")
423 .HasMaxLength(10000);
425 b.Property<
string>(
"CommitterName")
427 .HasColumnType(
"TEXT")
428 .HasMaxLength(10000);
430 b.Property<
long>(
"InstanceId")
431 .HasColumnType(
"INTEGER");
433 b.Property<
bool?>(
"PostTestMergeComment")
435 .HasColumnType(
"INTEGER");
437 b.Property<
bool?>(
"PushTestMergeCommits")
439 .HasColumnType(
"INTEGER");
441 b.Property<
bool?>(
"ShowTestMergeCommitters")
443 .HasColumnType(
"INTEGER");
447 b.HasIndex(
"InstanceId")
450 b.ToTable(
"RepositorySettings");
453 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
455 b.Property<
long>(
"Id")
456 .ValueGeneratedOnAdd()
457 .HasColumnType(
"INTEGER");
459 b.Property<
long>(
"RevisionInformationId")
460 .HasColumnType(
"INTEGER");
462 b.Property<
long>(
"TestMergeId")
463 .HasColumnType(
"INTEGER");
467 b.HasIndex(
"RevisionInformationId");
469 b.HasIndex(
"TestMergeId");
471 b.ToTable(
"RevInfoTestMerges");
474 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
476 b.Property<
long>(
"Id")
477 .ValueGeneratedOnAdd()
478 .HasColumnType(
"INTEGER");
480 b.Property<
string>(
"CommitSha")
482 .HasColumnType(
"TEXT")
485 b.Property<
long>(
"InstanceId")
486 .HasColumnType(
"INTEGER");
488 b.Property<
string>(
"OriginCommitSha")
490 .HasColumnType(
"TEXT")
495 b.HasIndex(
"InstanceId",
"CommitSha")
498 b.ToTable(
"RevisionInformations");
501 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
503 b.Property<
long>(
"Id")
504 .ValueGeneratedOnAdd()
505 .HasColumnType(
"INTEGER");
507 b.Property<
string>(
"Author")
509 .HasColumnType(
"TEXT");
511 b.Property<
string>(
"BodyAtMerge")
513 .HasColumnType(
"TEXT");
515 b.Property<
string>(
"Comment")
516 .HasColumnType(
"TEXT")
517 .HasMaxLength(10000);
519 b.Property<DateTimeOffset>(
"MergedAt")
520 .HasColumnType(
"TEXT");
522 b.Property<
long>(
"MergedById")
523 .HasColumnType(
"INTEGER");
525 b.Property<
int>(
"Number")
526 .HasColumnType(
"INTEGER");
528 b.Property<
long?>(
"PrimaryRevisionInformationId")
530 .HasColumnType(
"INTEGER");
532 b.Property<
string>(
"PullRequestRevision")
534 .HasColumnType(
"TEXT")
537 b.Property<
string>(
"TitleAtMerge")
539 .HasColumnType(
"TEXT");
541 b.Property<
string>(
"Url")
543 .HasColumnType(
"TEXT");
547 b.HasIndex(
"MergedById");
549 b.HasIndex(
"PrimaryRevisionInformationId")
552 b.ToTable(
"TestMerges");
555 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
557 b.Property<
long?>(
"Id")
558 .ValueGeneratedOnAdd()
559 .HasColumnType(
"INTEGER");
561 b.Property<ulong>(
"AdministrationRights")
562 .HasColumnType(
"INTEGER");
564 b.Property<
string>(
"CanonicalName")
566 .HasColumnType(
"TEXT");
568 b.Property<DateTimeOffset?>(
"CreatedAt")
570 .HasColumnType(
"TEXT");
572 b.Property<
long?>(
"CreatedById")
573 .HasColumnType(
"INTEGER");
575 b.Property<
bool?>(
"Enabled")
577 .HasColumnType(
"INTEGER");
579 b.Property<ulong>(
"InstanceManagerRights")
580 .HasColumnType(
"INTEGER");
582 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
583 .HasColumnType(
"TEXT");
585 b.Property<
string>(
"Name")
587 .HasColumnType(
"TEXT")
588 .HasMaxLength(10000);
590 b.Property<
string>(
"PasswordHash")
591 .HasColumnType(
"TEXT");
593 b.Property<
string>(
"SystemIdentifier")
594 .HasColumnType(
"TEXT");
598 b.HasIndex(
"CanonicalName")
601 b.HasIndex(
"CreatedById");
603 b.HasIndex(
"SystemIdentifier")
609 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
611 b.Property<
long>(
"Id")
612 .ValueGeneratedOnAdd()
613 .HasColumnType(
"INTEGER");
615 b.Property<
long?>(
"AlphaId")
616 .HasColumnType(
"INTEGER");
618 b.Property<
bool>(
"AlphaIsActive")
619 .HasColumnType(
"INTEGER");
621 b.Property<
long?>(
"BravoId")
622 .HasColumnType(
"INTEGER");
624 b.Property<
long>(
"InstanceId")
625 .HasColumnType(
"INTEGER");
629 b.HasIndex(
"AlphaId");
631 b.HasIndex(
"BravoId");
633 b.HasIndex(
"InstanceId")
636 b.ToTable(
"WatchdogReattachInformations");
639 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
641 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
642 .WithMany(
"ChatSettings")
643 .HasForeignKey(
"InstanceId")
644 .OnDelete(DeleteBehavior.Cascade)
648 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
650 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
651 .WithMany(
"Channels")
652 .HasForeignKey(
"ChatSettingsId")
653 .OnDelete(DeleteBehavior.Cascade)
657 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
659 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
661 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
662 .OnDelete(DeleteBehavior.Cascade)
665 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
666 .WithMany(
"CompileJobs")
667 .HasForeignKey(
"RevisionInformationId")
668 .OnDelete(DeleteBehavior.ClientNoAction)
672 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
674 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
675 .WithOne(
"DreamDaemonSettings")
676 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
677 .OnDelete(DeleteBehavior.Cascade)
681 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
683 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
684 .WithOne(
"DreamMakerSettings")
685 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
686 .OnDelete(DeleteBehavior.Cascade)
690 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
692 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
693 .WithMany(
"InstanceUsers")
694 .HasForeignKey(
"InstanceId")
695 .OnDelete(DeleteBehavior.Cascade)
698 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
699 .WithMany(
"InstanceUsers")
700 .HasForeignKey(
"UserId")
701 .OnDelete(DeleteBehavior.Cascade)
705 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
707 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
709 .HasForeignKey(
"CancelledById");
711 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
713 .HasForeignKey(
"InstanceId")
714 .OnDelete(DeleteBehavior.Cascade)
717 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
719 .HasForeignKey(
"StartedById")
720 .OnDelete(DeleteBehavior.Cascade)
724 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
726 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
728 .HasForeignKey(
"CompileJobId")
729 .OnDelete(DeleteBehavior.Cascade)
733 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
735 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
736 .WithOne(
"RepositorySettings")
737 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
738 .OnDelete(DeleteBehavior.Cascade)
742 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
744 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
745 .WithMany(
"ActiveTestMerges")
746 .HasForeignKey(
"RevisionInformationId")
747 .OnDelete(DeleteBehavior.Cascade)
750 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
751 .WithMany(
"RevisonInformations")
752 .HasForeignKey(
"TestMergeId")
753 .OnDelete(DeleteBehavior.ClientNoAction)
757 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
759 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
760 .WithMany(
"RevisionInformations")
761 .HasForeignKey(
"InstanceId")
762 .OnDelete(DeleteBehavior.Cascade)
766 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
768 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
769 .WithMany(
"TestMerges")
770 .HasForeignKey(
"MergedById")
771 .OnDelete(DeleteBehavior.Restrict)
774 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
775 .WithOne(
"PrimaryTestMerge")
776 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
777 .OnDelete(DeleteBehavior.Cascade)
781 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
783 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
784 .WithMany(
"CreatedUsers")
785 .HasForeignKey(
"CreatedById");
788 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
790 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
792 .HasForeignKey(
"AlphaId");
794 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
796 .HasForeignKey(
"BravoId");
798 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
799 .WithOne(
"WatchdogReattachInformation")
800 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
801 .OnDelete(DeleteBehavior.Cascade)
804#pragma warning restore 612, 618