16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.4")
19 .HasAnnotation(
"Relational:MaxIdentifierLength", 64);
21 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
23 b.Property<
long>(
"Id")
24 .ValueGeneratedOnAdd()
25 .HasColumnType(
"bigint");
27 b.Property<ushort?>(
"ChannelLimit")
29 .HasColumnType(
"smallint unsigned");
31 b.Property<
string>(
"ConnectionString")
33 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
36 b.Property<
bool?>(
"Enabled")
37 .HasColumnType(
"tinyint(1)");
39 b.Property<
long>(
"InstanceId")
40 .HasColumnType(
"bigint");
42 b.Property<
string>(
"Name")
44 .HasColumnType(
"varchar(100) CHARACTER SET utf8mb4")
47 b.Property<
int>(
"Provider")
48 .HasColumnType(
"int");
50 b.Property<uint?>(
"ReconnectionInterval")
52 .HasColumnType(
"int unsigned");
56 b.HasIndex(
"InstanceId",
"Name")
59 b.ToTable(
"ChatBots");
62 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
64 b.Property<
long>(
"Id")
65 .ValueGeneratedOnAdd()
66 .HasColumnType(
"bigint");
68 b.Property<
long>(
"ChatSettingsId")
69 .HasColumnType(
"bigint");
71 b.Property<ulong?>(
"DiscordChannelId")
72 .HasColumnType(
"bigint unsigned");
74 b.Property<
string>(
"IrcChannel")
75 .HasColumnType(
"varchar(100) CHARACTER SET utf8mb4")
78 b.Property<
bool?>(
"IsAdminChannel")
80 .HasColumnType(
"tinyint(1)");
82 b.Property<
bool?>(
"IsUpdatesChannel")
84 .HasColumnType(
"tinyint(1)");
86 b.Property<
bool?>(
"IsWatchdogChannel")
88 .HasColumnType(
"tinyint(1)");
90 b.Property<
string>(
"Tag")
91 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
96 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
99 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
102 b.ToTable(
"ChatChannels");
105 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
107 b.Property<
long>(
"Id")
108 .ValueGeneratedOnAdd()
109 .HasColumnType(
"bigint");
111 b.Property<
string>(
"ByondVersion")
113 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
115 b.Property<
int?>(
"DMApiMajorVersion")
116 .HasColumnType(
"int");
118 b.Property<
int?>(
"DMApiMinorVersion")
119 .HasColumnType(
"int");
121 b.Property<
int?>(
"DMApiPatchVersion")
122 .HasColumnType(
"int");
124 b.Property<Guid?>(
"DirectoryName")
126 .HasColumnType(
"char(36)");
128 b.Property<
string>(
"DmeName")
130 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
132 b.Property<
long>(
"JobId")
133 .HasColumnType(
"bigint");
135 b.Property<
int>(
"MinimumSecurityLevel")
136 .HasColumnType(
"int");
138 b.Property<
string>(
"Output")
140 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
142 b.Property<
long>(
"RevisionInformationId")
143 .HasColumnType(
"bigint");
147 b.HasIndex(
"DirectoryName");
152 b.HasIndex(
"RevisionInformationId");
154 b.ToTable(
"CompileJobs");
157 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
159 b.Property<
long>(
"Id")
160 .ValueGeneratedOnAdd()
161 .HasColumnType(
"bigint");
163 b.Property<
bool?>(
"AllowWebClient")
165 .HasColumnType(
"tinyint(1)");
167 b.Property<
bool?>(
"AutoStart")
169 .HasColumnType(
"tinyint(1)");
171 b.Property<uint?>(
"HeartbeatSeconds")
173 .HasColumnType(
"int unsigned");
175 b.Property<
long>(
"InstanceId")
176 .HasColumnType(
"bigint");
178 b.Property<ushort?>(
"PrimaryPort")
180 .HasColumnType(
"smallint unsigned");
182 b.Property<ushort?>(
"SecondaryPort")
184 .HasColumnType(
"smallint unsigned");
186 b.Property<
int>(
"SecurityLevel")
187 .HasColumnType(
"int");
189 b.Property<uint?>(
"StartupTimeout")
191 .HasColumnType(
"int unsigned");
195 b.HasIndex(
"InstanceId")
198 b.ToTable(
"DreamDaemonSettings");
201 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
203 b.Property<
long>(
"Id")
204 .ValueGeneratedOnAdd()
205 .HasColumnType(
"bigint");
207 b.Property<ushort?>(
"ApiValidationPort")
209 .HasColumnType(
"smallint unsigned");
211 b.Property<
int>(
"ApiValidationSecurityLevel")
212 .HasColumnType(
"int");
214 b.Property<
long>(
"InstanceId")
215 .HasColumnType(
"bigint");
217 b.Property<
string>(
"ProjectName")
218 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
219 .HasMaxLength(10000);
223 b.HasIndex(
"InstanceId")
226 b.ToTable(
"DreamMakerSettings");
229 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DualReattachInformation", b =>
231 b.Property<
long>(
"Id")
232 .ValueGeneratedOnAdd()
233 .HasColumnType(
"bigint");
235 b.Property<
long?>(
"AlphaId")
236 .HasColumnType(
"bigint");
238 b.Property<
bool>(
"AlphaIsActive")
239 .HasColumnType(
"tinyint(1)");
241 b.Property<
long?>(
"BravoId")
242 .HasColumnType(
"bigint");
244 b.Property<
long>(
"InstanceId")
245 .HasColumnType(
"bigint");
249 b.HasIndex(
"AlphaId");
251 b.HasIndex(
"BravoId");
253 b.HasIndex(
"InstanceId")
256 b.ToTable(
"WatchdogReattachInformations");
259 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
261 b.Property<
long>(
"Id")
262 .ValueGeneratedOnAdd()
263 .HasColumnType(
"bigint");
265 b.Property<uint?>(
"AutoUpdateInterval")
267 .HasColumnType(
"int unsigned");
269 b.Property<ushort?>(
"ChatBotLimit")
271 .HasColumnType(
"smallint unsigned");
273 b.Property<
int>(
"ConfigurationType")
274 .HasColumnType(
"int");
276 b.Property<
string>(
"Name")
278 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
279 .HasMaxLength(10000);
281 b.Property<
bool?>(
"Online")
283 .HasColumnType(
"tinyint(1)");
285 b.Property<
string>(
"Path")
287 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
294 b.ToTable(
"Instances");
297 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
299 b.Property<
long>(
"Id")
300 .ValueGeneratedOnAdd()
301 .HasColumnType(
"bigint");
303 b.Property<ulong>(
"ByondRights")
304 .HasColumnType(
"bigint unsigned");
306 b.Property<ulong>(
"ChatBotRights")
307 .HasColumnType(
"bigint unsigned");
309 b.Property<ulong>(
"ConfigurationRights")
310 .HasColumnType(
"bigint unsigned");
312 b.Property<ulong>(
"DreamDaemonRights")
313 .HasColumnType(
"bigint unsigned");
315 b.Property<ulong>(
"DreamMakerRights")
316 .HasColumnType(
"bigint unsigned");
318 b.Property<
long>(
"InstanceId")
319 .HasColumnType(
"bigint");
321 b.Property<ulong>(
"InstanceUserRights")
322 .HasColumnType(
"bigint unsigned");
324 b.Property<ulong>(
"RepositoryRights")
325 .HasColumnType(
"bigint unsigned");
327 b.Property<
long?>(
"UserId")
329 .HasColumnType(
"bigint");
333 b.HasIndex(
"InstanceId");
335 b.HasIndex(
"UserId",
"InstanceId")
338 b.ToTable(
"InstanceUsers");
341 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
343 b.Property<
long>(
"Id")
344 .ValueGeneratedOnAdd()
345 .HasColumnType(
"bigint");
347 b.Property<ulong?>(
"CancelRight")
348 .HasColumnType(
"bigint unsigned");
350 b.Property<ulong?>(
"CancelRightsType")
351 .HasColumnType(
"bigint unsigned");
353 b.Property<
bool?>(
"Cancelled")
355 .HasColumnType(
"tinyint(1)");
357 b.Property<
long?>(
"CancelledById")
358 .HasColumnType(
"bigint");
360 b.Property<
string>(
"Description")
362 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
364 b.Property<uint?>(
"ErrorCode")
365 .HasColumnType(
"int unsigned");
367 b.Property<
string>(
"ExceptionDetails")
368 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
370 b.Property<
long>(
"InstanceId")
371 .HasColumnType(
"bigint");
373 b.Property<DateTimeOffset?>(
"StartedAt")
375 .HasColumnType(
"datetime(6)");
377 b.Property<
long>(
"StartedById")
378 .HasColumnType(
"bigint");
380 b.Property<DateTimeOffset?>(
"StoppedAt")
381 .HasColumnType(
"datetime(6)");
385 b.HasIndex(
"CancelledById");
387 b.HasIndex(
"InstanceId");
389 b.HasIndex(
"StartedById");
394 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
396 b.Property<
long>(
"Id")
397 .ValueGeneratedOnAdd()
398 .HasColumnType(
"bigint");
400 b.Property<
string>(
"AccessIdentifier")
402 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
404 b.Property<
long>(
"CompileJobId")
405 .HasColumnType(
"bigint");
407 b.Property<
bool>(
"IsPrimary")
408 .HasColumnType(
"tinyint(1)");
410 b.Property<
int>(
"LaunchSecurityLevel")
411 .HasColumnType(
"int");
413 b.Property<ushort>(
"Port")
414 .HasColumnType(
"smallint unsigned");
416 b.Property<
int>(
"ProcessId")
417 .HasColumnType(
"int");
419 b.Property<
int>(
"RebootState")
420 .HasColumnType(
"int");
424 b.HasIndex(
"CompileJobId");
426 b.ToTable(
"ReattachInformations");
429 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
431 b.Property<
long>(
"Id")
432 .ValueGeneratedOnAdd()
433 .HasColumnType(
"bigint");
435 b.Property<
string>(
"AccessToken")
436 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
437 .HasMaxLength(10000);
439 b.Property<
string>(
"AccessUser")
440 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
441 .HasMaxLength(10000);
443 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
445 .HasColumnType(
"tinyint(1)");
447 b.Property<
bool?>(
"AutoUpdatesSynchronize")
449 .HasColumnType(
"tinyint(1)");
451 b.Property<
string>(
"CommitterEmail")
453 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
454 .HasMaxLength(10000);
456 b.Property<
string>(
"CommitterName")
458 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
459 .HasMaxLength(10000);
461 b.Property<
long>(
"InstanceId")
462 .HasColumnType(
"bigint");
464 b.Property<
bool?>(
"PostTestMergeComment")
466 .HasColumnType(
"tinyint(1)");
468 b.Property<
bool?>(
"PushTestMergeCommits")
470 .HasColumnType(
"tinyint(1)");
472 b.Property<
bool?>(
"ShowTestMergeCommitters")
474 .HasColumnType(
"tinyint(1)");
478 b.HasIndex(
"InstanceId")
481 b.ToTable(
"RepositorySettings");
484 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
486 b.Property<
long>(
"Id")
487 .ValueGeneratedOnAdd()
488 .HasColumnType(
"bigint");
490 b.Property<
long>(
"RevisionInformationId")
491 .HasColumnType(
"bigint");
493 b.Property<
long>(
"TestMergeId")
494 .HasColumnType(
"bigint");
498 b.HasIndex(
"RevisionInformationId");
500 b.HasIndex(
"TestMergeId");
502 b.ToTable(
"RevInfoTestMerges");
505 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
507 b.Property<
long>(
"Id")
508 .ValueGeneratedOnAdd()
509 .HasColumnType(
"bigint");
511 b.Property<
string>(
"CommitSha")
513 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
516 b.Property<
long>(
"InstanceId")
517 .HasColumnType(
"bigint");
519 b.Property<
string>(
"OriginCommitSha")
521 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
526 b.HasIndex(
"InstanceId",
"CommitSha")
529 b.ToTable(
"RevisionInformations");
532 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
534 b.Property<
long>(
"Id")
535 .ValueGeneratedOnAdd()
536 .HasColumnType(
"bigint");
538 b.Property<
string>(
"Author")
540 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
542 b.Property<
string>(
"BodyAtMerge")
544 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
546 b.Property<
string>(
"Comment")
547 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
548 .HasMaxLength(10000);
550 b.Property<DateTimeOffset>(
"MergedAt")
551 .HasColumnType(
"datetime(6)");
553 b.Property<
long>(
"MergedById")
554 .HasColumnType(
"bigint");
556 b.Property<
int>(
"Number")
557 .HasColumnType(
"int");
559 b.Property<
long?>(
"PrimaryRevisionInformationId")
561 .HasColumnType(
"bigint");
563 b.Property<
string>(
"PullRequestRevision")
565 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
568 b.Property<
string>(
"TitleAtMerge")
570 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
572 b.Property<
string>(
"Url")
574 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
578 b.HasIndex(
"MergedById");
580 b.HasIndex(
"PrimaryRevisionInformationId")
583 b.ToTable(
"TestMerges");
586 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
588 b.Property<
long?>(
"Id")
589 .ValueGeneratedOnAdd()
590 .HasColumnType(
"bigint");
592 b.Property<ulong>(
"AdministrationRights")
593 .HasColumnType(
"bigint unsigned");
595 b.Property<
string>(
"CanonicalName")
597 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
599 b.Property<DateTimeOffset?>(
"CreatedAt")
601 .HasColumnType(
"datetime(6)");
603 b.Property<
long?>(
"CreatedById")
604 .HasColumnType(
"bigint");
606 b.Property<
bool?>(
"Enabled")
608 .HasColumnType(
"tinyint(1)");
610 b.Property<ulong>(
"InstanceManagerRights")
611 .HasColumnType(
"bigint unsigned");
613 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
614 .HasColumnType(
"datetime(6)");
616 b.Property<
string>(
"Name")
618 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
619 .HasMaxLength(10000);
621 b.Property<
string>(
"PasswordHash")
622 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
624 b.Property<
string>(
"SystemIdentifier")
625 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
629 b.HasIndex(
"CanonicalName")
632 b.HasIndex(
"CreatedById");
634 b.HasIndex(
"SystemIdentifier")
640 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
642 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
643 .WithMany(
"ChatSettings")
644 .HasForeignKey(
"InstanceId")
645 .OnDelete(DeleteBehavior.Cascade)
649 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
651 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
652 .WithMany(
"Channels")
653 .HasForeignKey(
"ChatSettingsId")
654 .OnDelete(DeleteBehavior.Cascade)
658 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
660 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
662 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
663 .OnDelete(DeleteBehavior.Cascade)
666 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
667 .WithMany(
"CompileJobs")
668 .HasForeignKey(
"RevisionInformationId")
669 .OnDelete(DeleteBehavior.Cascade)
673 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
675 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
676 .WithOne(
"DreamDaemonSettings")
677 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
678 .OnDelete(DeleteBehavior.Cascade)
682 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
684 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
685 .WithOne(
"DreamMakerSettings")
686 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
687 .OnDelete(DeleteBehavior.Cascade)
691 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DualReattachInformation", b =>
693 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
695 .HasForeignKey(
"AlphaId");
697 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
699 .HasForeignKey(
"BravoId");
701 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
702 .WithOne(
"WatchdogReattachInformation")
703 .HasForeignKey(
"Tgstation.Server.Host.Models.DualReattachInformation",
"InstanceId")
704 .OnDelete(DeleteBehavior.Cascade)
708 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
710 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
711 .WithMany(
"InstanceUsers")
712 .HasForeignKey(
"InstanceId")
713 .OnDelete(DeleteBehavior.Cascade)
716 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
717 .WithMany(
"InstanceUsers")
718 .HasForeignKey(
"UserId")
719 .OnDelete(DeleteBehavior.Cascade)
723 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
725 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
727 .HasForeignKey(
"CancelledById");
729 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
731 .HasForeignKey(
"InstanceId")
732 .OnDelete(DeleteBehavior.Cascade)
735 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
737 .HasForeignKey(
"StartedById")
738 .OnDelete(DeleteBehavior.Cascade)
742 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
744 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
746 .HasForeignKey(
"CompileJobId")
747 .OnDelete(DeleteBehavior.Cascade)
751 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
753 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
754 .WithOne(
"RepositorySettings")
755 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
756 .OnDelete(DeleteBehavior.Cascade)
760 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
762 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
763 .WithMany(
"ActiveTestMerges")
764 .HasForeignKey(
"RevisionInformationId")
765 .OnDelete(DeleteBehavior.Cascade)
768 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
769 .WithMany(
"RevisonInformations")
770 .HasForeignKey(
"TestMergeId")
771 .OnDelete(DeleteBehavior.ClientNoAction)
775 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
777 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
778 .WithMany(
"RevisionInformations")
779 .HasForeignKey(
"InstanceId")
780 .OnDelete(DeleteBehavior.Cascade)
784 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
786 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
787 .WithMany(
"TestMerges")
788 .HasForeignKey(
"MergedById")
789 .OnDelete(DeleteBehavior.Restrict)
792 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
793 .WithOne(
"PrimaryTestMerge")
794 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
795 .OnDelete(DeleteBehavior.Cascade)
799 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
801 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
802 .WithMany(
"CreatedUsers")
803 .HasForeignKey(
"CreatedById");
805#pragma warning restore 612, 618