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