16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.10");
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<
int?>(
"GitHubDeploymentId")
132 .HasColumnType(
"INTEGER");
134 b.Property<
long?>(
"GitHubRepoId")
135 .HasColumnType(
"INTEGER");
137 b.Property<
long>(
"JobId")
138 .HasColumnType(
"INTEGER");
140 b.Property<
int?>(
"MinimumSecurityLevel")
141 .HasColumnType(
"INTEGER");
143 b.Property<
string>(
"Output")
145 .HasColumnType(
"TEXT");
147 b.Property<
long>(
"RevisionInformationId")
148 .HasColumnType(
"INTEGER");
152 b.HasIndex(
"DirectoryName");
157 b.HasIndex(
"RevisionInformationId");
159 b.ToTable(
"CompileJobs");
162 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
164 b.Property<
long>(
"Id")
165 .ValueGeneratedOnAdd()
166 .HasColumnType(
"INTEGER");
168 b.Property<
string>(
"AdditionalParameters")
170 .HasColumnType(
"TEXT")
171 .HasMaxLength(10000);
173 b.Property<
bool?>(
"AllowWebClient")
175 .HasColumnType(
"INTEGER");
177 b.Property<
bool?>(
"AutoStart")
179 .HasColumnType(
"INTEGER");
181 b.Property<uint?>(
"HeartbeatSeconds")
183 .HasColumnType(
"INTEGER");
185 b.Property<
long>(
"InstanceId")
186 .HasColumnType(
"INTEGER");
188 b.Property<ushort?>(
"Port")
190 .HasColumnType(
"INTEGER");
192 b.Property<
int>(
"SecurityLevel")
193 .HasColumnType(
"INTEGER");
195 b.Property<uint?>(
"StartupTimeout")
197 .HasColumnType(
"INTEGER");
199 b.Property<uint?>(
"TopicRequestTimeout")
201 .HasColumnType(
"INTEGER");
205 b.HasIndex(
"InstanceId")
208 b.ToTable(
"DreamDaemonSettings");
211 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
213 b.Property<
long>(
"Id")
214 .ValueGeneratedOnAdd()
215 .HasColumnType(
"INTEGER");
217 b.Property<ushort?>(
"ApiValidationPort")
219 .HasColumnType(
"INTEGER");
221 b.Property<
int>(
"ApiValidationSecurityLevel")
222 .HasColumnType(
"INTEGER");
224 b.Property<
long>(
"InstanceId")
225 .HasColumnType(
"INTEGER");
227 b.Property<
string>(
"ProjectName")
228 .HasColumnType(
"TEXT")
229 .HasMaxLength(10000);
231 b.Property<
bool?>(
"RequireDMApiValidation")
233 .HasColumnType(
"INTEGER");
237 b.HasIndex(
"InstanceId")
240 b.ToTable(
"DreamMakerSettings");
243 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
245 b.Property<
long>(
"Id")
246 .ValueGeneratedOnAdd()
247 .HasColumnType(
"INTEGER");
249 b.Property<uint?>(
"AutoUpdateInterval")
251 .HasColumnType(
"INTEGER");
253 b.Property<ushort?>(
"ChatBotLimit")
255 .HasColumnType(
"INTEGER");
257 b.Property<
int>(
"ConfigurationType")
258 .HasColumnType(
"INTEGER");
260 b.Property<
string>(
"Name")
262 .HasColumnType(
"TEXT")
263 .HasMaxLength(10000);
265 b.Property<
bool?>(
"Online")
267 .HasColumnType(
"INTEGER");
269 b.Property<
string>(
"Path")
271 .HasColumnType(
"TEXT");
278 b.ToTable(
"Instances");
281 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
283 b.Property<
long>(
"Id")
284 .ValueGeneratedOnAdd()
285 .HasColumnType(
"INTEGER");
287 b.Property<ulong>(
"ByondRights")
288 .HasColumnType(
"INTEGER");
290 b.Property<ulong>(
"ChatBotRights")
291 .HasColumnType(
"INTEGER");
293 b.Property<ulong>(
"ConfigurationRights")
294 .HasColumnType(
"INTEGER");
296 b.Property<ulong>(
"DreamDaemonRights")
297 .HasColumnType(
"INTEGER");
299 b.Property<ulong>(
"DreamMakerRights")
300 .HasColumnType(
"INTEGER");
302 b.Property<
long>(
"InstanceId")
303 .HasColumnType(
"INTEGER");
305 b.Property<ulong>(
"InstanceUserRights")
306 .HasColumnType(
"INTEGER");
308 b.Property<ulong>(
"RepositoryRights")
309 .HasColumnType(
"INTEGER");
311 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.OAuthConnection", b =>
379 b.Property<
long>(
"Id")
380 .ValueGeneratedOnAdd()
381 .HasColumnType(
"INTEGER");
383 b.Property<
string>(
"ExternalUserId")
385 .HasColumnType(
"TEXT")
388 b.Property<
int>(
"Provider")
389 .HasColumnType(
"INTEGER");
391 b.Property<
long?>(
"UserId")
392 .HasColumnType(
"INTEGER");
396 b.HasIndex(
"UserId");
398 b.HasIndex(
"Provider",
"ExternalUserId")
401 b.ToTable(
"OAuthConnections");
404 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
406 b.Property<
long>(
"Id")
407 .ValueGeneratedOnAdd()
408 .HasColumnType(
"INTEGER");
410 b.Property<
string>(
"AccessIdentifier")
412 .HasColumnType(
"TEXT");
414 b.Property<
long>(
"CompileJobId")
415 .HasColumnType(
"INTEGER");
417 b.Property<
int>(
"LaunchSecurityLevel")
418 .HasColumnType(
"INTEGER");
420 b.Property<ushort>(
"Port")
421 .HasColumnType(
"INTEGER");
423 b.Property<
int>(
"ProcessId")
424 .HasColumnType(
"INTEGER");
426 b.Property<
int>(
"RebootState")
427 .HasColumnType(
"INTEGER");
431 b.HasIndex(
"CompileJobId");
433 b.ToTable(
"ReattachInformations");
436 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
438 b.Property<
long>(
"Id")
439 .ValueGeneratedOnAdd()
440 .HasColumnType(
"INTEGER");
442 b.Property<
string>(
"AccessToken")
443 .HasColumnType(
"TEXT")
444 .HasMaxLength(10000);
446 b.Property<
string>(
"AccessUser")
447 .HasColumnType(
"TEXT")
448 .HasMaxLength(10000);
450 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
452 .HasColumnType(
"INTEGER");
454 b.Property<
bool?>(
"AutoUpdatesSynchronize")
456 .HasColumnType(
"INTEGER");
458 b.Property<
string>(
"CommitterEmail")
460 .HasColumnType(
"TEXT")
461 .HasMaxLength(10000);
463 b.Property<
string>(
"CommitterName")
465 .HasColumnType(
"TEXT")
466 .HasMaxLength(10000);
468 b.Property<
bool?>(
"CreateGitHubDeployments")
470 .HasColumnType(
"INTEGER");
472 b.Property<
long>(
"InstanceId")
473 .HasColumnType(
"INTEGER");
475 b.Property<
bool?>(
"PostTestMergeComment")
477 .HasColumnType(
"INTEGER");
479 b.Property<
bool?>(
"PushTestMergeCommits")
481 .HasColumnType(
"INTEGER");
483 b.Property<
bool?>(
"ShowTestMergeCommitters")
485 .HasColumnType(
"INTEGER");
489 b.HasIndex(
"InstanceId")
492 b.ToTable(
"RepositorySettings");
495 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
497 b.Property<
long>(
"Id")
498 .ValueGeneratedOnAdd()
499 .HasColumnType(
"INTEGER");
501 b.Property<
long>(
"RevisionInformationId")
502 .HasColumnType(
"INTEGER");
504 b.Property<
long>(
"TestMergeId")
505 .HasColumnType(
"INTEGER");
509 b.HasIndex(
"RevisionInformationId");
511 b.HasIndex(
"TestMergeId");
513 b.ToTable(
"RevInfoTestMerges");
516 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
518 b.Property<
long>(
"Id")
519 .ValueGeneratedOnAdd()
520 .HasColumnType(
"INTEGER");
522 b.Property<
string>(
"CommitSha")
524 .HasColumnType(
"TEXT")
527 b.Property<
long>(
"InstanceId")
528 .HasColumnType(
"INTEGER");
530 b.Property<
string>(
"OriginCommitSha")
532 .HasColumnType(
"TEXT")
537 b.HasIndex(
"InstanceId",
"CommitSha")
540 b.ToTable(
"RevisionInformations");
543 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
545 b.Property<
long>(
"Id")
546 .ValueGeneratedOnAdd()
547 .HasColumnType(
"INTEGER");
549 b.Property<
string>(
"Author")
551 .HasColumnType(
"TEXT");
553 b.Property<
string>(
"BodyAtMerge")
555 .HasColumnType(
"TEXT");
557 b.Property<
string>(
"Comment")
558 .HasColumnType(
"TEXT")
559 .HasMaxLength(10000);
561 b.Property<DateTimeOffset>(
"MergedAt")
562 .HasColumnType(
"TEXT");
564 b.Property<
long>(
"MergedById")
565 .HasColumnType(
"INTEGER");
567 b.Property<
int>(
"Number")
568 .HasColumnType(
"INTEGER");
570 b.Property<
long?>(
"PrimaryRevisionInformationId")
572 .HasColumnType(
"INTEGER");
574 b.Property<
string>(
"PullRequestRevision")
576 .HasColumnType(
"TEXT")
579 b.Property<
string>(
"TitleAtMerge")
581 .HasColumnType(
"TEXT");
583 b.Property<
string>(
"Url")
585 .HasColumnType(
"TEXT");
589 b.HasIndex(
"MergedById");
591 b.HasIndex(
"PrimaryRevisionInformationId")
594 b.ToTable(
"TestMerges");
597 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
599 b.Property<
long?>(
"Id")
600 .ValueGeneratedOnAdd()
601 .HasColumnType(
"INTEGER");
603 b.Property<ulong>(
"AdministrationRights")
604 .HasColumnType(
"INTEGER");
606 b.Property<
string>(
"CanonicalName")
608 .HasColumnType(
"TEXT");
610 b.Property<DateTimeOffset?>(
"CreatedAt")
612 .HasColumnType(
"TEXT");
614 b.Property<
long?>(
"CreatedById")
615 .HasColumnType(
"INTEGER");
617 b.Property<
bool?>(
"Enabled")
619 .HasColumnType(
"INTEGER");
621 b.Property<ulong>(
"InstanceManagerRights")
622 .HasColumnType(
"INTEGER");
624 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
625 .HasColumnType(
"TEXT");
627 b.Property<
string>(
"Name")
629 .HasColumnType(
"TEXT")
630 .HasMaxLength(10000);
632 b.Property<
string>(
"PasswordHash")
633 .HasColumnType(
"TEXT");
635 b.Property<
string>(
"SystemIdentifier")
636 .HasColumnType(
"TEXT");
640 b.HasIndex(
"CanonicalName")
643 b.HasIndex(
"CreatedById");
645 b.HasIndex(
"SystemIdentifier")
651 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
653 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
654 .WithMany(
"ChatSettings")
655 .HasForeignKey(
"InstanceId")
656 .OnDelete(DeleteBehavior.Cascade)
660 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
662 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
663 .WithMany(
"Channels")
664 .HasForeignKey(
"ChatSettingsId")
665 .OnDelete(DeleteBehavior.Cascade)
669 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
671 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
673 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
674 .OnDelete(DeleteBehavior.Cascade)
677 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
678 .WithMany(
"CompileJobs")
679 .HasForeignKey(
"RevisionInformationId")
680 .OnDelete(DeleteBehavior.ClientNoAction)
684 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
686 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
687 .WithOne(
"DreamDaemonSettings")
688 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
689 .OnDelete(DeleteBehavior.Cascade)
693 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
695 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
696 .WithOne(
"DreamMakerSettings")
697 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
698 .OnDelete(DeleteBehavior.Cascade)
702 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
704 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
705 .WithMany(
"InstanceUsers")
706 .HasForeignKey(
"InstanceId")
707 .OnDelete(DeleteBehavior.Cascade)
710 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
711 .WithMany(
"InstanceUsers")
712 .HasForeignKey(
"UserId")
713 .OnDelete(DeleteBehavior.Cascade)
717 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
719 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
721 .HasForeignKey(
"CancelledById");
723 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
725 .HasForeignKey(
"InstanceId")
726 .OnDelete(DeleteBehavior.Cascade)
729 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
731 .HasForeignKey(
"StartedById")
732 .OnDelete(DeleteBehavior.Cascade)
736 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
738 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
739 .WithMany(
"OAuthConnections")
740 .HasForeignKey(
"UserId")
741 .OnDelete(DeleteBehavior.Cascade);
744 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
746 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
748 .HasForeignKey(
"CompileJobId")
749 .OnDelete(DeleteBehavior.Cascade)
753 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
755 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
756 .WithOne(
"RepositorySettings")
757 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
758 .OnDelete(DeleteBehavior.Cascade)
762 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
764 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
765 .WithMany(
"ActiveTestMerges")
766 .HasForeignKey(
"RevisionInformationId")
767 .OnDelete(DeleteBehavior.Cascade)
770 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
771 .WithMany(
"RevisonInformations")
772 .HasForeignKey(
"TestMergeId")
773 .OnDelete(DeleteBehavior.ClientNoAction)
777 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
779 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
780 .WithMany(
"RevisionInformations")
781 .HasForeignKey(
"InstanceId")
782 .OnDelete(DeleteBehavior.Cascade)
786 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
788 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
789 .WithMany(
"TestMerges")
790 .HasForeignKey(
"MergedById")
791 .OnDelete(DeleteBehavior.Restrict)
794 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
795 .WithOne(
"PrimaryTestMerge")
796 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
797 .OnDelete(DeleteBehavior.Cascade)
801 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
803 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
804 .WithMany(
"CreatedUsers")
805 .HasForeignKey(
"CreatedById");
807#pragma warning restore 612, 618