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