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