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