tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20210211173222_MSTruncateInstanceNames.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("20210211173222_MSTruncateInstanceNames")]
12 partial class MSTruncateInstanceNames
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(100)")
268 .HasMaxLength(100);
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.Property<DateTimeOffset>("Timestamp")
584 .HasColumnType("datetimeoffset");
585
586 b.HasKey("Id");
587
588 b.HasIndex("InstanceId", "CommitSha")
589 .IsUnique();
590
591 b.ToTable("RevisionInformations");
592 });
593
594 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
595 {
596 b.Property<long>("Id")
597 .ValueGeneratedOnAdd()
598 .HasColumnType("bigint")
599 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
600
601 b.Property<string>("Author")
602 .IsRequired()
603 .HasColumnType("nvarchar(max)");
604
605 b.Property<string>("BodyAtMerge")
606 .IsRequired()
607 .HasColumnType("nvarchar(max)");
608
609 b.Property<string>("Comment")
610 .HasColumnType("nvarchar(max)")
611 .HasMaxLength(10000);
612
613 b.Property<DateTimeOffset>("MergedAt")
614 .HasColumnType("datetimeoffset");
615
616 b.Property<long>("MergedById")
617 .HasColumnType("bigint");
618
619 b.Property<int>("Number")
620 .HasColumnType("int");
621
622 b.Property<long?>("PrimaryRevisionInformationId")
623 .IsRequired()
624 .HasColumnType("bigint");
625
626 b.Property<string>("TargetCommitSha")
627 .IsRequired()
628 .HasColumnType("nvarchar(40)")
629 .HasMaxLength(40);
630
631 b.Property<string>("TitleAtMerge")
632 .IsRequired()
633 .HasColumnType("nvarchar(max)");
634
635 b.Property<string>("Url")
636 .IsRequired()
637 .HasColumnType("nvarchar(max)");
638
639 b.HasKey("Id");
640
641 b.HasIndex("MergedById");
642
643 b.HasIndex("PrimaryRevisionInformationId")
644 .IsUnique();
645
646 b.ToTable("TestMerges");
647 });
648
649 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
650 {
651 b.Property<long?>("Id")
652 .ValueGeneratedOnAdd()
653 .HasColumnType("bigint")
654 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
655
656 b.Property<string>("CanonicalName")
657 .IsRequired()
658 .HasColumnType("nvarchar(100)")
659 .HasMaxLength(100);
660
661 b.Property<DateTimeOffset?>("CreatedAt")
662 .IsRequired()
663 .HasColumnType("datetimeoffset");
664
665 b.Property<long?>("CreatedById")
666 .HasColumnType("bigint");
667
668 b.Property<bool?>("Enabled")
669 .IsRequired()
670 .HasColumnType("bit");
671
672 b.Property<long?>("GroupId")
673 .HasColumnType("bigint");
674
675 b.Property<DateTimeOffset?>("LastPasswordUpdate")
676 .HasColumnType("datetimeoffset");
677
678 b.Property<string>("Name")
679 .IsRequired()
680 .HasColumnType("nvarchar(100)")
681 .HasMaxLength(100);
682
683 b.Property<string>("PasswordHash")
684 .HasColumnType("nvarchar(max)");
685
686 b.Property<string>("SystemIdentifier")
687 .HasColumnType("nvarchar(100)")
688 .HasMaxLength(100);
689
690 b.HasKey("Id");
691
692 b.HasIndex("CanonicalName")
693 .IsUnique();
694
695 b.HasIndex("CreatedById");
696
697 b.HasIndex("GroupId");
698
699 b.HasIndex("SystemIdentifier")
700 .IsUnique()
701 .HasFilter("[SystemIdentifier] IS NOT NULL");
702
703 b.ToTable("Users");
704 });
705
706 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
707 {
708 b.Property<long?>("Id")
709 .ValueGeneratedOnAdd()
710 .HasColumnType("bigint")
711 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
712
713 b.Property<string>("Name")
714 .IsRequired()
715 .HasColumnType("nvarchar(100)")
716 .HasMaxLength(100);
717
718 b.HasKey("Id");
719
720 b.HasIndex("Name")
721 .IsUnique();
722
723 b.ToTable("Groups");
724 });
725
726 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
727 {
728 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
729 .WithMany("ChatSettings")
730 .HasForeignKey("InstanceId")
731 .OnDelete(DeleteBehavior.Cascade)
732 .IsRequired();
733 });
734
735 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
736 {
737 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
738 .WithMany("Channels")
739 .HasForeignKey("ChatSettingsId")
740 .OnDelete(DeleteBehavior.Cascade)
741 .IsRequired();
742 });
743
744 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
745 {
746 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
747 .WithOne()
748 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
749 .OnDelete(DeleteBehavior.Cascade)
750 .IsRequired();
751
752 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
753 .WithMany("CompileJobs")
754 .HasForeignKey("RevisionInformationId")
755 .OnDelete(DeleteBehavior.ClientNoAction)
756 .IsRequired();
757 });
758
759 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
760 {
761 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
762 .WithOne("DreamDaemonSettings")
763 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
764 .OnDelete(DeleteBehavior.Cascade)
765 .IsRequired();
766 });
767
768 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
769 {
770 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
771 .WithOne("DreamMakerSettings")
772 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
773 .OnDelete(DeleteBehavior.Cascade)
774 .IsRequired();
775 });
776
777 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
778 {
779 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
780 .WithMany("InstancePermissionSets")
781 .HasForeignKey("InstanceId")
782 .OnDelete(DeleteBehavior.Cascade)
783 .IsRequired();
784
785 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
786 .WithMany("InstancePermissionSets")
787 .HasForeignKey("PermissionSetId")
788 .OnDelete(DeleteBehavior.Cascade)
789 .IsRequired();
790 });
791
792 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
793 {
794 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
795 .WithMany()
796 .HasForeignKey("CancelledById");
797
798 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
799 .WithMany("Jobs")
800 .HasForeignKey("InstanceId")
801 .OnDelete(DeleteBehavior.Cascade)
802 .IsRequired();
803
804 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
805 .WithMany()
806 .HasForeignKey("StartedById")
807 .OnDelete(DeleteBehavior.Cascade)
808 .IsRequired();
809 });
810
811 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
812 {
813 b.HasOne("Tgstation.Server.Host.Models.User", "User")
814 .WithMany("OAuthConnections")
815 .HasForeignKey("UserId")
816 .OnDelete(DeleteBehavior.Cascade);
817 });
818
819 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
820 {
821 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
822 .WithOne("PermissionSet")
823 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
824 .OnDelete(DeleteBehavior.Cascade);
825
826 b.HasOne("Tgstation.Server.Host.Models.User", "User")
827 .WithOne("PermissionSet")
828 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
829 .OnDelete(DeleteBehavior.Cascade);
830 });
831
832 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
833 {
834 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
835 .WithMany()
836 .HasForeignKey("CompileJobId")
837 .OnDelete(DeleteBehavior.Cascade)
838 .IsRequired();
839 });
840
841 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
842 {
843 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
844 .WithOne("RepositorySettings")
845 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
846 .OnDelete(DeleteBehavior.Cascade)
847 .IsRequired();
848 });
849
850 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
851 {
852 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
853 .WithMany("ActiveTestMerges")
854 .HasForeignKey("RevisionInformationId")
855 .OnDelete(DeleteBehavior.Cascade)
856 .IsRequired();
857
858 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
859 .WithMany("RevisonInformations")
860 .HasForeignKey("TestMergeId")
861 .OnDelete(DeleteBehavior.ClientNoAction)
862 .IsRequired();
863 });
864
865 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
866 {
867 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
868 .WithMany("RevisionInformations")
869 .HasForeignKey("InstanceId")
870 .OnDelete(DeleteBehavior.Cascade)
871 .IsRequired();
872 });
873
874 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
875 {
876 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
877 .WithMany("TestMerges")
878 .HasForeignKey("MergedById")
879 .OnDelete(DeleteBehavior.Restrict)
880 .IsRequired();
881
882 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
883 .WithOne("PrimaryTestMerge")
884 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
885 .OnDelete(DeleteBehavior.Cascade)
886 .IsRequired();
887 });
888
889 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
890 {
891 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
892 .WithMany("CreatedUsers")
893 .HasForeignKey("CreatedById");
894
895 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
896 .WithMany("Users")
897 .HasForeignKey("GroupId");
898 });
899#pragma warning restore 612, 618
900 }
901 }
902}