tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20241103161845_MSAddAutoStartAndStop.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("20241103161845_MSAddAutoStartAndStop")]
12 partial class MSAddAutoStartAndStop
13 {
15 protected override void BuildTargetModel(ModelBuilder modelBuilder)
16 {
17#pragma warning disable 612, 618
18 modelBuilder
19 .HasAnnotation("ProductVersion", "8.0.10")
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>("OpenDreamTopicPort")
222 .HasColumnType("int");
223
224 b.Property<int>("Port")
225 .HasColumnType("int");
226
227 b.Property<int>("SecurityLevel")
228 .HasColumnType("int");
229
230 b.Property<bool?>("StartProfiler")
231 .IsRequired()
232 .HasColumnType("bit");
233
234 b.Property<long>("StartupTimeout")
235 .HasColumnType("bigint");
236
237 b.Property<long>("TopicRequestTimeout")
238 .HasColumnType("bigint");
239
240 b.Property<int>("Visibility")
241 .HasColumnType("int");
242
243 b.HasKey("Id");
244
245 b.HasIndex("InstanceId")
246 .IsUnique();
247
248 b.ToTable("DreamDaemonSettings");
249 });
250
251 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
252 {
253 b.Property<long>("Id")
254 .ValueGeneratedOnAdd()
255 .HasColumnType("bigint");
256
257 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
258
259 b.Property<int>("ApiValidationPort")
260 .HasColumnType("int");
261
262 b.Property<int>("ApiValidationSecurityLevel")
263 .HasColumnType("int");
264
265 b.Property<string>("CompilerAdditionalArguments")
266 .HasMaxLength(10000)
267 .HasColumnType("nvarchar(max)");
268
269 b.Property<int>("DMApiValidationMode")
270 .HasColumnType("int");
271
272 b.Property<long>("InstanceId")
273 .HasColumnType("bigint");
274
275 b.Property<string>("ProjectName")
276 .HasMaxLength(10000)
277 .HasColumnType("nvarchar(max)");
278
279 b.Property<TimeSpan?>("Timeout")
280 .IsRequired()
281 .HasColumnType("time");
282
283 b.HasKey("Id");
284
285 b.HasIndex("InstanceId")
286 .IsUnique();
287
288 b.ToTable("DreamMakerSettings");
289 });
290
291 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
292 {
293 b.Property<long?>("Id")
294 .ValueGeneratedOnAdd()
295 .HasColumnType("bigint");
296
297 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
298
299 b.Property<string>("AutoStartCron")
300 .IsRequired()
301 .HasMaxLength(1000)
302 .HasColumnType("nvarchar(1000)");
303
304 b.Property<string>("AutoStopCron")
305 .IsRequired()
306 .HasMaxLength(1000)
307 .HasColumnType("nvarchar(1000)");
308
309 b.Property<string>("AutoUpdateCron")
310 .IsRequired()
311 .HasMaxLength(1000)
312 .HasColumnType("nvarchar(1000)");
313
314 b.Property<long>("AutoUpdateInterval")
315 .HasColumnType("bigint");
316
317 b.Property<int>("ChatBotLimit")
318 .HasColumnType("int");
319
320 b.Property<int>("ConfigurationType")
321 .HasColumnType("int");
322
323 b.Property<string>("Name")
324 .IsRequired()
325 .HasMaxLength(100)
326 .HasColumnType("nvarchar(100)");
327
328 b.Property<bool?>("Online")
329 .IsRequired()
330 .HasColumnType("bit");
331
332 b.Property<string>("Path")
333 .IsRequired()
334 .HasColumnType("nvarchar(450)");
335
336 b.Property<string>("SwarmIdentifer")
337 .HasColumnType("nvarchar(450)");
338
339 b.HasKey("Id");
340
341 b.HasIndex("Path", "SwarmIdentifer")
342 .IsUnique()
343 .HasFilter("[SwarmIdentifer] IS NOT NULL");
344
345 b.ToTable("Instances");
346 });
347
348 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
349 {
350 b.Property<long>("Id")
351 .ValueGeneratedOnAdd()
352 .HasColumnType("bigint");
353
354 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
355
356 b.Property<decimal>("ChatBotRights")
357 .HasColumnType("decimal(20,0)");
358
359 b.Property<decimal>("ConfigurationRights")
360 .HasColumnType("decimal(20,0)");
361
362 b.Property<decimal>("DreamDaemonRights")
363 .HasColumnType("decimal(20,0)");
364
365 b.Property<decimal>("DreamMakerRights")
366 .HasColumnType("decimal(20,0)");
367
368 b.Property<decimal>("EngineRights")
369 .HasColumnType("decimal(20,0)");
370
371 b.Property<long>("InstanceId")
372 .HasColumnType("bigint");
373
374 b.Property<decimal>("InstancePermissionSetRights")
375 .HasColumnType("decimal(20,0)");
376
377 b.Property<long>("PermissionSetId")
378 .HasColumnType("bigint");
379
380 b.Property<decimal>("RepositoryRights")
381 .HasColumnType("decimal(20,0)");
382
383 b.HasKey("Id");
384
385 b.HasIndex("InstanceId");
386
387 b.HasIndex("PermissionSetId", "InstanceId")
388 .IsUnique();
389
390 b.ToTable("InstancePermissionSets");
391 });
392
393 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
394 {
395 b.Property<long?>("Id")
396 .ValueGeneratedOnAdd()
397 .HasColumnType("bigint");
398
399 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
400
401 b.Property<decimal?>("CancelRight")
402 .HasColumnType("decimal(20,0)");
403
404 b.Property<decimal?>("CancelRightsType")
405 .HasColumnType("decimal(20,0)");
406
407 b.Property<bool?>("Cancelled")
408 .IsRequired()
409 .HasColumnType("bit");
410
411 b.Property<long?>("CancelledById")
412 .HasColumnType("bigint");
413
414 b.Property<string>("Description")
415 .IsRequired()
416 .HasColumnType("nvarchar(max)");
417
418 b.Property<long?>("ErrorCode")
419 .HasColumnType("bigint");
420
421 b.Property<string>("ExceptionDetails")
422 .HasColumnType("nvarchar(max)");
423
424 b.Property<long>("InstanceId")
425 .HasColumnType("bigint");
426
427 b.Property<byte>("JobCode")
428 .HasColumnType("tinyint");
429
430 b.Property<DateTimeOffset?>("StartedAt")
431 .IsRequired()
432 .HasColumnType("datetimeoffset");
433
434 b.Property<long>("StartedById")
435 .HasColumnType("bigint");
436
437 b.Property<DateTimeOffset?>("StoppedAt")
438 .HasColumnType("datetimeoffset");
439
440 b.HasKey("Id");
441
442 b.HasIndex("CancelledById");
443
444 b.HasIndex("InstanceId");
445
446 b.HasIndex("StartedById");
447
448 b.ToTable("Jobs");
449 });
450
451 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
452 {
453 b.Property<long>("Id")
454 .ValueGeneratedOnAdd()
455 .HasColumnType("bigint");
456
457 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
458
459 b.Property<string>("ExternalUserId")
460 .IsRequired()
461 .HasMaxLength(100)
462 .HasColumnType("nvarchar(100)");
463
464 b.Property<int>("Provider")
465 .HasColumnType("int");
466
467 b.Property<long>("UserId")
468 .HasColumnType("bigint");
469
470 b.HasKey("Id");
471
472 b.HasIndex("UserId");
473
474 b.HasIndex("Provider", "ExternalUserId")
475 .IsUnique();
476
477 b.ToTable("OAuthConnections");
478 });
479
480 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
481 {
482 b.Property<long?>("Id")
483 .ValueGeneratedOnAdd()
484 .HasColumnType("bigint");
485
486 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
487
488 b.Property<decimal>("AdministrationRights")
489 .HasColumnType("decimal(20,0)");
490
491 b.Property<long?>("GroupId")
492 .HasColumnType("bigint");
493
494 b.Property<decimal>("InstanceManagerRights")
495 .HasColumnType("decimal(20,0)");
496
497 b.Property<long?>("UserId")
498 .HasColumnType("bigint");
499
500 b.HasKey("Id");
501
502 b.HasIndex("GroupId")
503 .IsUnique()
504 .HasFilter("[GroupId] IS NOT NULL");
505
506 b.HasIndex("UserId")
507 .IsUnique()
508 .HasFilter("[UserId] IS NOT NULL");
509
510 b.ToTable("PermissionSets");
511 });
512
513 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
514 {
515 b.Property<long?>("Id")
516 .ValueGeneratedOnAdd()
517 .HasColumnType("bigint");
518
519 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
520
521 b.Property<string>("AccessIdentifier")
522 .IsRequired()
523 .HasColumnType("nvarchar(max)");
524
525 b.Property<long>("CompileJobId")
526 .HasColumnType("bigint");
527
528 b.Property<long?>("InitialCompileJobId")
529 .HasColumnType("bigint");
530
531 b.Property<int>("LaunchSecurityLevel")
532 .HasColumnType("int");
533
534 b.Property<int>("LaunchVisibility")
535 .HasColumnType("int");
536
537 b.Property<int>("Port")
538 .HasColumnType("int");
539
540 b.Property<int>("ProcessId")
541 .HasColumnType("int");
542
543 b.Property<int>("RebootState")
544 .HasColumnType("int");
545
546 b.Property<int?>("TopicPort")
547 .HasColumnType("int");
548
549 b.HasKey("Id");
550
551 b.HasIndex("CompileJobId");
552
553 b.HasIndex("InitialCompileJobId");
554
555 b.ToTable("ReattachInformations");
556 });
557
558 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
559 {
560 b.Property<long>("Id")
561 .ValueGeneratedOnAdd()
562 .HasColumnType("bigint");
563
564 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
565
566 b.Property<string>("AccessToken")
567 .HasMaxLength(10000)
568 .HasColumnType("nvarchar(max)");
569
570 b.Property<string>("AccessUser")
571 .HasMaxLength(10000)
572 .HasColumnType("nvarchar(max)");
573
574 b.Property<bool?>("AutoUpdatesKeepTestMerges")
575 .IsRequired()
576 .HasColumnType("bit");
577
578 b.Property<bool?>("AutoUpdatesSynchronize")
579 .IsRequired()
580 .HasColumnType("bit");
581
582 b.Property<string>("CommitterEmail")
583 .IsRequired()
584 .HasMaxLength(10000)
585 .HasColumnType("nvarchar(max)");
586
587 b.Property<string>("CommitterName")
588 .IsRequired()
589 .HasMaxLength(10000)
590 .HasColumnType("nvarchar(max)");
591
592 b.Property<bool?>("CreateGitHubDeployments")
593 .IsRequired()
594 .HasColumnType("bit");
595
596 b.Property<long>("InstanceId")
597 .HasColumnType("bigint");
598
599 b.Property<bool?>("PostTestMergeComment")
600 .IsRequired()
601 .HasColumnType("bit");
602
603 b.Property<bool?>("PushTestMergeCommits")
604 .IsRequired()
605 .HasColumnType("bit");
606
607 b.Property<bool?>("ShowTestMergeCommitters")
608 .IsRequired()
609 .HasColumnType("bit");
610
611 b.Property<bool?>("UpdateSubmodules")
612 .IsRequired()
613 .HasColumnType("bit");
614
615 b.HasKey("Id");
616
617 b.HasIndex("InstanceId")
618 .IsUnique();
619
620 b.ToTable("RepositorySettings");
621 });
622
623 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
624 {
625 b.Property<long>("Id")
626 .ValueGeneratedOnAdd()
627 .HasColumnType("bigint");
628
629 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
630
631 b.Property<long>("RevisionInformationId")
632 .HasColumnType("bigint");
633
634 b.Property<long>("TestMergeId")
635 .HasColumnType("bigint");
636
637 b.HasKey("Id");
638
639 b.HasIndex("RevisionInformationId");
640
641 b.HasIndex("TestMergeId");
642
643 b.ToTable("RevInfoTestMerges");
644 });
645
646 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
647 {
648 b.Property<long>("Id")
649 .ValueGeneratedOnAdd()
650 .HasColumnType("bigint");
651
652 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
653
654 b.Property<string>("CommitSha")
655 .IsRequired()
656 .HasMaxLength(40)
657 .HasColumnType("nvarchar(40)");
658
659 b.Property<long>("InstanceId")
660 .HasColumnType("bigint");
661
662 b.Property<string>("OriginCommitSha")
663 .IsRequired()
664 .HasMaxLength(40)
665 .HasColumnType("nvarchar(40)");
666
667 b.Property<DateTimeOffset>("Timestamp")
668 .HasColumnType("datetimeoffset");
669
670 b.HasKey("Id");
671
672 b.HasIndex("InstanceId", "CommitSha")
673 .IsUnique();
674
675 b.ToTable("RevisionInformations");
676 });
677
678 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
679 {
680 b.Property<long>("Id")
681 .ValueGeneratedOnAdd()
682 .HasColumnType("bigint");
683
684 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
685
686 b.Property<string>("Author")
687 .IsRequired()
688 .HasColumnType("nvarchar(max)");
689
690 b.Property<string>("BodyAtMerge")
691 .IsRequired()
692 .HasColumnType("nvarchar(max)");
693
694 b.Property<string>("Comment")
695 .HasMaxLength(10000)
696 .HasColumnType("nvarchar(max)");
697
698 b.Property<DateTimeOffset>("MergedAt")
699 .HasColumnType("datetimeoffset");
700
701 b.Property<long>("MergedById")
702 .HasColumnType("bigint");
703
704 b.Property<int>("Number")
705 .HasColumnType("int");
706
707 b.Property<long?>("PrimaryRevisionInformationId")
708 .IsRequired()
709 .HasColumnType("bigint");
710
711 b.Property<string>("TargetCommitSha")
712 .IsRequired()
713 .HasMaxLength(40)
714 .HasColumnType("nvarchar(40)");
715
716 b.Property<string>("TitleAtMerge")
717 .IsRequired()
718 .HasColumnType("nvarchar(max)");
719
720 b.Property<string>("Url")
721 .IsRequired()
722 .HasColumnType("nvarchar(max)");
723
724 b.HasKey("Id");
725
726 b.HasIndex("MergedById");
727
728 b.HasIndex("PrimaryRevisionInformationId")
729 .IsUnique();
730
731 b.ToTable("TestMerges");
732 });
733
734 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
735 {
736 b.Property<long?>("Id")
737 .ValueGeneratedOnAdd()
738 .HasColumnType("bigint");
739
740 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
741
742 b.Property<string>("CanonicalName")
743 .IsRequired()
744 .HasMaxLength(100)
745 .HasColumnType("nvarchar(100)");
746
747 b.Property<DateTimeOffset?>("CreatedAt")
748 .IsRequired()
749 .HasColumnType("datetimeoffset");
750
751 b.Property<long?>("CreatedById")
752 .HasColumnType("bigint");
753
754 b.Property<bool?>("Enabled")
755 .IsRequired()
756 .HasColumnType("bit");
757
758 b.Property<long?>("GroupId")
759 .HasColumnType("bigint");
760
761 b.Property<DateTimeOffset?>("LastPasswordUpdate")
762 .HasColumnType("datetimeoffset");
763
764 b.Property<string>("Name")
765 .IsRequired()
766 .HasMaxLength(100)
767 .HasColumnType("nvarchar(100)");
768
769 b.Property<string>("PasswordHash")
770 .HasColumnType("nvarchar(max)");
771
772 b.Property<string>("SystemIdentifier")
773 .HasMaxLength(100)
774 .HasColumnType("nvarchar(100)");
775
776 b.HasKey("Id");
777
778 b.HasIndex("CanonicalName")
779 .IsUnique();
780
781 b.HasIndex("CreatedById");
782
783 b.HasIndex("GroupId");
784
785 b.HasIndex("SystemIdentifier")
786 .IsUnique()
787 .HasFilter("[SystemIdentifier] IS NOT NULL");
788
789 b.ToTable("Users");
790 });
791
792 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
793 {
794 b.Property<long?>("Id")
795 .ValueGeneratedOnAdd()
796 .HasColumnType("bigint");
797
798 SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long?>("Id"));
799
800 b.Property<string>("Name")
801 .IsRequired()
802 .HasMaxLength(100)
803 .HasColumnType("nvarchar(100)");
804
805 b.HasKey("Id");
806
807 b.HasIndex("Name")
808 .IsUnique();
809
810 b.ToTable("Groups");
811 });
812
813 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
814 {
815 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
816 .WithMany("ChatSettings")
817 .HasForeignKey("InstanceId")
818 .OnDelete(DeleteBehavior.Cascade)
819 .IsRequired();
820
821 b.Navigation("Instance");
822 });
823
824 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
825 {
826 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
827 .WithMany("Channels")
828 .HasForeignKey("ChatSettingsId")
829 .OnDelete(DeleteBehavior.Cascade)
830 .IsRequired();
831
832 b.Navigation("ChatSettings");
833 });
834
835 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
836 {
837 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
838 .WithOne()
839 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
840 .OnDelete(DeleteBehavior.Cascade)
841 .IsRequired();
842
843 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
844 .WithMany("CompileJobs")
845 .HasForeignKey("RevisionInformationId")
846 .OnDelete(DeleteBehavior.ClientNoAction)
847 .IsRequired();
848
849 b.Navigation("Job");
850
851 b.Navigation("RevisionInformation");
852 });
853
854 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
855 {
856 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
857 .WithOne("DreamDaemonSettings")
858 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
859 .OnDelete(DeleteBehavior.Cascade)
860 .IsRequired();
861
862 b.Navigation("Instance");
863 });
864
865 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
866 {
867 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
868 .WithOne("DreamMakerSettings")
869 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
870 .OnDelete(DeleteBehavior.Cascade)
871 .IsRequired();
872
873 b.Navigation("Instance");
874 });
875
876 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
877 {
878 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
879 .WithMany("InstancePermissionSets")
880 .HasForeignKey("InstanceId")
881 .OnDelete(DeleteBehavior.Cascade)
882 .IsRequired();
883
884 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
885 .WithMany("InstancePermissionSets")
886 .HasForeignKey("PermissionSetId")
887 .OnDelete(DeleteBehavior.Cascade)
888 .IsRequired();
889
890 b.Navigation("Instance");
891
892 b.Navigation("PermissionSet");
893 });
894
895 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
896 {
897 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
898 .WithMany()
899 .HasForeignKey("CancelledById");
900
901 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
902 .WithMany("Jobs")
903 .HasForeignKey("InstanceId")
904 .OnDelete(DeleteBehavior.Cascade)
905 .IsRequired();
906
907 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
908 .WithMany()
909 .HasForeignKey("StartedById")
910 .OnDelete(DeleteBehavior.Cascade)
911 .IsRequired();
912
913 b.Navigation("CancelledBy");
914
915 b.Navigation("Instance");
916
917 b.Navigation("StartedBy");
918 });
919
920 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
921 {
922 b.HasOne("Tgstation.Server.Host.Models.User", "User")
923 .WithMany("OAuthConnections")
924 .HasForeignKey("UserId")
925 .OnDelete(DeleteBehavior.Cascade)
926 .IsRequired();
927
928 b.Navigation("User");
929 });
930
931 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
932 {
933 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
934 .WithOne("PermissionSet")
935 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
936 .OnDelete(DeleteBehavior.Cascade);
937
938 b.HasOne("Tgstation.Server.Host.Models.User", "User")
939 .WithOne("PermissionSet")
940 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
941 .OnDelete(DeleteBehavior.Cascade);
942
943 b.Navigation("Group");
944
945 b.Navigation("User");
946 });
947
948 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
949 {
950 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
951 .WithMany()
952 .HasForeignKey("CompileJobId")
953 .OnDelete(DeleteBehavior.Cascade)
954 .IsRequired();
955
956 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "InitialCompileJob")
957 .WithMany()
958 .HasForeignKey("InitialCompileJobId");
959
960 b.Navigation("CompileJob");
961
962 b.Navigation("InitialCompileJob");
963 });
964
965 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
966 {
967 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
968 .WithOne("RepositorySettings")
969 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
970 .OnDelete(DeleteBehavior.Cascade)
971 .IsRequired();
972
973 b.Navigation("Instance");
974 });
975
976 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
977 {
978 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
979 .WithMany("ActiveTestMerges")
980 .HasForeignKey("RevisionInformationId")
981 .OnDelete(DeleteBehavior.Cascade)
982 .IsRequired();
983
984 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
985 .WithMany("RevisonInformations")
986 .HasForeignKey("TestMergeId")
987 .OnDelete(DeleteBehavior.ClientNoAction)
988 .IsRequired();
989
990 b.Navigation("RevisionInformation");
991
992 b.Navigation("TestMerge");
993 });
994
995 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
996 {
997 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
998 .WithMany("RevisionInformations")
999 .HasForeignKey("InstanceId")
1000 .OnDelete(DeleteBehavior.Cascade)
1001 .IsRequired();
1002
1003 b.Navigation("Instance");
1004 });
1005
1006 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1007 {
1008 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
1009 .WithMany("TestMerges")
1010 .HasForeignKey("MergedById")
1011 .OnDelete(DeleteBehavior.Restrict)
1012 .IsRequired();
1013
1014 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
1015 .WithOne("PrimaryTestMerge")
1016 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
1017 .OnDelete(DeleteBehavior.Cascade)
1018 .IsRequired();
1019
1020 b.Navigation("MergedBy");
1021
1022 b.Navigation("PrimaryRevisionInformation");
1023 });
1024
1025 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1026 {
1027 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
1028 .WithMany("CreatedUsers")
1029 .HasForeignKey("CreatedById");
1030
1031 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
1032 .WithMany("Users")
1033 .HasForeignKey("GroupId");
1034
1035 b.Navigation("CreatedBy");
1036
1037 b.Navigation("Group");
1038 });
1039
1040 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
1041 {
1042 b.Navigation("Channels");
1043 });
1044
1045 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
1046 {
1047 b.Navigation("ChatSettings");
1048
1049 b.Navigation("DreamDaemonSettings");
1050
1051 b.Navigation("DreamMakerSettings");
1052
1053 b.Navigation("InstancePermissionSets");
1054
1055 b.Navigation("Jobs");
1056
1057 b.Navigation("RepositorySettings");
1058
1059 b.Navigation("RevisionInformations");
1060 });
1061
1062 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
1063 {
1064 b.Navigation("InstancePermissionSets");
1065 });
1066
1067 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1068 {
1069 b.Navigation("ActiveTestMerges");
1070
1071 b.Navigation("CompileJobs");
1072
1073 b.Navigation("PrimaryTestMerge");
1074 });
1075
1076 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1077 {
1078 b.Navigation("RevisonInformations");
1079 });
1080
1081 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1082 {
1083 b.Navigation("CreatedUsers");
1084
1085 b.Navigation("OAuthConnections");
1086
1087 b.Navigation("PermissionSet");
1088
1089 b.Navigation("TestMerges");
1090 });
1091
1092 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
1093 {
1094 b.Navigation("PermissionSet")
1095 .IsRequired();
1096
1097 b.Navigation("Users");
1098 });
1099#pragma warning restore 612, 618
1100 }
1101 }
1102}