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