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