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