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