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<
string>(
"RepositoryOrigin")
148 .HasColumnType(
"TEXT");
150 b.Property<
long>(
"RevisionInformationId")
151 .HasColumnType(
"INTEGER");
155 b.HasIndex(
"DirectoryName");
160 b.HasIndex(
"RevisionInformationId");
162 b.ToTable(
"CompileJobs");
165 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
167 b.Property<
long>(
"Id")
168 .ValueGeneratedOnAdd()
169 .HasColumnType(
"INTEGER");
171 b.Property<
string>(
"AdditionalParameters")
173 .HasColumnType(
"TEXT")
174 .HasMaxLength(10000);
176 b.Property<
bool?>(
"AllowWebClient")
178 .HasColumnType(
"INTEGER");
180 b.Property<
bool?>(
"AutoStart")
182 .HasColumnType(
"INTEGER");
184 b.Property<uint?>(
"HeartbeatSeconds")
186 .HasColumnType(
"INTEGER");
188 b.Property<
long>(
"InstanceId")
189 .HasColumnType(
"INTEGER");
191 b.Property<ushort?>(
"Port")
193 .HasColumnType(
"INTEGER");
195 b.Property<
int>(
"SecurityLevel")
196 .HasColumnType(
"INTEGER");
198 b.Property<uint?>(
"StartupTimeout")
200 .HasColumnType(
"INTEGER");
202 b.Property<uint?>(
"TopicRequestTimeout")
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);
234 b.Property<
bool?>(
"RequireDMApiValidation")
236 .HasColumnType(
"INTEGER");
240 b.HasIndex(
"InstanceId")
243 b.ToTable(
"DreamMakerSettings");
246 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
248 b.Property<
long>(
"Id")
249 .ValueGeneratedOnAdd()
250 .HasColumnType(
"INTEGER");
252 b.Property<uint?>(
"AutoUpdateInterval")
254 .HasColumnType(
"INTEGER");
256 b.Property<ushort?>(
"ChatBotLimit")
258 .HasColumnType(
"INTEGER");
260 b.Property<
int>(
"ConfigurationType")
261 .HasColumnType(
"INTEGER");
263 b.Property<
string>(
"Name")
265 .HasColumnType(
"TEXT")
266 .HasMaxLength(10000);
268 b.Property<
bool?>(
"Online")
270 .HasColumnType(
"INTEGER");
272 b.Property<
string>(
"Path")
274 .HasColumnType(
"TEXT");
281 b.ToTable(
"Instances");
284 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
286 b.Property<
long>(
"Id")
287 .ValueGeneratedOnAdd()
288 .HasColumnType(
"INTEGER");
290 b.Property<ulong>(
"ByondRights")
291 .HasColumnType(
"INTEGER");
293 b.Property<ulong>(
"ChatBotRights")
294 .HasColumnType(
"INTEGER");
296 b.Property<ulong>(
"ConfigurationRights")
297 .HasColumnType(
"INTEGER");
299 b.Property<ulong>(
"DreamDaemonRights")
300 .HasColumnType(
"INTEGER");
302 b.Property<ulong>(
"DreamMakerRights")
303 .HasColumnType(
"INTEGER");
305 b.Property<
long>(
"InstanceId")
306 .HasColumnType(
"INTEGER");
308 b.Property<ulong>(
"InstanceUserRights")
309 .HasColumnType(
"INTEGER");
311 b.Property<ulong>(
"RepositoryRights")
312 .HasColumnType(
"INTEGER");
314 b.Property<
long>(
"UserId")
315 .HasColumnType(
"INTEGER");
319 b.HasIndex(
"InstanceId");
321 b.HasIndex(
"UserId",
"InstanceId")
324 b.ToTable(
"InstanceUsers");
327 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
329 b.Property<
long>(
"Id")
330 .ValueGeneratedOnAdd()
331 .HasColumnType(
"INTEGER");
333 b.Property<ulong?>(
"CancelRight")
334 .HasColumnType(
"INTEGER");
336 b.Property<ulong?>(
"CancelRightsType")
337 .HasColumnType(
"INTEGER");
339 b.Property<
bool?>(
"Cancelled")
341 .HasColumnType(
"INTEGER");
343 b.Property<
long?>(
"CancelledById")
344 .HasColumnType(
"INTEGER");
346 b.Property<
string>(
"Description")
348 .HasColumnType(
"TEXT");
350 b.Property<uint?>(
"ErrorCode")
351 .HasColumnType(
"INTEGER");
353 b.Property<
string>(
"ExceptionDetails")
354 .HasColumnType(
"TEXT");
356 b.Property<
long>(
"InstanceId")
357 .HasColumnType(
"INTEGER");
359 b.Property<DateTimeOffset?>(
"StartedAt")
361 .HasColumnType(
"TEXT");
363 b.Property<
long>(
"StartedById")
364 .HasColumnType(
"INTEGER");
366 b.Property<DateTimeOffset?>(
"StoppedAt")
367 .HasColumnType(
"TEXT");
371 b.HasIndex(
"CancelledById");
373 b.HasIndex(
"InstanceId");
375 b.HasIndex(
"StartedById");
380 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
382 b.Property<
long>(
"Id")
383 .ValueGeneratedOnAdd()
384 .HasColumnType(
"INTEGER");
386 b.Property<
string>(
"ExternalUserId")
388 .HasColumnType(
"TEXT")
391 b.Property<
int>(
"Provider")
392 .HasColumnType(
"INTEGER");
394 b.Property<
long?>(
"UserId")
395 .HasColumnType(
"INTEGER");
399 b.HasIndex(
"UserId");
401 b.HasIndex(
"Provider",
"ExternalUserId")
404 b.ToTable(
"OAuthConnections");
407 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
409 b.Property<
long>(
"Id")
410 .ValueGeneratedOnAdd()
411 .HasColumnType(
"INTEGER");
413 b.Property<
string>(
"AccessIdentifier")
415 .HasColumnType(
"TEXT");
417 b.Property<
long>(
"CompileJobId")
418 .HasColumnType(
"INTEGER");
420 b.Property<
int>(
"LaunchSecurityLevel")
421 .HasColumnType(
"INTEGER");
423 b.Property<ushort>(
"Port")
424 .HasColumnType(
"INTEGER");
426 b.Property<
int>(
"ProcessId")
427 .HasColumnType(
"INTEGER");
429 b.Property<
int>(
"RebootState")
430 .HasColumnType(
"INTEGER");
434 b.HasIndex(
"CompileJobId");
436 b.ToTable(
"ReattachInformations");
439 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
441 b.Property<
long>(
"Id")
442 .ValueGeneratedOnAdd()
443 .HasColumnType(
"INTEGER");
445 b.Property<
string>(
"AccessToken")
446 .HasColumnType(
"TEXT")
447 .HasMaxLength(10000);
449 b.Property<
string>(
"AccessUser")
450 .HasColumnType(
"TEXT")
451 .HasMaxLength(10000);
453 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
455 .HasColumnType(
"INTEGER");
457 b.Property<
bool?>(
"AutoUpdatesSynchronize")
459 .HasColumnType(
"INTEGER");
461 b.Property<
string>(
"CommitterEmail")
463 .HasColumnType(
"TEXT")
464 .HasMaxLength(10000);
466 b.Property<
string>(
"CommitterName")
468 .HasColumnType(
"TEXT")
469 .HasMaxLength(10000);
471 b.Property<
bool?>(
"CreateGitHubDeployments")
473 .HasColumnType(
"INTEGER");
475 b.Property<
long>(
"InstanceId")
476 .HasColumnType(
"INTEGER");
478 b.Property<
bool?>(
"PostTestMergeComment")
480 .HasColumnType(
"INTEGER");
482 b.Property<
bool?>(
"PushTestMergeCommits")
484 .HasColumnType(
"INTEGER");
486 b.Property<
bool?>(
"ShowTestMergeCommitters")
488 .HasColumnType(
"INTEGER");
492 b.HasIndex(
"InstanceId")
495 b.ToTable(
"RepositorySettings");
498 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
500 b.Property<
long>(
"Id")
501 .ValueGeneratedOnAdd()
502 .HasColumnType(
"INTEGER");
504 b.Property<
long>(
"RevisionInformationId")
505 .HasColumnType(
"INTEGER");
507 b.Property<
long>(
"TestMergeId")
508 .HasColumnType(
"INTEGER");
512 b.HasIndex(
"RevisionInformationId");
514 b.HasIndex(
"TestMergeId");
516 b.ToTable(
"RevInfoTestMerges");
519 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
521 b.Property<
long>(
"Id")
522 .ValueGeneratedOnAdd()
523 .HasColumnType(
"INTEGER");
525 b.Property<
string>(
"CommitSha")
527 .HasColumnType(
"TEXT")
530 b.Property<
long>(
"InstanceId")
531 .HasColumnType(
"INTEGER");
533 b.Property<
string>(
"OriginCommitSha")
535 .HasColumnType(
"TEXT")
540 b.HasIndex(
"InstanceId",
"CommitSha")
543 b.ToTable(
"RevisionInformations");
546 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
548 b.Property<
long>(
"Id")
549 .ValueGeneratedOnAdd()
550 .HasColumnType(
"INTEGER");
552 b.Property<
string>(
"Author")
554 .HasColumnType(
"TEXT");
556 b.Property<
string>(
"BodyAtMerge")
558 .HasColumnType(
"TEXT");
560 b.Property<
string>(
"Comment")
561 .HasColumnType(
"TEXT")
562 .HasMaxLength(10000);
564 b.Property<DateTimeOffset>(
"MergedAt")
565 .HasColumnType(
"TEXT");
567 b.Property<
long>(
"MergedById")
568 .HasColumnType(
"INTEGER");
570 b.Property<
int>(
"Number")
571 .HasColumnType(
"INTEGER");
573 b.Property<
long?>(
"PrimaryRevisionInformationId")
575 .HasColumnType(
"INTEGER");
577 b.Property<
string>(
"TargetCommitSha")
579 .HasColumnType(
"TEXT")
582 b.Property<
string>(
"TitleAtMerge")
584 .HasColumnType(
"TEXT");
586 b.Property<
string>(
"Url")
588 .HasColumnType(
"TEXT");
592 b.HasIndex(
"MergedById");
594 b.HasIndex(
"PrimaryRevisionInformationId")
597 b.ToTable(
"TestMerges");
600 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
602 b.Property<
long?>(
"Id")
603 .ValueGeneratedOnAdd()
604 .HasColumnType(
"INTEGER");
606 b.Property<ulong>(
"AdministrationRights")
607 .HasColumnType(
"INTEGER");
609 b.Property<
string>(
"CanonicalName")
611 .HasColumnType(
"TEXT");
613 b.Property<DateTimeOffset?>(
"CreatedAt")
615 .HasColumnType(
"TEXT");
617 b.Property<
long?>(
"CreatedById")
618 .HasColumnType(
"INTEGER");
620 b.Property<
bool?>(
"Enabled")
622 .HasColumnType(
"INTEGER");
624 b.Property<ulong>(
"InstanceManagerRights")
625 .HasColumnType(
"INTEGER");
627 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
628 .HasColumnType(
"TEXT");
630 b.Property<
string>(
"Name")
632 .HasColumnType(
"TEXT")
633 .HasMaxLength(10000);
635 b.Property<
string>(
"PasswordHash")
636 .HasColumnType(
"TEXT");
638 b.Property<
string>(
"SystemIdentifier")
639 .HasColumnType(
"TEXT");
643 b.HasIndex(
"CanonicalName")
646 b.HasIndex(
"CreatedById");
648 b.HasIndex(
"SystemIdentifier")
654 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
656 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
657 .WithMany(
"ChatSettings")
658 .HasForeignKey(
"InstanceId")
659 .OnDelete(DeleteBehavior.Cascade)
663 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
665 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
666 .WithMany(
"Channels")
667 .HasForeignKey(
"ChatSettingsId")
668 .OnDelete(DeleteBehavior.Cascade)
672 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
674 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
676 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
677 .OnDelete(DeleteBehavior.Cascade)
680 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
681 .WithMany(
"CompileJobs")
682 .HasForeignKey(
"RevisionInformationId")
683 .OnDelete(DeleteBehavior.ClientNoAction)
687 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
689 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
690 .WithOne(
"DreamDaemonSettings")
691 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
692 .OnDelete(DeleteBehavior.Cascade)
696 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
698 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
699 .WithOne(
"DreamMakerSettings")
700 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
701 .OnDelete(DeleteBehavior.Cascade)
705 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
707 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
708 .WithMany(
"InstanceUsers")
709 .HasForeignKey(
"InstanceId")
710 .OnDelete(DeleteBehavior.Cascade)
713 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
714 .WithMany(
"InstanceUsers")
715 .HasForeignKey(
"UserId")
716 .OnDelete(DeleteBehavior.Cascade)
720 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
722 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
724 .HasForeignKey(
"CancelledById");
726 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
728 .HasForeignKey(
"InstanceId")
729 .OnDelete(DeleteBehavior.Cascade)
732 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
734 .HasForeignKey(
"StartedById")
735 .OnDelete(DeleteBehavior.Cascade)
739 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
741 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
742 .WithMany(
"OAuthConnections")
743 .HasForeignKey(
"UserId")
744 .OnDelete(DeleteBehavior.Cascade);
747 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
749 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
751 .HasForeignKey(
"CompileJobId")
752 .OnDelete(DeleteBehavior.Cascade)
756 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
758 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
759 .WithOne(
"RepositorySettings")
760 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
761 .OnDelete(DeleteBehavior.Cascade)
765 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
767 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
768 .WithMany(
"ActiveTestMerges")
769 .HasForeignKey(
"RevisionInformationId")
770 .OnDelete(DeleteBehavior.Cascade)
773 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
774 .WithMany(
"RevisonInformations")
775 .HasForeignKey(
"TestMergeId")
776 .OnDelete(DeleteBehavior.ClientNoAction)
780 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
782 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
783 .WithMany(
"RevisionInformations")
784 .HasForeignKey(
"InstanceId")
785 .OnDelete(DeleteBehavior.Cascade)
789 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
791 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
792 .WithMany(
"TestMerges")
793 .HasForeignKey(
"MergedById")
794 .OnDelete(DeleteBehavior.Restrict)
797 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
798 .WithOne(
"PrimaryTestMerge")
799 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
800 .OnDelete(DeleteBehavior.Cascade)
804 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
806 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
807 .WithMany(
"CreatedUsers")
808 .HasForeignKey(
"CreatedById");
810#pragma warning restore 612, 618