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