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