tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20240701235007_MSAddCronAutoUpdates.Designer.cs
Go to the documentation of this file.
1// <auto-generated />
2using System;
3
4using Microsoft.EntityFrameworkCore;
5using Microsoft.EntityFrameworkCore.Infrastructure;
6using Microsoft.EntityFrameworkCore.Migrations;
7
9{
10 [DbContext(typeof(SqlServerDatabaseContext))]
11 [Migration("20240701235007_MSAddCronAutoUpdates")]
12 partial class MSAddCronAutoUpdates
13 {
15 protected override void BuildTargetModel(ModelBuilder modelBuilder)
16 {
17#pragma warning disable 612, 618
18 modelBuilder
19 .HasAnnotation("ProductVersion", "8.0.6")
20 .HasAnnotation("Relational:MaxIdentifierLength", 128);
21
22 SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
23
24 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
25 {
26 b.Property<long?>("Id")
27 .ValueGeneratedOnAdd()
28 .HasColumnType("bigint");
29
30 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
31
32 b.Property<int>("ChannelLimit")
33 .HasColumnType("int");
34
35 b.Property<string>("ConnectionString")
36 .IsRequired()
37 .HasMaxLength(10000)
38 .HasColumnType("nvarchar(max)");
39
40 b.Property<bool?>("Enabled")
41 .HasColumnType("bit");
42
43 b.Property<long>("InstanceId")
44 .HasColumnType("bigint");
45
46 b.Property<string>("Name")
47 .IsRequired()
48 .HasMaxLength(100)
49 .HasColumnType("nvarchar(100)");
50
51 b.Property<int>("Provider")
52 .HasColumnType("int");
53
54 b.Property<long>("ReconnectionInterval")
55 .HasColumnType("bigint");
56
57 b.HasKey("Id");
58
59 b.HasIndex("InstanceId", "Name")
60 .IsUnique();
61
62 b.ToTable("ChatBots");
63 });
64
65 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
66 {
67 b.Property<long>("Id")
68 .ValueGeneratedOnAdd()
69 .HasColumnType("bigint");
70
71 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
72
73 b.Property<long>("ChatSettingsId")
74 .HasColumnType("bigint");
75
76 b.Property<decimal?>("DiscordChannelId")
77 .HasColumnType("decimal(20,0)");
78
79 b.Property<string>("IrcChannel")
80 .HasMaxLength(100)
81 .HasColumnType("nvarchar(100)");
82
83 b.Property<bool?>("IsAdminChannel")
84 .IsRequired()
85 .HasColumnType("bit");
86
87 b.Property<bool?>("IsSystemChannel")
88 .IsRequired()
89 .HasColumnType("bit");
90
91 b.Property<bool?>("IsUpdatesChannel")
92 .IsRequired()
93 .HasColumnType("bit");
94
95 b.Property<bool?>("IsWatchdogChannel")
96 .IsRequired()
97 .HasColumnType("bit");
98
99 b.Property<string>("Tag")
100 .HasMaxLength(10000)
101 .HasColumnType("nvarchar(max)");
102
103 b.HasKey("Id");
104
105 b.HasIndex("ChatSettingsId", "DiscordChannelId")
106 .IsUnique()
107 .HasFilter("[DiscordChannelId] IS NOT NULL");
108
109 b.HasIndex("ChatSettingsId", "IrcChannel")
110 .IsUnique()
111 .HasFilter("[IrcChannel] IS NOT NULL");
112
113 b.ToTable("ChatChannels");
114 });
115
116 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
117 {
118 b.Property<long?>("Id")
119 .ValueGeneratedOnAdd()
120 .HasColumnType("bigint");
121
122 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
123
124 b.Property<int?>("DMApiMajorVersion")
125 .HasColumnType("int");
126
127 b.Property<int?>("DMApiMinorVersion")
128 .HasColumnType("int");
129
130 b.Property<int?>("DMApiPatchVersion")
131 .HasColumnType("int");
132
133 b.Property<Guid?>("DirectoryName")
134 .IsRequired()
135 .HasColumnType("uniqueidentifier");
136
137 b.Property<string>("DmeName")
138 .IsRequired()
139 .HasColumnType("nvarchar(max)");
140
141 b.Property<string>("EngineVersion")
142 .IsRequired()
143 .HasColumnType("nvarchar(max)");
144
145 b.Property<long?>("GitHubDeploymentId")
146 .HasColumnType("bigint");
147
148 b.Property<long?>("GitHubRepoId")
149 .HasColumnType("bigint");
150
151 b.Property<long>("JobId")
152 .HasColumnType("bigint");
153
154 b.Property<int?>("MinimumSecurityLevel")
155 .HasColumnType("int");
156
157 b.Property<string>("Output")
158 .IsRequired()
159 .HasColumnType("nvarchar(max)");
160
161 b.Property<string>("RepositoryOrigin")
162 .HasColumnType("nvarchar(max)");
163
164 b.Property<long>("RevisionInformationId")
165 .HasColumnType("bigint");
166
167 b.HasKey("Id");
168
169 b.HasIndex("DirectoryName");
170
171 b.HasIndex("JobId")
172 .IsUnique();
173
174 b.HasIndex("RevisionInformationId");
175
176 b.ToTable("CompileJobs");
177 });
178
179 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
180 {
181 b.Property<long>("Id")
182 .ValueGeneratedOnAdd()
183 .HasColumnType("bigint");
184
185 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
186
187 b.Property<string>("AdditionalParameters")
188 .IsRequired()
189 .HasMaxLength(10000)
190 .HasColumnType("nvarchar(max)");
191
192 b.Property<bool?>("AllowWebClient")
193 .IsRequired()
194 .HasColumnType("bit");
195
196 b.Property<bool?>("AutoStart")
197 .IsRequired()
198 .HasColumnType("bit");
199
200 b.Property<bool?>("DumpOnHealthCheckRestart")
201 .IsRequired()
202 .HasColumnType("bit");
203
204 b.Property<long>("HealthCheckSeconds")
205 .HasColumnType("bigint");
206
207 b.Property<long>("InstanceId")
208 .HasColumnType("bigint");
209
210 b.Property<bool?>("LogOutput")
211 .IsRequired()
212 .HasColumnType("bit");
213
214 b.Property<long>("MapThreads")
215 .HasColumnType("bigint");
216
217 b.Property<bool?>("Minidumps")
218 .IsRequired()
219 .HasColumnType("bit");
220
221 b.Property<int>("Port")
222 .HasColumnType("int");
223
224 b.Property<int>("SecurityLevel")
225 .HasColumnType("int");
226
227 b.Property<bool?>("StartProfiler")
228 .IsRequired()
229 .HasColumnType("bit");
230
231 b.Property<long>("StartupTimeout")
232 .HasColumnType("bigint");
233
234 b.Property<long>("TopicRequestTimeout")
235 .HasColumnType("bigint");
236
237 b.Property<int>("Visibility")
238 .HasColumnType("int");
239
240 b.HasKey("Id");
241
242 b.HasIndex("InstanceId")
243 .IsUnique();
244
245 b.ToTable("DreamDaemonSettings");
246 });
247
248 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
249 {
250 b.Property<long>("Id")
251 .ValueGeneratedOnAdd()
252 .HasColumnType("bigint");
253
254 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
255
256 b.Property<int>("ApiValidationPort")
257 .HasColumnType("int");
258
259 b.Property<int>("ApiValidationSecurityLevel")
260 .HasColumnType("int");
261
262 b.Property<string>("CompilerAdditionalArguments")
263 .HasMaxLength(10000)
264 .HasColumnType("nvarchar(max)");
265
266 b.Property<long>("InstanceId")
267 .HasColumnType("bigint");
268
269 b.Property<string>("ProjectName")
270 .HasMaxLength(10000)
271 .HasColumnType("nvarchar(max)");
272
273 b.Property<bool?>("RequireDMApiValidation")
274 .IsRequired()
275 .HasColumnType("bit");
276
277 b.Property<TimeSpan?>("Timeout")
278 .IsRequired()
279 .HasColumnType("time");
280
281 b.HasKey("Id");
282
283 b.HasIndex("InstanceId")
284 .IsUnique();
285
286 b.ToTable("DreamMakerSettings");
287 });
288
289 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
290 {
291 b.Property<long?>("Id")
292 .ValueGeneratedOnAdd()
293 .HasColumnType("bigint");
294
295 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
296
297 b.Property<string>("AutoUpdateCron")
298 .IsRequired()
299 .HasMaxLength(10000)
300 .HasColumnType("nvarchar(max)");
301
302 b.Property<long>("AutoUpdateInterval")
303 .HasColumnType("bigint");
304
305 b.Property<int>("ChatBotLimit")
306 .HasColumnType("int");
307
308 b.Property<int>("ConfigurationType")
309 .HasColumnType("int");
310
311 b.Property<string>("Name")
312 .IsRequired()
313 .HasMaxLength(100)
314 .HasColumnType("nvarchar(100)");
315
316 b.Property<bool?>("Online")
317 .IsRequired()
318 .HasColumnType("bit");
319
320 b.Property<string>("Path")
321 .IsRequired()
322 .HasColumnType("nvarchar(450)");
323
324 b.Property<string>("SwarmIdentifer")
325 .HasColumnType("nvarchar(450)");
326
327 b.HasKey("Id");
328
329 b.HasIndex("Path", "SwarmIdentifer")
330 .IsUnique()
331 .HasFilter("[SwarmIdentifer] IS NOT NULL");
332
333 b.ToTable("Instances");
334 });
335
336 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
337 {
338 b.Property<long>("Id")
339 .ValueGeneratedOnAdd()
340 .HasColumnType("bigint");
341
342 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
343
344 b.Property<decimal>("ChatBotRights")
345 .HasColumnType("decimal(20,0)");
346
347 b.Property<decimal>("ConfigurationRights")
348 .HasColumnType("decimal(20,0)");
349
350 b.Property<decimal>("DreamDaemonRights")
351 .HasColumnType("decimal(20,0)");
352
353 b.Property<decimal>("DreamMakerRights")
354 .HasColumnType("decimal(20,0)");
355
356 b.Property<decimal>("EngineRights")
357 .HasColumnType("decimal(20,0)");
358
359 b.Property<long>("InstanceId")
360 .HasColumnType("bigint");
361
362 b.Property<decimal>("InstancePermissionSetRights")
363 .HasColumnType("decimal(20,0)");
364
365 b.Property<long>("PermissionSetId")
366 .HasColumnType("bigint");
367
368 b.Property<decimal>("RepositoryRights")
369 .HasColumnType("decimal(20,0)");
370
371 b.HasKey("Id");
372
373 b.HasIndex("InstanceId");
374
375 b.HasIndex("PermissionSetId", "InstanceId")
376 .IsUnique();
377
378 b.ToTable("InstancePermissionSets");
379 });
380
381 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
382 {
383 b.Property<long?>("Id")
384 .ValueGeneratedOnAdd()
385 .HasColumnType("bigint");
386
387 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
388
389 b.Property<decimal?>("CancelRight")
390 .HasColumnType("decimal(20,0)");
391
392 b.Property<decimal?>("CancelRightsType")
393 .HasColumnType("decimal(20,0)");
394
395 b.Property<bool?>("Cancelled")
396 .IsRequired()
397 .HasColumnType("bit");
398
399 b.Property<long?>("CancelledById")
400 .HasColumnType("bigint");
401
402 b.Property<string>("Description")
403 .IsRequired()
404 .HasColumnType("nvarchar(max)");
405
406 b.Property<long?>("ErrorCode")
407 .HasColumnType("bigint");
408
409 b.Property<string>("ExceptionDetails")
410 .HasColumnType("nvarchar(max)");
411
412 b.Property<long>("InstanceId")
413 .HasColumnType("bigint");
414
415 b.Property<byte>("JobCode")
416 .HasColumnType("tinyint");
417
418 b.Property<DateTimeOffset?>("StartedAt")
419 .IsRequired()
420 .HasColumnType("datetimeoffset");
421
422 b.Property<long>("StartedById")
423 .HasColumnType("bigint");
424
425 b.Property<DateTimeOffset?>("StoppedAt")
426 .HasColumnType("datetimeoffset");
427
428 b.HasKey("Id");
429
430 b.HasIndex("CancelledById");
431
432 b.HasIndex("InstanceId");
433
434 b.HasIndex("StartedById");
435
436 b.ToTable("Jobs");
437 });
438
439 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
440 {
441 b.Property<long>("Id")
442 .ValueGeneratedOnAdd()
443 .HasColumnType("bigint");
444
445 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
446
447 b.Property<string>("ExternalUserId")
448 .IsRequired()
449 .HasMaxLength(100)
450 .HasColumnType("nvarchar(100)");
451
452 b.Property<int>("Provider")
453 .HasColumnType("int");
454
455 b.Property<long?>("UserId")
456 .HasColumnType("bigint");
457
458 b.HasKey("Id");
459
460 b.HasIndex("UserId");
461
462 b.HasIndex("Provider", "ExternalUserId")
463 .IsUnique();
464
465 b.ToTable("OAuthConnections");
466 });
467
468 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
469 {
470 b.Property<long?>("Id")
471 .ValueGeneratedOnAdd()
472 .HasColumnType("bigint");
473
474 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
475
476 b.Property<decimal>("AdministrationRights")
477 .HasColumnType("decimal(20,0)");
478
479 b.Property<long?>("GroupId")
480 .HasColumnType("bigint");
481
482 b.Property<decimal>("InstanceManagerRights")
483 .HasColumnType("decimal(20,0)");
484
485 b.Property<long?>("UserId")
486 .HasColumnType("bigint");
487
488 b.HasKey("Id");
489
490 b.HasIndex("GroupId")
491 .IsUnique()
492 .HasFilter("[GroupId] IS NOT NULL");
493
494 b.HasIndex("UserId")
495 .IsUnique()
496 .HasFilter("[UserId] IS NOT NULL");
497
498 b.ToTable("PermissionSets");
499 });
500
501 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
502 {
503 b.Property<long?>("Id")
504 .ValueGeneratedOnAdd()
505 .HasColumnType("bigint");
506
507 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
508
509 b.Property<string>("AccessIdentifier")
510 .IsRequired()
511 .HasColumnType("nvarchar(max)");
512
513 b.Property<long>("CompileJobId")
514 .HasColumnType("bigint");
515
516 b.Property<long?>("InitialCompileJobId")
517 .HasColumnType("bigint");
518
519 b.Property<int>("LaunchSecurityLevel")
520 .HasColumnType("int");
521
522 b.Property<int>("LaunchVisibility")
523 .HasColumnType("int");
524
525 b.Property<int>("Port")
526 .HasColumnType("int");
527
528 b.Property<int>("ProcessId")
529 .HasColumnType("int");
530
531 b.Property<int>("RebootState")
532 .HasColumnType("int");
533
534 b.Property<int?>("TopicPort")
535 .HasColumnType("int");
536
537 b.HasKey("Id");
538
539 b.HasIndex("CompileJobId");
540
541 b.HasIndex("InitialCompileJobId");
542
543 b.ToTable("ReattachInformations");
544 });
545
546 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
547 {
548 b.Property<long>("Id")
549 .ValueGeneratedOnAdd()
550 .HasColumnType("bigint");
551
552 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
553
554 b.Property<string>("AccessToken")
555 .HasMaxLength(10000)
556 .HasColumnType("nvarchar(max)");
557
558 b.Property<string>("AccessUser")
559 .HasMaxLength(10000)
560 .HasColumnType("nvarchar(max)");
561
562 b.Property<bool?>("AutoUpdatesKeepTestMerges")
563 .IsRequired()
564 .HasColumnType("bit");
565
566 b.Property<bool?>("AutoUpdatesSynchronize")
567 .IsRequired()
568 .HasColumnType("bit");
569
570 b.Property<string>("CommitterEmail")
571 .IsRequired()
572 .HasMaxLength(10000)
573 .HasColumnType("nvarchar(max)");
574
575 b.Property<string>("CommitterName")
576 .IsRequired()
577 .HasMaxLength(10000)
578 .HasColumnType("nvarchar(max)");
579
580 b.Property<bool?>("CreateGitHubDeployments")
581 .IsRequired()
582 .HasColumnType("bit");
583
584 b.Property<long>("InstanceId")
585 .HasColumnType("bigint");
586
587 b.Property<bool?>("PostTestMergeComment")
588 .IsRequired()
589 .HasColumnType("bit");
590
591 b.Property<bool?>("PushTestMergeCommits")
592 .IsRequired()
593 .HasColumnType("bit");
594
595 b.Property<bool?>("ShowTestMergeCommitters")
596 .IsRequired()
597 .HasColumnType("bit");
598
599 b.Property<bool?>("UpdateSubmodules")
600 .IsRequired()
601 .HasColumnType("bit");
602
603 b.HasKey("Id");
604
605 b.HasIndex("InstanceId")
606 .IsUnique();
607
608 b.ToTable("RepositorySettings");
609 });
610
611 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
612 {
613 b.Property<long>("Id")
614 .ValueGeneratedOnAdd()
615 .HasColumnType("bigint");
616
617 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
618
619 b.Property<long>("RevisionInformationId")
620 .HasColumnType("bigint");
621
622 b.Property<long>("TestMergeId")
623 .HasColumnType("bigint");
624
625 b.HasKey("Id");
626
627 b.HasIndex("RevisionInformationId");
628
629 b.HasIndex("TestMergeId");
630
631 b.ToTable("RevInfoTestMerges");
632 });
633
634 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
635 {
636 b.Property<long>("Id")
637 .ValueGeneratedOnAdd()
638 .HasColumnType("bigint");
639
640 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
641
642 b.Property<string>("CommitSha")
643 .IsRequired()
644 .HasMaxLength(40)
645 .HasColumnType("nvarchar(40)");
646
647 b.Property<long>("InstanceId")
648 .HasColumnType("bigint");
649
650 b.Property<string>("OriginCommitSha")
651 .IsRequired()
652 .HasMaxLength(40)
653 .HasColumnType("nvarchar(40)");
654
655 b.Property<DateTimeOffset>("Timestamp")
656 .HasColumnType("datetimeoffset");
657
658 b.HasKey("Id");
659
660 b.HasIndex("InstanceId", "CommitSha")
661 .IsUnique();
662
663 b.ToTable("RevisionInformations");
664 });
665
666 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
667 {
668 b.Property<long>("Id")
669 .ValueGeneratedOnAdd()
670 .HasColumnType("bigint");
671
672 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
673
674 b.Property<string>("Author")
675 .IsRequired()
676 .HasColumnType("nvarchar(max)");
677
678 b.Property<string>("BodyAtMerge")
679 .IsRequired()
680 .HasColumnType("nvarchar(max)");
681
682 b.Property<string>("Comment")
683 .HasMaxLength(10000)
684 .HasColumnType("nvarchar(max)");
685
686 b.Property<DateTimeOffset>("MergedAt")
687 .HasColumnType("datetimeoffset");
688
689 b.Property<long>("MergedById")
690 .HasColumnType("bigint");
691
692 b.Property<int>("Number")
693 .HasColumnType("int");
694
695 b.Property<long?>("PrimaryRevisionInformationId")
696 .IsRequired()
697 .HasColumnType("bigint");
698
699 b.Property<string>("TargetCommitSha")
700 .IsRequired()
701 .HasMaxLength(40)
702 .HasColumnType("nvarchar(40)");
703
704 b.Property<string>("TitleAtMerge")
705 .IsRequired()
706 .HasColumnType("nvarchar(max)");
707
708 b.Property<string>("Url")
709 .IsRequired()
710 .HasColumnType("nvarchar(max)");
711
712 b.HasKey("Id");
713
714 b.HasIndex("MergedById");
715
716 b.HasIndex("PrimaryRevisionInformationId")
717 .IsUnique();
718
719 b.ToTable("TestMerges");
720 });
721
722 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
723 {
724 b.Property<long?>("Id")
725 .ValueGeneratedOnAdd()
726 .HasColumnType("bigint");
727
728 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
729
730 b.Property<string>("CanonicalName")
731 .IsRequired()
732 .HasMaxLength(100)
733 .HasColumnType("nvarchar(100)");
734
735 b.Property<DateTimeOffset?>("CreatedAt")
736 .IsRequired()
737 .HasColumnType("datetimeoffset");
738
739 b.Property<long?>("CreatedById")
740 .HasColumnType("bigint");
741
742 b.Property<bool?>("Enabled")
743 .IsRequired()
744 .HasColumnType("bit");
745
746 b.Property<long?>("GroupId")
747 .HasColumnType("bigint");
748
749 b.Property<DateTimeOffset?>("LastPasswordUpdate")
750 .HasColumnType("datetimeoffset");
751
752 b.Property<string>("Name")
753 .IsRequired()
754 .HasMaxLength(100)
755 .HasColumnType("nvarchar(100)");
756
757 b.Property<string>("PasswordHash")
758 .HasColumnType("nvarchar(max)");
759
760 b.Property<string>("SystemIdentifier")
761 .HasMaxLength(100)
762 .HasColumnType("nvarchar(100)");
763
764 b.HasKey("Id");
765
766 b.HasIndex("CanonicalName")
767 .IsUnique();
768
769 b.HasIndex("CreatedById");
770
771 b.HasIndex("GroupId");
772
773 b.HasIndex("SystemIdentifier")
774 .IsUnique()
775 .HasFilter("[SystemIdentifier] IS NOT NULL");
776
777 b.ToTable("Users");
778 });
779
780 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
781 {
782 b.Property<long?>("Id")
783 .ValueGeneratedOnAdd()
784 .HasColumnType("bigint");
785
786 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
787
788 b.Property<string>("Name")
789 .IsRequired()
790 .HasMaxLength(100)
791 .HasColumnType("nvarchar(100)");
792
793 b.HasKey("Id");
794
795 b.HasIndex("Name")
796 .IsUnique();
797
798 b.ToTable("Groups");
799 });
800
801 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
802 {
803 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
804 .WithMany("ChatSettings")
805 .HasForeignKey("InstanceId")
806 .OnDelete(DeleteBehavior.Cascade)
807 .IsRequired();
808
809 b.Navigation("Instance");
810 });
811
812 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
813 {
814 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
815 .WithMany("Channels")
816 .HasForeignKey("ChatSettingsId")
817 .OnDelete(DeleteBehavior.Cascade)
818 .IsRequired();
819
820 b.Navigation("ChatSettings");
821 });
822
823 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
824 {
825 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
826 .WithOne()
827 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
828 .OnDelete(DeleteBehavior.Cascade)
829 .IsRequired();
830
831 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
832 .WithMany("CompileJobs")
833 .HasForeignKey("RevisionInformationId")
834 .OnDelete(DeleteBehavior.ClientNoAction)
835 .IsRequired();
836
837 b.Navigation("Job");
838
839 b.Navigation("RevisionInformation");
840 });
841
842 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
843 {
844 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
845 .WithOne("DreamDaemonSettings")
846 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
847 .OnDelete(DeleteBehavior.Cascade)
848 .IsRequired();
849
850 b.Navigation("Instance");
851 });
852
853 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
854 {
855 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
856 .WithOne("DreamMakerSettings")
857 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
858 .OnDelete(DeleteBehavior.Cascade)
859 .IsRequired();
860
861 b.Navigation("Instance");
862 });
863
864 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
865 {
866 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
867 .WithMany("InstancePermissionSets")
868 .HasForeignKey("InstanceId")
869 .OnDelete(DeleteBehavior.Cascade)
870 .IsRequired();
871
872 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
873 .WithMany("InstancePermissionSets")
874 .HasForeignKey("PermissionSetId")
875 .OnDelete(DeleteBehavior.Cascade)
876 .IsRequired();
877
878 b.Navigation("Instance");
879
880 b.Navigation("PermissionSet");
881 });
882
883 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
884 {
885 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
886 .WithMany()
887 .HasForeignKey("CancelledById");
888
889 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
890 .WithMany("Jobs")
891 .HasForeignKey("InstanceId")
892 .OnDelete(DeleteBehavior.Cascade)
893 .IsRequired();
894
895 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
896 .WithMany()
897 .HasForeignKey("StartedById")
898 .OnDelete(DeleteBehavior.Cascade)
899 .IsRequired();
900
901 b.Navigation("CancelledBy");
902
903 b.Navigation("Instance");
904
905 b.Navigation("StartedBy");
906 });
907
908 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
909 {
910 b.HasOne("Tgstation.Server.Host.Models.User", "User")
911 .WithMany("OAuthConnections")
912 .HasForeignKey("UserId")
913 .OnDelete(DeleteBehavior.Cascade);
914
915 b.Navigation("User");
916 });
917
918 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
919 {
920 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
921 .WithOne("PermissionSet")
922 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
923 .OnDelete(DeleteBehavior.Cascade);
924
925 b.HasOne("Tgstation.Server.Host.Models.User", "User")
926 .WithOne("PermissionSet")
927 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
928 .OnDelete(DeleteBehavior.Cascade);
929
930 b.Navigation("Group");
931
932 b.Navigation("User");
933 });
934
935 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
936 {
937 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
938 .WithMany()
939 .HasForeignKey("CompileJobId")
940 .OnDelete(DeleteBehavior.Cascade)
941 .IsRequired();
942
943 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "InitialCompileJob")
944 .WithMany()
945 .HasForeignKey("InitialCompileJobId");
946
947 b.Navigation("CompileJob");
948
949 b.Navigation("InitialCompileJob");
950 });
951
952 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
953 {
954 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
955 .WithOne("RepositorySettings")
956 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
957 .OnDelete(DeleteBehavior.Cascade)
958 .IsRequired();
959
960 b.Navigation("Instance");
961 });
962
963 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
964 {
965 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
966 .WithMany("ActiveTestMerges")
967 .HasForeignKey("RevisionInformationId")
968 .OnDelete(DeleteBehavior.Cascade)
969 .IsRequired();
970
971 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
972 .WithMany("RevisonInformations")
973 .HasForeignKey("TestMergeId")
974 .OnDelete(DeleteBehavior.ClientNoAction)
975 .IsRequired();
976
977 b.Navigation("RevisionInformation");
978
979 b.Navigation("TestMerge");
980 });
981
982 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
983 {
984 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
985 .WithMany("RevisionInformations")
986 .HasForeignKey("InstanceId")
987 .OnDelete(DeleteBehavior.Cascade)
988 .IsRequired();
989
990 b.Navigation("Instance");
991 });
992
993 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
994 {
995 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
996 .WithMany("TestMerges")
997 .HasForeignKey("MergedById")
998 .OnDelete(DeleteBehavior.Restrict)
999 .IsRequired();
1000
1001 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
1002 .WithOne("PrimaryTestMerge")
1003 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
1004 .OnDelete(DeleteBehavior.Cascade)
1005 .IsRequired();
1006
1007 b.Navigation("MergedBy");
1008
1009 b.Navigation("PrimaryRevisionInformation");
1010 });
1011
1012 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1013 {
1014 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
1015 .WithMany("CreatedUsers")
1016 .HasForeignKey("CreatedById");
1017
1018 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
1019 .WithMany("Users")
1020 .HasForeignKey("GroupId");
1021
1022 b.Navigation("CreatedBy");
1023
1024 b.Navigation("Group");
1025 });
1026
1027 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
1028 {
1029 b.Navigation("Channels");
1030 });
1031
1032 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
1033 {
1034 b.Navigation("ChatSettings");
1035
1036 b.Navigation("DreamDaemonSettings");
1037
1038 b.Navigation("DreamMakerSettings");
1039
1040 b.Navigation("InstancePermissionSets");
1041
1042 b.Navigation("Jobs");
1043
1044 b.Navigation("RepositorySettings");
1045
1046 b.Navigation("RevisionInformations");
1047 });
1048
1049 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
1050 {
1051 b.Navigation("InstancePermissionSets");
1052 });
1053
1054 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1055 {
1056 b.Navigation("ActiveTestMerges");
1057
1058 b.Navigation("CompileJobs");
1059
1060 b.Navigation("PrimaryTestMerge");
1061 });
1062
1063 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1064 {
1065 b.Navigation("RevisonInformations");
1066 });
1067
1068 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1069 {
1070 b.Navigation("CreatedUsers");
1071
1072 b.Navigation("OAuthConnections");
1073
1074 b.Navigation("PermissionSet");
1075
1076 b.Navigation("TestMerges");
1077 });
1078
1079 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
1080 {
1081 b.Navigation("PermissionSet")
1082 .IsRequired();
1083
1084 b.Navigation("Users");
1085 });
1086#pragma warning restore 612, 618
1087 }
1088 }
1089}