tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20210828183954_SLAddUpdateSubmodules.Designer.cs
Go to the documentation of this file.
1// <auto-generated />
2using System;
3
4using Microsoft.EntityFrameworkCore;
5using Microsoft.EntityFrameworkCore.Infrastructure;
6using Microsoft.EntityFrameworkCore.Migrations;
7
9{
10 [DbContext(typeof(SqliteDatabaseContext))]
11 [Migration("20210828183954_SLAddUpdateSubmodules")]
12 partial class SLAddUpdateSubmodules
13 {
15 protected override void BuildTargetModel(ModelBuilder modelBuilder)
16 {
17#pragma warning disable 612, 618
18 modelBuilder
19 .HasAnnotation("ProductVersion", "3.1.18");
20
21 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
22 {
23 b.Property<long?>("Id")
24 .ValueGeneratedOnAdd()
25 .HasColumnType("INTEGER");
26
27 b.Property<ushort?>("ChannelLimit")
28 .IsRequired()
29 .HasColumnType("INTEGER");
30
31 b.Property<string>("ConnectionString")
32 .IsRequired()
33 .HasColumnType("TEXT")
34 .HasMaxLength(10000);
35
36 b.Property<bool?>("Enabled")
37 .HasColumnType("INTEGER");
38
39 b.Property<long>("InstanceId")
40 .HasColumnType("INTEGER");
41
42 b.Property<string>("Name")
43 .IsRequired()
44 .HasColumnType("TEXT")
45 .HasMaxLength(100);
46
47 b.Property<int>("Provider")
48 .HasColumnType("INTEGER");
49
50 b.Property<uint?>("ReconnectionInterval")
51 .IsRequired()
52 .HasColumnType("INTEGER");
53
54 b.HasKey("Id");
55
56 b.HasIndex("InstanceId", "Name")
57 .IsUnique();
58
59 b.ToTable("ChatBots");
60 });
61
62 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
63 {
64 b.Property<long>("Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType("INTEGER");
67
68 b.Property<long>("ChatSettingsId")
69 .HasColumnType("INTEGER");
70
71 b.Property<ulong?>("DiscordChannelId")
72 .HasColumnType("INTEGER");
73
74 b.Property<string>("IrcChannel")
75 .HasColumnType("TEXT")
76 .HasMaxLength(100);
77
78 b.Property<bool?>("IsAdminChannel")
79 .IsRequired()
80 .HasColumnType("INTEGER");
81
82 b.Property<bool?>("IsUpdatesChannel")
83 .IsRequired()
84 .HasColumnType("INTEGER");
85
86 b.Property<bool?>("IsWatchdogChannel")
87 .IsRequired()
88 .HasColumnType("INTEGER");
89
90 b.Property<string>("Tag")
91 .HasColumnType("TEXT")
92 .HasMaxLength(10000);
93
94 b.HasKey("Id");
95
96 b.HasIndex("ChatSettingsId", "DiscordChannelId")
97 .IsUnique();
98
99 b.HasIndex("ChatSettingsId", "IrcChannel")
100 .IsUnique();
101
102 b.ToTable("ChatChannels");
103 });
104
105 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
106 {
107 b.Property<long?>("Id")
108 .ValueGeneratedOnAdd()
109 .HasColumnType("INTEGER");
110
111 b.Property<string>("ByondVersion")
112 .IsRequired()
113 .HasColumnType("TEXT");
114
115 b.Property<int?>("DMApiMajorVersion")
116 .HasColumnType("INTEGER");
117
118 b.Property<int?>("DMApiMinorVersion")
119 .HasColumnType("INTEGER");
120
121 b.Property<int?>("DMApiPatchVersion")
122 .HasColumnType("INTEGER");
123
124 b.Property<Guid?>("DirectoryName")
125 .IsRequired()
126 .HasColumnType("TEXT");
127
128 b.Property<string>("DmeName")
129 .IsRequired()
130 .HasColumnType("TEXT");
131
132 b.Property<int?>("GitHubDeploymentId")
133 .HasColumnType("INTEGER");
134
135 b.Property<long?>("GitHubRepoId")
136 .HasColumnType("INTEGER");
137
138 b.Property<long>("JobId")
139 .HasColumnType("INTEGER");
140
141 b.Property<int?>("MinimumSecurityLevel")
142 .HasColumnType("INTEGER");
143
144 b.Property<string>("Output")
145 .IsRequired()
146 .HasColumnType("TEXT");
147
148 b.Property<string>("RepositoryOrigin")
149 .HasColumnType("TEXT");
150
151 b.Property<long>("RevisionInformationId")
152 .HasColumnType("INTEGER");
153
154 b.HasKey("Id");
155
156 b.HasIndex("DirectoryName");
157
158 b.HasIndex("JobId")
159 .IsUnique();
160
161 b.HasIndex("RevisionInformationId");
162
163 b.ToTable("CompileJobs");
164 });
165
166 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
167 {
168 b.Property<long>("Id")
169 .ValueGeneratedOnAdd()
170 .HasColumnType("INTEGER");
171
172 b.Property<string>("AdditionalParameters")
173 .IsRequired()
174 .HasColumnType("TEXT")
175 .HasMaxLength(10000);
176
177 b.Property<bool?>("AllowWebClient")
178 .IsRequired()
179 .HasColumnType("INTEGER");
180
181 b.Property<bool?>("AutoStart")
182 .IsRequired()
183 .HasColumnType("INTEGER");
184
185 b.Property<uint?>("HeartbeatSeconds")
186 .IsRequired()
187 .HasColumnType("INTEGER");
188
189 b.Property<long>("InstanceId")
190 .HasColumnType("INTEGER");
191
192 b.Property<ushort?>("Port")
193 .IsRequired()
194 .HasColumnType("INTEGER");
195
196 b.Property<int>("SecurityLevel")
197 .HasColumnType("INTEGER");
198
199 b.Property<uint?>("StartupTimeout")
200 .IsRequired()
201 .HasColumnType("INTEGER");
202
203 b.Property<uint?>("TopicRequestTimeout")
204 .IsRequired()
205 .HasColumnType("INTEGER");
206
207 b.Property<int>("Visibility")
208 .HasColumnType("INTEGER");
209
210 b.HasKey("Id");
211
212 b.HasIndex("InstanceId")
213 .IsUnique();
214
215 b.ToTable("DreamDaemonSettings");
216 });
217
218 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
219 {
220 b.Property<long>("Id")
221 .ValueGeneratedOnAdd()
222 .HasColumnType("INTEGER");
223
224 b.Property<ushort?>("ApiValidationPort")
225 .IsRequired()
226 .HasColumnType("INTEGER");
227
228 b.Property<int>("ApiValidationSecurityLevel")
229 .HasColumnType("INTEGER");
230
231 b.Property<long>("InstanceId")
232 .HasColumnType("INTEGER");
233
234 b.Property<string>("ProjectName")
235 .HasColumnType("TEXT")
236 .HasMaxLength(10000);
237
238 b.Property<bool?>("RequireDMApiValidation")
239 .IsRequired()
240 .HasColumnType("INTEGER");
241
242 b.Property<TimeSpan?>("Timeout")
243 .IsRequired()
244 .HasColumnType("TEXT");
245
246 b.HasKey("Id");
247
248 b.HasIndex("InstanceId")
249 .IsUnique();
250
251 b.ToTable("DreamMakerSettings");
252 });
253
254 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
255 {
256 b.Property<long?>("Id")
257 .ValueGeneratedOnAdd()
258 .HasColumnType("INTEGER");
259
260 b.Property<uint?>("AutoUpdateInterval")
261 .IsRequired()
262 .HasColumnType("INTEGER");
263
264 b.Property<ushort?>("ChatBotLimit")
265 .IsRequired()
266 .HasColumnType("INTEGER");
267
268 b.Property<int>("ConfigurationType")
269 .HasColumnType("INTEGER");
270
271 b.Property<string>("Name")
272 .IsRequired()
273 .HasColumnType("TEXT")
274 .HasMaxLength(100);
275
276 b.Property<bool?>("Online")
277 .IsRequired()
278 .HasColumnType("INTEGER");
279
280 b.Property<string>("Path")
281 .IsRequired()
282 .HasColumnType("TEXT");
283
284 b.Property<string>("SwarmIdentifer")
285 .HasColumnType("TEXT");
286
287 b.HasKey("Id");
288
289 b.HasIndex("Path", "SwarmIdentifer")
290 .IsUnique();
291
292 b.ToTable("Instances");
293 });
294
295 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
296 {
297 b.Property<long>("Id")
298 .ValueGeneratedOnAdd()
299 .HasColumnType("INTEGER");
300
301 b.Property<ulong>("ByondRights")
302 .HasColumnType("INTEGER");
303
304 b.Property<ulong>("ChatBotRights")
305 .HasColumnType("INTEGER");
306
307 b.Property<ulong>("ConfigurationRights")
308 .HasColumnType("INTEGER");
309
310 b.Property<ulong>("DreamDaemonRights")
311 .HasColumnType("INTEGER");
312
313 b.Property<ulong>("DreamMakerRights")
314 .HasColumnType("INTEGER");
315
316 b.Property<long>("InstanceId")
317 .HasColumnType("INTEGER");
318
319 b.Property<ulong>("InstancePermissionSetRights")
320 .HasColumnType("INTEGER");
321
322 b.Property<long>("PermissionSetId")
323 .HasColumnType("INTEGER");
324
325 b.Property<ulong>("RepositoryRights")
326 .HasColumnType("INTEGER");
327
328 b.HasKey("Id");
329
330 b.HasIndex("InstanceId");
331
332 b.HasIndex("PermissionSetId", "InstanceId")
333 .IsUnique();
334
335 b.ToTable("InstancePermissionSets");
336 });
337
338 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
339 {
340 b.Property<long?>("Id")
341 .ValueGeneratedOnAdd()
342 .HasColumnType("INTEGER");
343
344 b.Property<ulong?>("CancelRight")
345 .HasColumnType("INTEGER");
346
347 b.Property<ulong?>("CancelRightsType")
348 .HasColumnType("INTEGER");
349
350 b.Property<bool?>("Cancelled")
351 .IsRequired()
352 .HasColumnType("INTEGER");
353
354 b.Property<long?>("CancelledById")
355 .HasColumnType("INTEGER");
356
357 b.Property<string>("Description")
358 .IsRequired()
359 .HasColumnType("TEXT");
360
361 b.Property<uint?>("ErrorCode")
362 .HasColumnType("INTEGER");
363
364 b.Property<string>("ExceptionDetails")
365 .HasColumnType("TEXT");
366
367 b.Property<long>("InstanceId")
368 .HasColumnType("INTEGER");
369
370 b.Property<DateTimeOffset?>("StartedAt")
371 .IsRequired()
372 .HasColumnType("TEXT");
373
374 b.Property<long>("StartedById")
375 .HasColumnType("INTEGER");
376
377 b.Property<DateTimeOffset?>("StoppedAt")
378 .HasColumnType("TEXT");
379
380 b.HasKey("Id");
381
382 b.HasIndex("CancelledById");
383
384 b.HasIndex("InstanceId");
385
386 b.HasIndex("StartedById");
387
388 b.ToTable("Jobs");
389 });
390
391 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
392 {
393 b.Property<long>("Id")
394 .ValueGeneratedOnAdd()
395 .HasColumnType("INTEGER");
396
397 b.Property<string>("ExternalUserId")
398 .IsRequired()
399 .HasColumnType("TEXT")
400 .HasMaxLength(100);
401
402 b.Property<int>("Provider")
403 .HasColumnType("INTEGER");
404
405 b.Property<long?>("UserId")
406 .HasColumnType("INTEGER");
407
408 b.HasKey("Id");
409
410 b.HasIndex("UserId");
411
412 b.HasIndex("Provider", "ExternalUserId")
413 .IsUnique();
414
415 b.ToTable("OAuthConnections");
416 });
417
418 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
419 {
420 b.Property<long?>("Id")
421 .ValueGeneratedOnAdd()
422 .HasColumnType("INTEGER");
423
424 b.Property<ulong>("AdministrationRights")
425 .HasColumnType("INTEGER");
426
427 b.Property<long?>("GroupId")
428 .HasColumnType("INTEGER");
429
430 b.Property<ulong>("InstanceManagerRights")
431 .HasColumnType("INTEGER");
432
433 b.Property<long?>("UserId")
434 .HasColumnType("INTEGER");
435
436 b.HasKey("Id");
437
438 b.HasIndex("GroupId")
439 .IsUnique();
440
441 b.HasIndex("UserId")
442 .IsUnique();
443
444 b.ToTable("PermissionSets");
445 });
446
447 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
448 {
449 b.Property<long>("Id")
450 .ValueGeneratedOnAdd()
451 .HasColumnType("INTEGER");
452
453 b.Property<string>("AccessIdentifier")
454 .IsRequired()
455 .HasColumnType("TEXT");
456
457 b.Property<long>("CompileJobId")
458 .HasColumnType("INTEGER");
459
460 b.Property<int>("LaunchSecurityLevel")
461 .HasColumnType("INTEGER");
462
463 b.Property<int>("LaunchVisibility")
464 .HasColumnType("INTEGER");
465
466 b.Property<ushort>("Port")
467 .HasColumnType("INTEGER");
468
469 b.Property<int>("ProcessId")
470 .HasColumnType("INTEGER");
471
472 b.Property<int>("RebootState")
473 .HasColumnType("INTEGER");
474
475 b.HasKey("Id");
476
477 b.HasIndex("CompileJobId");
478
479 b.ToTable("ReattachInformations");
480 });
481
482 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
483 {
484 b.Property<long>("Id")
485 .ValueGeneratedOnAdd()
486 .HasColumnType("INTEGER");
487
488 b.Property<string>("AccessToken")
489 .HasColumnType("TEXT")
490 .HasMaxLength(10000);
491
492 b.Property<string>("AccessUser")
493 .HasColumnType("TEXT")
494 .HasMaxLength(10000);
495
496 b.Property<bool?>("AutoUpdatesKeepTestMerges")
497 .IsRequired()
498 .HasColumnType("INTEGER");
499
500 b.Property<bool?>("AutoUpdatesSynchronize")
501 .IsRequired()
502 .HasColumnType("INTEGER");
503
504 b.Property<string>("CommitterEmail")
505 .IsRequired()
506 .HasColumnType("TEXT")
507 .HasMaxLength(10000);
508
509 b.Property<string>("CommitterName")
510 .IsRequired()
511 .HasColumnType("TEXT")
512 .HasMaxLength(10000);
513
514 b.Property<bool?>("CreateGitHubDeployments")
515 .IsRequired()
516 .HasColumnType("INTEGER");
517
518 b.Property<long>("InstanceId")
519 .HasColumnType("INTEGER");
520
521 b.Property<bool?>("PostTestMergeComment")
522 .IsRequired()
523 .HasColumnType("INTEGER");
524
525 b.Property<bool?>("PushTestMergeCommits")
526 .IsRequired()
527 .HasColumnType("INTEGER");
528
529 b.Property<bool?>("ShowTestMergeCommitters")
530 .IsRequired()
531 .HasColumnType("INTEGER");
532
533 b.Property<bool?>("UpdateSubmodules")
534 .IsRequired()
535 .HasColumnType("INTEGER");
536
537 b.HasKey("Id");
538
539 b.HasIndex("InstanceId")
540 .IsUnique();
541
542 b.ToTable("RepositorySettings");
543 });
544
545 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
546 {
547 b.Property<long>("Id")
548 .ValueGeneratedOnAdd()
549 .HasColumnType("INTEGER");
550
551 b.Property<long>("RevisionInformationId")
552 .HasColumnType("INTEGER");
553
554 b.Property<long>("TestMergeId")
555 .HasColumnType("INTEGER");
556
557 b.HasKey("Id");
558
559 b.HasIndex("RevisionInformationId");
560
561 b.HasIndex("TestMergeId");
562
563 b.ToTable("RevInfoTestMerges");
564 });
565
566 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
567 {
568 b.Property<long>("Id")
569 .ValueGeneratedOnAdd()
570 .HasColumnType("INTEGER");
571
572 b.Property<string>("CommitSha")
573 .IsRequired()
574 .HasColumnType("TEXT")
575 .HasMaxLength(40);
576
577 b.Property<long>("InstanceId")
578 .HasColumnType("INTEGER");
579
580 b.Property<string>("OriginCommitSha")
581 .IsRequired()
582 .HasColumnType("TEXT")
583 .HasMaxLength(40);
584
585 b.Property<DateTimeOffset>("Timestamp")
586 .HasColumnType("TEXT");
587
588 b.HasKey("Id");
589
590 b.HasIndex("InstanceId", "CommitSha")
591 .IsUnique();
592
593 b.ToTable("RevisionInformations");
594 });
595
596 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
597 {
598 b.Property<long>("Id")
599 .ValueGeneratedOnAdd()
600 .HasColumnType("INTEGER");
601
602 b.Property<string>("Author")
603 .IsRequired()
604 .HasColumnType("TEXT");
605
606 b.Property<string>("BodyAtMerge")
607 .IsRequired()
608 .HasColumnType("TEXT");
609
610 b.Property<string>("Comment")
611 .HasColumnType("TEXT")
612 .HasMaxLength(10000);
613
614 b.Property<DateTimeOffset>("MergedAt")
615 .HasColumnType("TEXT");
616
617 b.Property<long>("MergedById")
618 .HasColumnType("INTEGER");
619
620 b.Property<int>("Number")
621 .HasColumnType("INTEGER");
622
623 b.Property<long?>("PrimaryRevisionInformationId")
624 .IsRequired()
625 .HasColumnType("INTEGER");
626
627 b.Property<string>("TargetCommitSha")
628 .IsRequired()
629 .HasColumnType("TEXT")
630 .HasMaxLength(40);
631
632 b.Property<string>("TitleAtMerge")
633 .IsRequired()
634 .HasColumnType("TEXT");
635
636 b.Property<string>("Url")
637 .IsRequired()
638 .HasColumnType("TEXT");
639
640 b.HasKey("Id");
641
642 b.HasIndex("MergedById");
643
644 b.HasIndex("PrimaryRevisionInformationId")
645 .IsUnique();
646
647 b.ToTable("TestMerges");
648 });
649
650 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
651 {
652 b.Property<long?>("Id")
653 .ValueGeneratedOnAdd()
654 .HasColumnType("INTEGER");
655
656 b.Property<string>("CanonicalName")
657 .IsRequired()
658 .HasColumnType("TEXT")
659 .HasMaxLength(100);
660
661 b.Property<DateTimeOffset?>("CreatedAt")
662 .IsRequired()
663 .HasColumnType("TEXT");
664
665 b.Property<long?>("CreatedById")
666 .HasColumnType("INTEGER");
667
668 b.Property<bool?>("Enabled")
669 .IsRequired()
670 .HasColumnType("INTEGER");
671
672 b.Property<long?>("GroupId")
673 .HasColumnType("INTEGER");
674
675 b.Property<DateTimeOffset?>("LastPasswordUpdate")
676 .HasColumnType("TEXT");
677
678 b.Property<string>("Name")
679 .IsRequired()
680 .HasColumnType("TEXT")
681 .HasMaxLength(100);
682
683 b.Property<string>("PasswordHash")
684 .HasColumnType("TEXT");
685
686 b.Property<string>("SystemIdentifier")
687 .HasColumnType("TEXT")
688 .HasMaxLength(100);
689
690 b.HasKey("Id");
691
692 b.HasIndex("CanonicalName")
693 .IsUnique();
694
695 b.HasIndex("CreatedById");
696
697 b.HasIndex("GroupId");
698
699 b.HasIndex("SystemIdentifier")
700 .IsUnique();
701
702 b.ToTable("Users");
703 });
704
705 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
706 {
707 b.Property<long?>("Id")
708 .ValueGeneratedOnAdd()
709 .HasColumnType("INTEGER");
710
711 b.Property<string>("Name")
712 .IsRequired()
713 .HasColumnType("TEXT")
714 .HasMaxLength(100);
715
716 b.HasKey("Id");
717
718 b.HasIndex("Name")
719 .IsUnique();
720
721 b.ToTable("Groups");
722 });
723
724 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
725 {
726 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
727 .WithMany("ChatSettings")
728 .HasForeignKey("InstanceId")
729 .OnDelete(DeleteBehavior.Cascade)
730 .IsRequired();
731 });
732
733 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
734 {
735 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
736 .WithMany("Channels")
737 .HasForeignKey("ChatSettingsId")
738 .OnDelete(DeleteBehavior.Cascade)
739 .IsRequired();
740 });
741
742 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
743 {
744 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
745 .WithOne()
746 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
747 .OnDelete(DeleteBehavior.Cascade)
748 .IsRequired();
749
750 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
751 .WithMany("CompileJobs")
752 .HasForeignKey("RevisionInformationId")
753 .OnDelete(DeleteBehavior.ClientNoAction)
754 .IsRequired();
755 });
756
757 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
758 {
759 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
760 .WithOne("DreamDaemonSettings")
761 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
762 .OnDelete(DeleteBehavior.Cascade)
763 .IsRequired();
764 });
765
766 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
767 {
768 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
769 .WithOne("DreamMakerSettings")
770 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
771 .OnDelete(DeleteBehavior.Cascade)
772 .IsRequired();
773 });
774
775 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
776 {
777 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
778 .WithMany("InstancePermissionSets")
779 .HasForeignKey("InstanceId")
780 .OnDelete(DeleteBehavior.Cascade)
781 .IsRequired();
782
783 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
784 .WithMany("InstancePermissionSets")
785 .HasForeignKey("PermissionSetId")
786 .OnDelete(DeleteBehavior.Cascade)
787 .IsRequired();
788 });
789
790 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
791 {
792 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
793 .WithMany()
794 .HasForeignKey("CancelledById");
795
796 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
797 .WithMany("Jobs")
798 .HasForeignKey("InstanceId")
799 .OnDelete(DeleteBehavior.Cascade)
800 .IsRequired();
801
802 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
803 .WithMany()
804 .HasForeignKey("StartedById")
805 .OnDelete(DeleteBehavior.Cascade)
806 .IsRequired();
807 });
808
809 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
810 {
811 b.HasOne("Tgstation.Server.Host.Models.User", "User")
812 .WithMany("OAuthConnections")
813 .HasForeignKey("UserId")
814 .OnDelete(DeleteBehavior.Cascade);
815 });
816
817 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
818 {
819 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
820 .WithOne("PermissionSet")
821 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
822 .OnDelete(DeleteBehavior.Cascade);
823
824 b.HasOne("Tgstation.Server.Host.Models.User", "User")
825 .WithOne("PermissionSet")
826 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
827 .OnDelete(DeleteBehavior.Cascade);
828 });
829
830 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
831 {
832 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
833 .WithMany()
834 .HasForeignKey("CompileJobId")
835 .OnDelete(DeleteBehavior.Cascade)
836 .IsRequired();
837 });
838
839 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
840 {
841 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
842 .WithOne("RepositorySettings")
843 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
844 .OnDelete(DeleteBehavior.Cascade)
845 .IsRequired();
846 });
847
848 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
849 {
850 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
851 .WithMany("ActiveTestMerges")
852 .HasForeignKey("RevisionInformationId")
853 .OnDelete(DeleteBehavior.Cascade)
854 .IsRequired();
855
856 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
857 .WithMany("RevisonInformations")
858 .HasForeignKey("TestMergeId")
859 .OnDelete(DeleteBehavior.ClientNoAction)
860 .IsRequired();
861 });
862
863 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
864 {
865 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
866 .WithMany("RevisionInformations")
867 .HasForeignKey("InstanceId")
868 .OnDelete(DeleteBehavior.Cascade)
869 .IsRequired();
870 });
871
872 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
873 {
874 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
875 .WithMany("TestMerges")
876 .HasForeignKey("MergedById")
877 .OnDelete(DeleteBehavior.Restrict)
878 .IsRequired();
879
880 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
881 .WithOne("PrimaryTestMerge")
882 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
883 .OnDelete(DeleteBehavior.Cascade)
884 .IsRequired();
885 });
886
887 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
888 {
889 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
890 .WithMany("CreatedUsers")
891 .HasForeignKey("CreatedById");
892
893 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
894 .WithMany("Users")
895 .HasForeignKey("GroupId");
896 });
897#pragma warning restore 612, 618
898 }
899 }
900}