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