tgstation-server 6.16.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20250302232611_PGAddOidcConnections.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("20250302232611_PGAddOidcConnections")]
12 partial class PGAddOidcConnections
13 {
15 protected override void BuildTargetModel(ModelBuilder modelBuilder)
16 {
17#pragma warning disable 612, 618
18 modelBuilder
19 .HasAnnotation("ProductVersion", "8.0.13")
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.OidcConnection", b =>
478 {
479 b.Property<long>("Id")
480 .ValueGeneratedOnAdd()
481 .HasColumnType("bigint");
482
483 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
484
485 b.Property<string>("ExternalUserId")
486 .IsRequired()
487 .HasMaxLength(100)
488 .HasColumnType("character varying(100)");
489
490 b.Property<string>("SchemeKey")
491 .IsRequired()
492 .HasMaxLength(100)
493 .HasColumnType("character varying(100)");
494
495 b.Property<long>("UserId")
496 .HasColumnType("bigint");
497
498 b.HasKey("Id");
499
500 b.HasIndex("UserId");
501
502 b.HasIndex("SchemeKey", "ExternalUserId")
503 .IsUnique();
504
505 b.ToTable("OidcConnections");
506 });
507
508 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
509 {
510 b.Property<long?>("Id")
511 .ValueGeneratedOnAdd()
512 .HasColumnType("bigint");
513
514 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
515
516 b.Property<decimal>("AdministrationRights")
517 .HasColumnType("numeric(20,0)");
518
519 b.Property<long?>("GroupId")
520 .HasColumnType("bigint");
521
522 b.Property<decimal>("InstanceManagerRights")
523 .HasColumnType("numeric(20,0)");
524
525 b.Property<long?>("UserId")
526 .HasColumnType("bigint");
527
528 b.HasKey("Id");
529
530 b.HasIndex("GroupId")
531 .IsUnique();
532
533 b.HasIndex("UserId")
534 .IsUnique();
535
536 b.ToTable("PermissionSets");
537 });
538
539 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
540 {
541 b.Property<long?>("Id")
542 .ValueGeneratedOnAdd()
543 .HasColumnType("bigint");
544
545 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
546
547 b.Property<string>("AccessIdentifier")
548 .IsRequired()
549 .HasColumnType("text");
550
551 b.Property<long>("CompileJobId")
552 .HasColumnType("bigint");
553
554 b.Property<long?>("InitialCompileJobId")
555 .HasColumnType("bigint");
556
557 b.Property<int>("LaunchSecurityLevel")
558 .HasColumnType("integer");
559
560 b.Property<int>("LaunchVisibility")
561 .HasColumnType("integer");
562
563 b.Property<int>("Port")
564 .HasColumnType("integer");
565
566 b.Property<int>("ProcessId")
567 .HasColumnType("integer");
568
569 b.Property<int>("RebootState")
570 .HasColumnType("integer");
571
572 b.Property<int?>("TopicPort")
573 .HasColumnType("integer");
574
575 b.HasKey("Id");
576
577 b.HasIndex("CompileJobId");
578
579 b.HasIndex("InitialCompileJobId");
580
581 b.ToTable("ReattachInformations");
582 });
583
584 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
585 {
586 b.Property<long>("Id")
587 .ValueGeneratedOnAdd()
588 .HasColumnType("bigint");
589
590 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
591
592 b.Property<string>("AccessToken")
593 .HasMaxLength(10000)
594 .HasColumnType("character varying(10000)");
595
596 b.Property<string>("AccessUser")
597 .HasMaxLength(10000)
598 .HasColumnType("character varying(10000)");
599
600 b.Property<bool?>("AutoUpdatesKeepTestMerges")
601 .IsRequired()
602 .HasColumnType("boolean");
603
604 b.Property<bool?>("AutoUpdatesSynchronize")
605 .IsRequired()
606 .HasColumnType("boolean");
607
608 b.Property<string>("CommitterEmail")
609 .IsRequired()
610 .HasMaxLength(10000)
611 .HasColumnType("character varying(10000)");
612
613 b.Property<string>("CommitterName")
614 .IsRequired()
615 .HasMaxLength(10000)
616 .HasColumnType("character varying(10000)");
617
618 b.Property<bool?>("CreateGitHubDeployments")
619 .IsRequired()
620 .HasColumnType("boolean");
621
622 b.Property<long>("InstanceId")
623 .HasColumnType("bigint");
624
625 b.Property<bool?>("PostTestMergeComment")
626 .IsRequired()
627 .HasColumnType("boolean");
628
629 b.Property<bool?>("PushTestMergeCommits")
630 .IsRequired()
631 .HasColumnType("boolean");
632
633 b.Property<bool?>("ShowTestMergeCommitters")
634 .IsRequired()
635 .HasColumnType("boolean");
636
637 b.Property<bool?>("UpdateSubmodules")
638 .IsRequired()
639 .HasColumnType("boolean");
640
641 b.HasKey("Id");
642
643 b.HasIndex("InstanceId")
644 .IsUnique();
645
646 b.ToTable("RepositorySettings");
647 });
648
649 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
650 {
651 b.Property<long>("Id")
652 .ValueGeneratedOnAdd()
653 .HasColumnType("bigint");
654
655 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
656
657 b.Property<long>("RevisionInformationId")
658 .HasColumnType("bigint");
659
660 b.Property<long>("TestMergeId")
661 .HasColumnType("bigint");
662
663 b.HasKey("Id");
664
665 b.HasIndex("RevisionInformationId");
666
667 b.HasIndex("TestMergeId");
668
669 b.ToTable("RevInfoTestMerges");
670 });
671
672 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
673 {
674 b.Property<long>("Id")
675 .ValueGeneratedOnAdd()
676 .HasColumnType("bigint");
677
678 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
679
680 b.Property<string>("CommitSha")
681 .IsRequired()
682 .HasMaxLength(40)
683 .HasColumnType("character varying(40)");
684
685 b.Property<long>("InstanceId")
686 .HasColumnType("bigint");
687
688 b.Property<string>("OriginCommitSha")
689 .IsRequired()
690 .HasMaxLength(40)
691 .HasColumnType("character varying(40)");
692
693 b.Property<DateTimeOffset>("Timestamp")
694 .HasColumnType("timestamp with time zone");
695
696 b.HasKey("Id");
697
698 b.HasIndex("InstanceId", "CommitSha")
699 .IsUnique();
700
701 b.ToTable("RevisionInformations");
702 });
703
704 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
705 {
706 b.Property<long>("Id")
707 .ValueGeneratedOnAdd()
708 .HasColumnType("bigint");
709
710 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
711
712 b.Property<string>("Author")
713 .IsRequired()
714 .HasColumnType("text");
715
716 b.Property<string>("BodyAtMerge")
717 .IsRequired()
718 .HasColumnType("text");
719
720 b.Property<string>("Comment")
721 .HasMaxLength(10000)
722 .HasColumnType("character varying(10000)");
723
724 b.Property<DateTimeOffset>("MergedAt")
725 .HasColumnType("timestamp with time zone");
726
727 b.Property<long>("MergedById")
728 .HasColumnType("bigint");
729
730 b.Property<int>("Number")
731 .HasColumnType("integer");
732
733 b.Property<long?>("PrimaryRevisionInformationId")
734 .IsRequired()
735 .HasColumnType("bigint");
736
737 b.Property<string>("TargetCommitSha")
738 .IsRequired()
739 .HasMaxLength(40)
740 .HasColumnType("character varying(40)");
741
742 b.Property<string>("TitleAtMerge")
743 .IsRequired()
744 .HasColumnType("text");
745
746 b.Property<string>("Url")
747 .IsRequired()
748 .HasColumnType("text");
749
750 b.HasKey("Id");
751
752 b.HasIndex("MergedById");
753
754 b.HasIndex("PrimaryRevisionInformationId")
755 .IsUnique();
756
757 b.ToTable("TestMerges");
758 });
759
760 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
761 {
762 b.Property<long?>("Id")
763 .ValueGeneratedOnAdd()
764 .HasColumnType("bigint");
765
766 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
767
768 b.Property<string>("CanonicalName")
769 .IsRequired()
770 .HasMaxLength(100)
771 .HasColumnType("character varying(100)");
772
773 b.Property<DateTimeOffset?>("CreatedAt")
774 .IsRequired()
775 .HasColumnType("timestamp with time zone");
776
777 b.Property<long?>("CreatedById")
778 .HasColumnType("bigint");
779
780 b.Property<bool?>("Enabled")
781 .IsRequired()
782 .HasColumnType("boolean");
783
784 b.Property<long?>("GroupId")
785 .HasColumnType("bigint");
786
787 b.Property<DateTimeOffset?>("LastPasswordUpdate")
788 .HasColumnType("timestamp with time zone");
789
790 b.Property<string>("Name")
791 .IsRequired()
792 .HasMaxLength(100)
793 .HasColumnType("character varying(100)");
794
795 b.Property<string>("PasswordHash")
796 .HasColumnType("text");
797
798 b.Property<string>("SystemIdentifier")
799 .HasMaxLength(100)
800 .HasColumnType("character varying(100)");
801
802 b.HasKey("Id");
803
804 b.HasIndex("CanonicalName")
805 .IsUnique();
806
807 b.HasIndex("CreatedById");
808
809 b.HasIndex("GroupId");
810
811 b.HasIndex("SystemIdentifier")
812 .IsUnique();
813
814 b.ToTable("Users");
815 });
816
817 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
818 {
819 b.Property<long?>("Id")
820 .ValueGeneratedOnAdd()
821 .HasColumnType("bigint");
822
823 NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long?>("Id"));
824
825 b.Property<string>("Name")
826 .IsRequired()
827 .HasMaxLength(100)
828 .HasColumnType("character varying(100)");
829
830 b.HasKey("Id");
831
832 b.HasIndex("Name")
833 .IsUnique();
834
835 b.ToTable("Groups");
836 });
837
838 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
839 {
840 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
841 .WithMany("ChatSettings")
842 .HasForeignKey("InstanceId")
843 .OnDelete(DeleteBehavior.Cascade)
844 .IsRequired();
845
846 b.Navigation("Instance");
847 });
848
849 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
850 {
851 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
852 .WithMany("Channels")
853 .HasForeignKey("ChatSettingsId")
854 .OnDelete(DeleteBehavior.Cascade)
855 .IsRequired();
856
857 b.Navigation("ChatSettings");
858 });
859
860 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
861 {
862 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
863 .WithOne()
864 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
865 .OnDelete(DeleteBehavior.Cascade)
866 .IsRequired();
867
868 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
869 .WithMany("CompileJobs")
870 .HasForeignKey("RevisionInformationId")
871 .OnDelete(DeleteBehavior.Cascade)
872 .IsRequired();
873
874 b.Navigation("Job");
875
876 b.Navigation("RevisionInformation");
877 });
878
879 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
880 {
881 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
882 .WithOne("DreamDaemonSettings")
883 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
884 .OnDelete(DeleteBehavior.Cascade)
885 .IsRequired();
886
887 b.Navigation("Instance");
888 });
889
890 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
891 {
892 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
893 .WithOne("DreamMakerSettings")
894 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
895 .OnDelete(DeleteBehavior.Cascade)
896 .IsRequired();
897
898 b.Navigation("Instance");
899 });
900
901 modelBuilder.Entity("Tgstation.Server.Host.Models.InstancePermissionSet", b =>
902 {
903 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
904 .WithMany("InstancePermissionSets")
905 .HasForeignKey("InstanceId")
906 .OnDelete(DeleteBehavior.Cascade)
907 .IsRequired();
908
909 b.HasOne("Tgstation.Server.Host.Models.PermissionSet", "PermissionSet")
910 .WithMany("InstancePermissionSets")
911 .HasForeignKey("PermissionSetId")
912 .OnDelete(DeleteBehavior.Cascade)
913 .IsRequired();
914
915 b.Navigation("Instance");
916
917 b.Navigation("PermissionSet");
918 });
919
920 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
921 {
922 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
923 .WithMany()
924 .HasForeignKey("CancelledById");
925
926 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
927 .WithMany("Jobs")
928 .HasForeignKey("InstanceId")
929 .OnDelete(DeleteBehavior.Cascade)
930 .IsRequired();
931
932 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
933 .WithMany()
934 .HasForeignKey("StartedById")
935 .OnDelete(DeleteBehavior.Cascade)
936 .IsRequired();
937
938 b.Navigation("CancelledBy");
939
940 b.Navigation("Instance");
941
942 b.Navigation("StartedBy");
943 });
944
945 modelBuilder.Entity("Tgstation.Server.Host.Models.OAuthConnection", b =>
946 {
947 b.HasOne("Tgstation.Server.Host.Models.User", "User")
948 .WithMany("OAuthConnections")
949 .HasForeignKey("UserId")
950 .OnDelete(DeleteBehavior.Cascade)
951 .IsRequired();
952
953 b.Navigation("User");
954 });
955
956 modelBuilder.Entity("Tgstation.Server.Host.Models.OidcConnection", b =>
957 {
958 b.HasOne("Tgstation.Server.Host.Models.User", "User")
959 .WithMany("OidcConnections")
960 .HasForeignKey("UserId")
961 .OnDelete(DeleteBehavior.Cascade)
962 .IsRequired();
963
964 b.Navigation("User");
965 });
966
967 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
968 {
969 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
970 .WithOne("PermissionSet")
971 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "GroupId")
972 .OnDelete(DeleteBehavior.Cascade);
973
974 b.HasOne("Tgstation.Server.Host.Models.User", "User")
975 .WithOne("PermissionSet")
976 .HasForeignKey("Tgstation.Server.Host.Models.PermissionSet", "UserId")
977 .OnDelete(DeleteBehavior.Cascade);
978
979 b.Navigation("Group");
980
981 b.Navigation("User");
982 });
983
984 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
985 {
986 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
987 .WithMany()
988 .HasForeignKey("CompileJobId")
989 .OnDelete(DeleteBehavior.Cascade)
990 .IsRequired();
991
992 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "InitialCompileJob")
993 .WithMany()
994 .HasForeignKey("InitialCompileJobId");
995
996 b.Navigation("CompileJob");
997
998 b.Navigation("InitialCompileJob");
999 });
1000
1001 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
1002 {
1003 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
1004 .WithOne("RepositorySettings")
1005 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
1006 .OnDelete(DeleteBehavior.Cascade)
1007 .IsRequired();
1008
1009 b.Navigation("Instance");
1010 });
1011
1012 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
1013 {
1014 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
1015 .WithMany("ActiveTestMerges")
1016 .HasForeignKey("RevisionInformationId")
1017 .OnDelete(DeleteBehavior.Cascade)
1018 .IsRequired();
1019
1020 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
1021 .WithMany("RevisonInformations")
1022 .HasForeignKey("TestMergeId")
1023 .OnDelete(DeleteBehavior.ClientNoAction)
1024 .IsRequired();
1025
1026 b.Navigation("RevisionInformation");
1027
1028 b.Navigation("TestMerge");
1029 });
1030
1031 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1032 {
1033 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
1034 .WithMany("RevisionInformations")
1035 .HasForeignKey("InstanceId")
1036 .OnDelete(DeleteBehavior.Cascade)
1037 .IsRequired();
1038
1039 b.Navigation("Instance");
1040 });
1041
1042 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1043 {
1044 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
1045 .WithMany("TestMerges")
1046 .HasForeignKey("MergedById")
1047 .OnDelete(DeleteBehavior.Restrict)
1048 .IsRequired();
1049
1050 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
1051 .WithOne("PrimaryTestMerge")
1052 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
1053 .OnDelete(DeleteBehavior.Cascade)
1054 .IsRequired();
1055
1056 b.Navigation("MergedBy");
1057
1058 b.Navigation("PrimaryRevisionInformation");
1059 });
1060
1061 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1062 {
1063 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
1064 .WithMany("CreatedUsers")
1065 .HasForeignKey("CreatedById");
1066
1067 b.HasOne("Tgstation.Server.Host.Models.UserGroup", "Group")
1068 .WithMany("Users")
1069 .HasForeignKey("GroupId");
1070
1071 b.Navigation("CreatedBy");
1072
1073 b.Navigation("Group");
1074 });
1075
1076 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
1077 {
1078 b.Navigation("Channels");
1079 });
1080
1081 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
1082 {
1083 b.Navigation("ChatSettings");
1084
1085 b.Navigation("DreamDaemonSettings");
1086
1087 b.Navigation("DreamMakerSettings");
1088
1089 b.Navigation("InstancePermissionSets");
1090
1091 b.Navigation("Jobs");
1092
1093 b.Navigation("RepositorySettings");
1094
1095 b.Navigation("RevisionInformations");
1096 });
1097
1098 modelBuilder.Entity("Tgstation.Server.Host.Models.PermissionSet", b =>
1099 {
1100 b.Navigation("InstancePermissionSets");
1101 });
1102
1103 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
1104 {
1105 b.Navigation("ActiveTestMerges");
1106
1107 b.Navigation("CompileJobs");
1108
1109 b.Navigation("PrimaryTestMerge");
1110 });
1111
1112 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
1113 {
1114 b.Navigation("RevisonInformations");
1115 });
1116
1117 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
1118 {
1119 b.Navigation("CreatedUsers");
1120
1121 b.Navigation("OAuthConnections");
1122
1123 b.Navigation("OidcConnections");
1124
1125 b.Navigation("PermissionSet");
1126
1127 b.Navigation("TestMerges");
1128 });
1129
1130 modelBuilder.Entity("Tgstation.Server.Host.Models.UserGroup", b =>
1131 {
1132 b.Navigation("PermissionSet")
1133 .IsRequired();
1134
1135 b.Navigation("Users");
1136 });
1137#pragma warning restore 612, 618
1138 }
1139 }
1140}