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