tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20201214182008_PGAddUserGroups.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("20201214182008_PGAddUserGroups")]
12 partial class PGAddUserGroups
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.HasKey("Id");
277
278 b.HasIndex("Path")
279 .IsUnique();
280
281 b.ToTable("Instances");
282 });
283
284 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
285 {
286 b.Property<long>("Id")
287 .ValueGeneratedOnAdd()
288 .HasColumnType("bigint")
289 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
290
291 b.Property<decimal>("ByondRights")
292 .HasColumnType("numeric(20,0)");
293
294 b.Property<decimal>("ChatBotRights")
295 .HasColumnType("numeric(20,0)");
296
297 b.Property<decimal>("ConfigurationRights")
298 .HasColumnType("numeric(20,0)");
299
300 b.Property<decimal>("DreamDaemonRights")
301 .HasColumnType("numeric(20,0)");
302
303 b.Property<decimal>("DreamMakerRights")
304 .HasColumnType("numeric(20,0)");
305
306 b.Property<long>("InstanceId")
307 .HasColumnType("bigint");
308
309 b.Property<decimal>("InstancePermissionSetRights")
310 .HasColumnType("numeric(20,0)");
311
312 b.Property<long>("PermissionSetId")
313 .HasColumnType("bigint");
314
315 b.Property<decimal>("RepositoryRights")
316 .HasColumnType("numeric(20,0)");
317
318 b.HasKey("Id");
319
320 b.HasIndex("InstanceId");
321
322 b.HasIndex("PermissionSetId", "InstanceId")
323 .IsUnique();
324
325 b.ToTable("InstancePermissionSets");
326 });
327
328 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
329 {
330 b.Property<long>("Id")
331 .ValueGeneratedOnAdd()
332 .HasColumnType("bigint")
333 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
334
335 b.Property<decimal?>("CancelRight")
336 .HasColumnType("numeric(20,0)");
337
338 b.Property<decimal?>("CancelRightsType")
339 .HasColumnType("numeric(20,0)");
340
341 b.Property<bool?>("Cancelled")
342 .IsRequired()
343 .HasColumnType("boolean");
344
345 b.Property<long?>("CancelledById")
346 .HasColumnType("bigint");
347
348 b.Property<string>("Description")
349 .IsRequired()
350 .HasColumnType("text");
351
352 b.Property<long?>("ErrorCode")
353 .HasColumnType("bigint");
354
355 b.Property<string>("ExceptionDetails")
356 .HasColumnType("text");
357
358 b.Property<long>("InstanceId")
359 .HasColumnType("bigint");
360
361 b.Property<DateTimeOffset?>("StartedAt")
362 .IsRequired()
363 .HasColumnType("timestamp with time zone");
364
365 b.Property<long>("StartedById")
366 .HasColumnType("bigint");
367
368 b.Property<DateTimeOffset?>("StoppedAt")
369 .HasColumnType("timestamp with time zone");
370
371 b.HasKey("Id");
372
373 b.HasIndex("CancelledById");
374
375 b.HasIndex("InstanceId");
376
377 b.HasIndex("StartedById");
378
379 b.ToTable("Jobs");
380 });
381
382 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
383 {
384 b.Property<long>("Id")
385 .ValueGeneratedOnAdd()
386 .HasColumnType("bigint")
387 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
388
389 b.Property<string>("ExternalUserId")
390 .IsRequired()
391 .HasColumnType("character varying(100)")
392 .HasMaxLength(100);
393
394 b.Property<int>("Provider")
395 .HasColumnType("integer");
396
397 b.Property<long?>("UserId")
398 .HasColumnType("bigint");
399
400 b.HasKey("Id");
401
402 b.HasIndex("UserId");
403
404 b.HasIndex("Provider", "ExternalUserId")
405 .IsUnique();
406
407 b.ToTable("OAuthConnections");
408 });
409
410 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
411 {
412 b.Property<long?>("Id")
413 .ValueGeneratedOnAdd()
414 .HasColumnType("bigint")
415 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
416
417 b.Property<decimal>("AdministrationRights")
418 .HasColumnType("numeric(20,0)");
419
420 b.Property<long?>("GroupId")
421 .HasColumnType("bigint");
422
423 b.Property<decimal>("InstanceManagerRights")
424 .HasColumnType("numeric(20,0)");
425
426 b.Property<long?>("UserId")
427 .HasColumnType("bigint");
428
429 b.HasKey("Id");
430
431 b.HasIndex("GroupId")
432 .IsUnique();
433
434 b.HasIndex("UserId")
435 .IsUnique();
436
437 b.ToTable("PermissionSets");
438 });
439
440 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
441 {
442 b.Property<long>("Id")
443 .ValueGeneratedOnAdd()
444 .HasColumnType("bigint")
445 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
446
447 b.Property<string>("AccessIdentifier")
448 .IsRequired()
449 .HasColumnType("text");
450
451 b.Property<long>("CompileJobId")
452 .HasColumnType("bigint");
453
454 b.Property<int>("LaunchSecurityLevel")
455 .HasColumnType("integer");
456
457 b.Property<int>("Port")
458 .HasColumnType("integer");
459
460 b.Property<int>("ProcessId")
461 .HasColumnType("integer");
462
463 b.Property<int>("RebootState")
464 .HasColumnType("integer");
465
466 b.HasKey("Id");
467
468 b.HasIndex("CompileJobId");
469
470 b.ToTable("ReattachInformations");
471 });
472
473 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
474 {
475 b.Property<long>("Id")
476 .ValueGeneratedOnAdd()
477 .HasColumnType("bigint")
478 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
479
480 b.Property<string>("AccessToken")
481 .HasColumnType("character varying(10000)")
482 .HasMaxLength(10000);
483
484 b.Property<string>("AccessUser")
485 .HasColumnType("character varying(10000)")
486 .HasMaxLength(10000);
487
488 b.Property<bool?>("AutoUpdatesKeepTestMerges")
489 .IsRequired()
490 .HasColumnType("boolean");
491
492 b.Property<bool?>("AutoUpdatesSynchronize")
493 .IsRequired()
494 .HasColumnType("boolean");
495
496 b.Property<string>("CommitterEmail")
497 .IsRequired()
498 .HasColumnType("character varying(10000)")
499 .HasMaxLength(10000);
500
501 b.Property<string>("CommitterName")
502 .IsRequired()
503 .HasColumnType("character varying(10000)")
504 .HasMaxLength(10000);
505
506 b.Property<bool?>("CreateGitHubDeployments")
507 .IsRequired()
508 .HasColumnType("boolean");
509
510 b.Property<long>("InstanceId")
511 .HasColumnType("bigint");
512
513 b.Property<bool?>("PostTestMergeComment")
514 .IsRequired()
515 .HasColumnType("boolean");
516
517 b.Property<bool?>("PushTestMergeCommits")
518 .IsRequired()
519 .HasColumnType("boolean");
520
521 b.Property<bool?>("ShowTestMergeCommitters")
522 .IsRequired()
523 .HasColumnType("boolean");
524
525 b.HasKey("Id");
526
527 b.HasIndex("InstanceId")
528 .IsUnique();
529
530 b.ToTable("RepositorySettings");
531 });
532
533 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
534 {
535 b.Property<long>("Id")
536 .ValueGeneratedOnAdd()
537 .HasColumnType("bigint")
538 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
539
540 b.Property<long>("RevisionInformationId")
541 .HasColumnType("bigint");
542
543 b.Property<long>("TestMergeId")
544 .HasColumnType("bigint");
545
546 b.HasKey("Id");
547
548 b.HasIndex("RevisionInformationId");
549
550 b.HasIndex("TestMergeId");
551
552 b.ToTable("RevInfoTestMerges");
553 });
554
555 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
556 {
557 b.Property<long>("Id")
558 .ValueGeneratedOnAdd()
559 .HasColumnType("bigint")
560 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
561
562 b.Property<string>("CommitSha")
563 .IsRequired()
564 .HasColumnType("character varying(40)")
565 .HasMaxLength(40);
566
567 b.Property<long>("InstanceId")
568 .HasColumnType("bigint");
569
570 b.Property<string>("OriginCommitSha")
571 .IsRequired()
572 .HasColumnType("character varying(40)")
573 .HasMaxLength(40);
574
575 b.HasKey("Id");
576
577 b.HasIndex("InstanceId", "CommitSha")
578 .IsUnique();
579
580 b.ToTable("RevisionInformations");
581 });
582
583 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
584 {
585 b.Property<long>("Id")
586 .ValueGeneratedOnAdd()
587 .HasColumnType("bigint")
588 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
589
590 b.Property<string>("Author")
591 .IsRequired()
592 .HasColumnType("text");
593
594 b.Property<string>("BodyAtMerge")
595 .IsRequired()
596 .HasColumnType("text");
597
598 b.Property<string>("Comment")
599 .HasColumnType("character varying(10000)")
600 .HasMaxLength(10000);
601
602 b.Property<DateTimeOffset>("MergedAt")
603 .HasColumnType("timestamp with time zone");
604
605 b.Property<long>("MergedById")
606 .HasColumnType("bigint");
607
608 b.Property<int>("Number")
609 .HasColumnType("integer");
610
611 b.Property<long?>("PrimaryRevisionInformationId")
612 .IsRequired()
613 .HasColumnType("bigint");
614
615 b.Property<string>("TargetCommitSha")
616 .IsRequired()
617 .HasColumnType("character varying(40)")
618 .HasMaxLength(40);
619
620 b.Property<string>("TitleAtMerge")
621 .IsRequired()
622 .HasColumnType("text");
623
624 b.Property<string>("Url")
625 .IsRequired()
626 .HasColumnType("text");
627
628 b.HasKey("Id");
629
630 b.HasIndex("MergedById");
631
632 b.HasIndex("PrimaryRevisionInformationId")
633 .IsUnique();
634
635 b.ToTable("TestMerges");
636 });
637
638 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
639 {
640 b.Property<long?>("Id")
641 .ValueGeneratedOnAdd()
642 .HasColumnType("bigint")
643 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
644
645 b.Property<string>("CanonicalName")
646 .IsRequired()
647 .HasColumnType("character varying(100)")
648 .HasMaxLength(100);
649
650 b.Property<DateTimeOffset?>("CreatedAt")
651 .IsRequired()
652 .HasColumnType("timestamp with time zone");
653
654 b.Property<long?>("CreatedById")
655 .HasColumnType("bigint");
656
657 b.Property<bool?>("Enabled")
658 .IsRequired()
659 .HasColumnType("boolean");
660
661 b.Property<long?>("GroupId")
662 .HasColumnType("bigint");
663
664 b.Property<DateTimeOffset?>("LastPasswordUpdate")
665 .HasColumnType("timestamp with time zone");
666
667 b.Property<string>("Name")
668 .IsRequired()
669 .HasColumnType("character varying(100)")
670 .HasMaxLength(100);
671
672 b.Property<string>("PasswordHash")
673 .HasColumnType("text");
674
675 b.Property<string>("SystemIdentifier")
676 .HasColumnType("character varying(100)")
677 .HasMaxLength(100);
678
679 b.HasKey("Id");
680
681 b.HasIndex("CanonicalName")
682 .IsUnique();
683
684 b.HasIndex("CreatedById");
685
686 b.HasIndex("GroupId");
687
688 b.HasIndex("SystemIdentifier")
689 .IsUnique();
690
691 b.ToTable("Users");
692 });
693
694 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
695 {
696 b.Property<long>("Id")
697 .ValueGeneratedOnAdd()
698 .HasColumnType("bigint")
699 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
700
701 b.Property<string>("Name")
702 .IsRequired()
703 .HasColumnType("character varying(100)")
704 .HasMaxLength(100);
705
706 b.HasKey("Id");
707
708 b.HasIndex("Name")
709 .IsUnique();
710
711 b.ToTable("Groups");
712 });
713
714 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
715 {
716 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
717 .WithMany("ChatSettings")
718 .HasForeignKey("InstanceId")
719 .OnDelete(DeleteBehavior.Cascade)
720 .IsRequired();
721 });
722
723 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
724 {
725 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
726 .WithMany("Channels")
727 .HasForeignKey("ChatSettingsId")
728 .OnDelete(DeleteBehavior.Cascade)
729 .IsRequired();
730 });
731
732 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
733 {
734 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
735 .WithOne()
736 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
737 .OnDelete(DeleteBehavior.Cascade)
738 .IsRequired();
739
740 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
741 .WithMany("CompileJobs")
742 .HasForeignKey("RevisionInformationId")
743 .OnDelete(DeleteBehavior.Cascade)
744 .IsRequired();
745 });
746
747 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
748 {
749 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
750 .WithOne("DreamDaemonSettings")
751 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
752 .OnDelete(DeleteBehavior.Cascade)
753 .IsRequired();
754 });
755
756 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
757 {
758 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
759 .WithOne("DreamMakerSettings")
760 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
761 .OnDelete(DeleteBehavior.Cascade)
762 .IsRequired();
763 });
764
765 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
766 {
767 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
768 .WithMany("InstancePermissionSets")
769 .HasForeignKey("InstanceId")
770 .OnDelete(DeleteBehavior.Cascade)
771 .IsRequired();
772
773 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
774 .WithMany("InstancePermissionSets")
775 .HasForeignKey("PermissionSetId")
776 .OnDelete(DeleteBehavior.Cascade)
777 .IsRequired();
778 });
779
780 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
781 {
782 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
783 .WithMany()
784 .HasForeignKey("CancelledById");
785
786 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
787 .WithMany("Jobs")
788 .HasForeignKey("InstanceId")
789 .OnDelete(DeleteBehavior.Cascade)
790 .IsRequired();
791
792 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
793 .WithMany()
794 .HasForeignKey("StartedById")
795 .OnDelete(DeleteBehavior.Cascade)
796 .IsRequired();
797 });
798
799 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
800 {
801 b.HasOne("Tgstation.Server.Host.Models.User", "User")
802 .WithMany("OAuthConnections")
803 .HasForeignKey("UserId")
804 .OnDelete(DeleteBehavior.Cascade);
805 });
806
807 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
808 {
809 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
810 .WithOne("PermissionSet")
811 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
812 .OnDelete(DeleteBehavior.Cascade);
813
814 b.HasOne("Tgstation.Server.Host.Models.User", "User")
815 .WithOne("PermissionSet")
816 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
817 .OnDelete(DeleteBehavior.Cascade);
818 });
819
820 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
821 {
822 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
823 .WithMany()
824 .HasForeignKey("CompileJobId")
825 .OnDelete(DeleteBehavior.Cascade)
826 .IsRequired();
827 });
828
829 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
830 {
831 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
832 .WithOne("RepositorySettings")
833 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
834 .OnDelete(DeleteBehavior.Cascade)
835 .IsRequired();
836 });
837
838 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
839 {
840 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
841 .WithMany("ActiveTestMerges")
842 .HasForeignKey("RevisionInformationId")
843 .OnDelete(DeleteBehavior.Cascade)
844 .IsRequired();
845
846 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
847 .WithMany("RevisonInformations")
848 .HasForeignKey("TestMergeId")
849 .OnDelete(DeleteBehavior.ClientNoAction)
850 .IsRequired();
851 });
852
853 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
854 {
855 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
856 .WithMany("RevisionInformations")
857 .HasForeignKey("InstanceId")
858 .OnDelete(DeleteBehavior.Cascade)
859 .IsRequired();
860 });
861
862 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
863 {
864 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
865 .WithMany("TestMerges")
866 .HasForeignKey("MergedById")
867 .OnDelete(DeleteBehavior.Restrict)
868 .IsRequired();
869
870 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
871 .WithOne("PrimaryTestMerge")
872 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
873 .OnDelete(DeleteBehavior.Cascade)
874 .IsRequired();
875 });
876
877 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
878 {
879 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
880 .WithMany("CreatedUsers")
881 .HasForeignKey("CreatedById");
882
883 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
884 .WithMany("Users")
885 .HasForeignKey("GroupId");
886 });
887#pragma warning restore 612, 618
888 }
889 }
890}