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