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