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