17#pragma warning disable 612, 618
19 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
20 .HasAnnotation(
"ProductVersion",
"3.1.20")
21 .HasAnnotation(
"Relational:MaxIdentifierLength", 63);
23 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
25 b.Property<
long?>(
"Id")
26 .ValueGeneratedOnAdd()
27 .HasColumnType(
"bigint")
28 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
30 b.Property<
int>(
"ChannelLimit")
31 .HasColumnType(
"integer");
33 b.Property<
string>(
"ConnectionString")
35 .HasColumnType(
"character varying(10000)")
38 b.Property<
bool?>(
"Enabled")
39 .HasColumnType(
"boolean");
41 b.Property<
long>(
"InstanceId")
42 .HasColumnType(
"bigint");
44 b.Property<
string>(
"Name")
46 .HasColumnType(
"character varying(100)")
49 b.Property<
int>(
"Provider")
50 .HasColumnType(
"integer");
52 b.Property<
long>(
"ReconnectionInterval")
53 .HasColumnType(
"bigint");
57 b.HasIndex(
"InstanceId",
"Name")
60 b.ToTable(
"ChatBots");
63 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
65 b.Property<
long>(
"Id")
66 .ValueGeneratedOnAdd()
67 .HasColumnType(
"bigint")
68 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
70 b.Property<
long>(
"ChatSettingsId")
71 .HasColumnType(
"bigint");
73 b.Property<decimal?>(
"DiscordChannelId")
74 .HasColumnType(
"numeric(20,0)");
76 b.Property<
string>(
"IrcChannel")
77 .HasColumnType(
"character varying(100)")
80 b.Property<
bool?>(
"IsAdminChannel")
82 .HasColumnType(
"boolean");
84 b.Property<
bool?>(
"IsUpdatesChannel")
86 .HasColumnType(
"boolean");
88 b.Property<
bool?>(
"IsWatchdogChannel")
90 .HasColumnType(
"boolean");
92 b.Property<
string>(
"Tag")
93 .HasColumnType(
"character varying(10000)")
98 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
101 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
104 b.ToTable(
"ChatChannels");
107 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
109 b.Property<
long?>(
"Id")
110 .ValueGeneratedOnAdd()
111 .HasColumnType(
"bigint")
112 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
114 b.Property<
string>(
"ByondVersion")
116 .HasColumnType(
"text");
118 b.Property<
int?>(
"DMApiMajorVersion")
119 .HasColumnType(
"integer");
121 b.Property<
int?>(
"DMApiMinorVersion")
122 .HasColumnType(
"integer");
124 b.Property<
int?>(
"DMApiPatchVersion")
125 .HasColumnType(
"integer");
127 b.Property<Guid?>(
"DirectoryName")
129 .HasColumnType(
"uuid");
131 b.Property<
string>(
"DmeName")
133 .HasColumnType(
"text");
135 b.Property<
int?>(
"GitHubDeploymentId")
136 .HasColumnType(
"integer");
138 b.Property<
long?>(
"GitHubRepoId")
139 .HasColumnType(
"bigint");
141 b.Property<
long>(
"JobId")
142 .HasColumnType(
"bigint");
144 b.Property<
int?>(
"MinimumSecurityLevel")
145 .HasColumnType(
"integer");
147 b.Property<
string>(
"Output")
149 .HasColumnType(
"text");
151 b.Property<
string>(
"RepositoryOrigin")
152 .HasColumnType(
"text");
154 b.Property<
long>(
"RevisionInformationId")
155 .HasColumnType(
"bigint");
159 b.HasIndex(
"DirectoryName");
164 b.HasIndex(
"RevisionInformationId");
166 b.ToTable(
"CompileJobs");
169 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
171 b.Property<
long>(
"Id")
172 .ValueGeneratedOnAdd()
173 .HasColumnType(
"bigint")
174 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
176 b.Property<
string>(
"AdditionalParameters")
178 .HasColumnType(
"character varying(10000)")
179 .HasMaxLength(10000);
181 b.Property<
bool?>(
"AllowWebClient")
183 .HasColumnType(
"boolean");
185 b.Property<
bool?>(
"AutoStart")
187 .HasColumnType(
"boolean");
189 b.Property<
bool?>(
"DumpOnHeartbeatRestart")
191 .HasColumnType(
"boolean");
193 b.Property<
long>(
"HeartbeatSeconds")
194 .HasColumnType(
"bigint");
196 b.Property<
long>(
"InstanceId")
197 .HasColumnType(
"bigint");
199 b.Property<
int>(
"Port")
200 .HasColumnType(
"integer");
202 b.Property<
int>(
"SecurityLevel")
203 .HasColumnType(
"integer");
205 b.Property<
long>(
"StartupTimeout")
206 .HasColumnType(
"bigint");
208 b.Property<
long>(
"TopicRequestTimeout")
209 .HasColumnType(
"bigint");
211 b.Property<
int>(
"Visibility")
212 .HasColumnType(
"integer");
216 b.HasIndex(
"InstanceId")
219 b.ToTable(
"DreamDaemonSettings");
222 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
224 b.Property<
long>(
"Id")
225 .ValueGeneratedOnAdd()
226 .HasColumnType(
"bigint")
227 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
229 b.Property<
int>(
"ApiValidationPort")
230 .HasColumnType(
"integer");
232 b.Property<
int>(
"ApiValidationSecurityLevel")
233 .HasColumnType(
"integer");
235 b.Property<
long>(
"InstanceId")
236 .HasColumnType(
"bigint");
238 b.Property<
string>(
"ProjectName")
239 .HasColumnType(
"character varying(10000)")
240 .HasMaxLength(10000);
242 b.Property<
bool?>(
"RequireDMApiValidation")
244 .HasColumnType(
"boolean");
246 b.Property<TimeSpan?>(
"Timeout")
248 .HasColumnType(
"interval");
252 b.HasIndex(
"InstanceId")
255 b.ToTable(
"DreamMakerSettings");
258 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
260 b.Property<
long?>(
"Id")
261 .ValueGeneratedOnAdd()
262 .HasColumnType(
"bigint")
263 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
265 b.Property<
long>(
"AutoUpdateInterval")
266 .HasColumnType(
"bigint");
268 b.Property<
int>(
"ChatBotLimit")
269 .HasColumnType(
"integer");
271 b.Property<
int>(
"ConfigurationType")
272 .HasColumnType(
"integer");
274 b.Property<
string>(
"Name")
276 .HasColumnType(
"character varying(100)")
279 b.Property<
bool?>(
"Online")
281 .HasColumnType(
"boolean");
283 b.Property<
string>(
"Path")
285 .HasColumnType(
"text");
287 b.Property<
string>(
"SwarmIdentifer")
288 .HasColumnType(
"text");
292 b.HasIndex(
"Path",
"SwarmIdentifer")
295 b.ToTable(
"Instances");
298 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
300 b.Property<
long>(
"Id")
301 .ValueGeneratedOnAdd()
302 .HasColumnType(
"bigint")
303 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
305 b.Property<decimal>(
"ByondRights")
306 .HasColumnType(
"numeric(20,0)");
308 b.Property<decimal>(
"ChatBotRights")
309 .HasColumnType(
"numeric(20,0)");
311 b.Property<decimal>(
"ConfigurationRights")
312 .HasColumnType(
"numeric(20,0)");
314 b.Property<decimal>(
"DreamDaemonRights")
315 .HasColumnType(
"numeric(20,0)");
317 b.Property<decimal>(
"DreamMakerRights")
318 .HasColumnType(
"numeric(20,0)");
320 b.Property<
long>(
"InstanceId")
321 .HasColumnType(
"bigint");
323 b.Property<decimal>(
"InstancePermissionSetRights")
324 .HasColumnType(
"numeric(20,0)");
326 b.Property<
long>(
"PermissionSetId")
327 .HasColumnType(
"bigint");
329 b.Property<decimal>(
"RepositoryRights")
330 .HasColumnType(
"numeric(20,0)");
334 b.HasIndex(
"InstanceId");
336 b.HasIndex(
"PermissionSetId",
"InstanceId")
339 b.ToTable(
"InstancePermissionSets");
342 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
344 b.Property<
long?>(
"Id")
345 .ValueGeneratedOnAdd()
346 .HasColumnType(
"bigint")
347 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
349 b.Property<decimal?>(
"CancelRight")
350 .HasColumnType(
"numeric(20,0)");
352 b.Property<decimal?>(
"CancelRightsType")
353 .HasColumnType(
"numeric(20,0)");
355 b.Property<
bool?>(
"Cancelled")
357 .HasColumnType(
"boolean");
359 b.Property<
long?>(
"CancelledById")
360 .HasColumnType(
"bigint");
362 b.Property<
string>(
"Description")
364 .HasColumnType(
"text");
366 b.Property<
long?>(
"ErrorCode")
367 .HasColumnType(
"bigint");
369 b.Property<
string>(
"ExceptionDetails")
370 .HasColumnType(
"text");
372 b.Property<
long>(
"InstanceId")
373 .HasColumnType(
"bigint");
375 b.Property<DateTimeOffset?>(
"StartedAt")
377 .HasColumnType(
"timestamp with time zone");
379 b.Property<
long>(
"StartedById")
380 .HasColumnType(
"bigint");
382 b.Property<DateTimeOffset?>(
"StoppedAt")
383 .HasColumnType(
"timestamp with time zone");
387 b.HasIndex(
"CancelledById");
389 b.HasIndex(
"InstanceId");
391 b.HasIndex(
"StartedById");
396 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
398 b.Property<
long>(
"Id")
399 .ValueGeneratedOnAdd()
400 .HasColumnType(
"bigint")
401 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
403 b.Property<
string>(
"ExternalUserId")
405 .HasColumnType(
"character varying(100)")
408 b.Property<
int>(
"Provider")
409 .HasColumnType(
"integer");
411 b.Property<
long?>(
"UserId")
412 .HasColumnType(
"bigint");
416 b.HasIndex(
"UserId");
418 b.HasIndex(
"Provider",
"ExternalUserId")
421 b.ToTable(
"OAuthConnections");
424 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
426 b.Property<
long?>(
"Id")
427 .ValueGeneratedOnAdd()
428 .HasColumnType(
"bigint")
429 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
431 b.Property<decimal>(
"AdministrationRights")
432 .HasColumnType(
"numeric(20,0)");
434 b.Property<
long?>(
"GroupId")
435 .HasColumnType(
"bigint");
437 b.Property<decimal>(
"InstanceManagerRights")
438 .HasColumnType(
"numeric(20,0)");
440 b.Property<
long?>(
"UserId")
441 .HasColumnType(
"bigint");
445 b.HasIndex(
"GroupId")
451 b.ToTable(
"PermissionSets");
454 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
456 b.Property<
long>(
"Id")
457 .ValueGeneratedOnAdd()
458 .HasColumnType(
"bigint")
459 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
461 b.Property<
string>(
"AccessIdentifier")
463 .HasColumnType(
"text");
465 b.Property<
long>(
"CompileJobId")
466 .HasColumnType(
"bigint");
468 b.Property<
int>(
"LaunchSecurityLevel")
469 .HasColumnType(
"integer");
471 b.Property<
int>(
"LaunchVisibility")
472 .HasColumnType(
"integer");
474 b.Property<
int>(
"Port")
475 .HasColumnType(
"integer");
477 b.Property<
int>(
"ProcessId")
478 .HasColumnType(
"integer");
480 b.Property<
int>(
"RebootState")
481 .HasColumnType(
"integer");
485 b.HasIndex(
"CompileJobId");
487 b.ToTable(
"ReattachInformations");
490 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
492 b.Property<
long>(
"Id")
493 .ValueGeneratedOnAdd()
494 .HasColumnType(
"bigint")
495 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
497 b.Property<
string>(
"AccessToken")
498 .HasColumnType(
"character varying(10000)")
499 .HasMaxLength(10000);
501 b.Property<
string>(
"AccessUser")
502 .HasColumnType(
"character varying(10000)")
503 .HasMaxLength(10000);
505 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
507 .HasColumnType(
"boolean");
509 b.Property<
bool?>(
"AutoUpdatesSynchronize")
511 .HasColumnType(
"boolean");
513 b.Property<
string>(
"CommitterEmail")
515 .HasColumnType(
"character varying(10000)")
516 .HasMaxLength(10000);
518 b.Property<
string>(
"CommitterName")
520 .HasColumnType(
"character varying(10000)")
521 .HasMaxLength(10000);
523 b.Property<
bool?>(
"CreateGitHubDeployments")
525 .HasColumnType(
"boolean");
527 b.Property<
long>(
"InstanceId")
528 .HasColumnType(
"bigint");
530 b.Property<
bool?>(
"PostTestMergeComment")
532 .HasColumnType(
"boolean");
534 b.Property<
bool?>(
"PushTestMergeCommits")
536 .HasColumnType(
"boolean");
538 b.Property<
bool?>(
"ShowTestMergeCommitters")
540 .HasColumnType(
"boolean");
542 b.Property<
bool?>(
"UpdateSubmodules")
544 .HasColumnType(
"boolean");
548 b.HasIndex(
"InstanceId")
551 b.ToTable(
"RepositorySettings");
554 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
556 b.Property<
long>(
"Id")
557 .ValueGeneratedOnAdd()
558 .HasColumnType(
"bigint")
559 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
561 b.Property<
long>(
"RevisionInformationId")
562 .HasColumnType(
"bigint");
564 b.Property<
long>(
"TestMergeId")
565 .HasColumnType(
"bigint");
569 b.HasIndex(
"RevisionInformationId");
571 b.HasIndex(
"TestMergeId");
573 b.ToTable(
"RevInfoTestMerges");
576 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
578 b.Property<
long>(
"Id")
579 .ValueGeneratedOnAdd()
580 .HasColumnType(
"bigint")
581 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
583 b.Property<
string>(
"CommitSha")
585 .HasColumnType(
"character varying(40)")
588 b.Property<
long>(
"InstanceId")
589 .HasColumnType(
"bigint");
591 b.Property<
string>(
"OriginCommitSha")
593 .HasColumnType(
"character varying(40)")
596 b.Property<DateTimeOffset>(
"Timestamp")
597 .HasColumnType(
"timestamp with time zone");
601 b.HasIndex(
"InstanceId",
"CommitSha")
604 b.ToTable(
"RevisionInformations");
607 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
609 b.Property<
long>(
"Id")
610 .ValueGeneratedOnAdd()
611 .HasColumnType(
"bigint")
612 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
614 b.Property<
string>(
"Author")
616 .HasColumnType(
"text");
618 b.Property<
string>(
"BodyAtMerge")
620 .HasColumnType(
"text");
622 b.Property<
string>(
"Comment")
623 .HasColumnType(
"character varying(10000)")
624 .HasMaxLength(10000);
626 b.Property<DateTimeOffset>(
"MergedAt")
627 .HasColumnType(
"timestamp with time zone");
629 b.Property<
long>(
"MergedById")
630 .HasColumnType(
"bigint");
632 b.Property<
int>(
"Number")
633 .HasColumnType(
"integer");
635 b.Property<
long?>(
"PrimaryRevisionInformationId")
637 .HasColumnType(
"bigint");
639 b.Property<
string>(
"TargetCommitSha")
641 .HasColumnType(
"character varying(40)")
644 b.Property<
string>(
"TitleAtMerge")
646 .HasColumnType(
"text");
648 b.Property<
string>(
"Url")
650 .HasColumnType(
"text");
654 b.HasIndex(
"MergedById");
656 b.HasIndex(
"PrimaryRevisionInformationId")
659 b.ToTable(
"TestMerges");
662 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
664 b.Property<
long?>(
"Id")
665 .ValueGeneratedOnAdd()
666 .HasColumnType(
"bigint")
667 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
669 b.Property<
string>(
"CanonicalName")
671 .HasColumnType(
"character varying(100)")
674 b.Property<DateTimeOffset?>(
"CreatedAt")
676 .HasColumnType(
"timestamp with time zone");
678 b.Property<
long?>(
"CreatedById")
679 .HasColumnType(
"bigint");
681 b.Property<
bool?>(
"Enabled")
683 .HasColumnType(
"boolean");
685 b.Property<
long?>(
"GroupId")
686 .HasColumnType(
"bigint");
688 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
689 .HasColumnType(
"timestamp with time zone");
691 b.Property<
string>(
"Name")
693 .HasColumnType(
"character varying(100)")
696 b.Property<
string>(
"PasswordHash")
697 .HasColumnType(
"text");
699 b.Property<
string>(
"SystemIdentifier")
700 .HasColumnType(
"character varying(100)")
705 b.HasIndex(
"CanonicalName")
708 b.HasIndex(
"CreatedById");
710 b.HasIndex(
"GroupId");
712 b.HasIndex(
"SystemIdentifier")
718 modelBuilder.Entity(
"Tgstation.Server.Host.Models.UserGroup", b =>
720 b.Property<
long?>(
"Id")
721 .ValueGeneratedOnAdd()
722 .HasColumnType(
"bigint")
723 .HasAnnotation(
"Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
725 b.Property<
string>(
"Name")
727 .HasColumnType(
"character varying(100)")
738 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
740 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
741 .WithMany(
"ChatSettings")
742 .HasForeignKey(
"InstanceId")
743 .OnDelete(DeleteBehavior.Cascade)
747 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
749 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
750 .WithMany(
"Channels")
751 .HasForeignKey(
"ChatSettingsId")
752 .OnDelete(DeleteBehavior.Cascade)
756 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
758 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
760 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
761 .OnDelete(DeleteBehavior.Cascade)
764 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
765 .WithMany(
"CompileJobs")
766 .HasForeignKey(
"RevisionInformationId")
767 .OnDelete(DeleteBehavior.Cascade)
771 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
773 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
774 .WithOne(
"DreamDaemonSettings")
775 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
776 .OnDelete(DeleteBehavior.Cascade)
780 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
782 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
783 .WithOne(
"DreamMakerSettings")
784 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
785 .OnDelete(DeleteBehavior.Cascade)
789 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstancePermissionSet", b =>
791 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
792 .WithMany(
"InstancePermissionSets")
793 .HasForeignKey(
"InstanceId")
794 .OnDelete(DeleteBehavior.Cascade)
797 b.HasOne(
"Tgstation.Server.Host.Models.PermissionSet",
"PermissionSet")
798 .WithMany(
"InstancePermissionSets")
799 .HasForeignKey(
"PermissionSetId")
800 .OnDelete(DeleteBehavior.Cascade)
804 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
806 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
808 .HasForeignKey(
"CancelledById");
810 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
812 .HasForeignKey(
"InstanceId")
813 .OnDelete(DeleteBehavior.Cascade)
816 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
818 .HasForeignKey(
"StartedById")
819 .OnDelete(DeleteBehavior.Cascade)
823 modelBuilder.Entity(
"Tgstation.Server.Host.Models.OAuthConnection", b =>
825 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
826 .WithMany(
"OAuthConnections")
827 .HasForeignKey(
"UserId")
828 .OnDelete(DeleteBehavior.Cascade);
831 modelBuilder.Entity(
"Tgstation.Server.Host.Models.PermissionSet", b =>
833 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
834 .WithOne(
"PermissionSet")
835 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"GroupId")
836 .OnDelete(DeleteBehavior.Cascade);
838 b.HasOne(
"Tgstation.Server.Host.Models.User",
"User")
839 .WithOne(
"PermissionSet")
840 .HasForeignKey(
"Tgstation.Server.Host.Models.PermissionSet",
"UserId")
841 .OnDelete(DeleteBehavior.Cascade);
844 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
846 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
848 .HasForeignKey(
"CompileJobId")
849 .OnDelete(DeleteBehavior.Cascade)
853 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
855 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
856 .WithOne(
"RepositorySettings")
857 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
858 .OnDelete(DeleteBehavior.Cascade)
862 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
864 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
865 .WithMany(
"ActiveTestMerges")
866 .HasForeignKey(
"RevisionInformationId")
867 .OnDelete(DeleteBehavior.Cascade)
870 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
871 .WithMany(
"RevisonInformations")
872 .HasForeignKey(
"TestMergeId")
873 .OnDelete(DeleteBehavior.ClientNoAction)
877 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
879 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
880 .WithMany(
"RevisionInformations")
881 .HasForeignKey(
"InstanceId")
882 .OnDelete(DeleteBehavior.Cascade)
886 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
888 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
889 .WithMany(
"TestMerges")
890 .HasForeignKey(
"MergedById")
891 .OnDelete(DeleteBehavior.Restrict)
894 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
895 .WithOne(
"PrimaryTestMerge")
896 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
897 .OnDelete(DeleteBehavior.Cascade)
901 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
903 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
904 .WithMany(
"CreatedUsers")
905 .HasForeignKey(
"CreatedById");
907 b.HasOne(
"Tgstation.Server.Host.Models.UserGroup",
"Group")
909 .HasForeignKey(
"GroupId");
911#pragma warning restore 612, 618