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