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