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