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