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