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