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