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