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