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