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