16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.3")
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.Instance", b =>
231 b.Property<
long>(
"Id")
232 .ValueGeneratedOnAdd()
233 .HasColumnType(
"bigint");
235 b.Property<uint?>(
"AutoUpdateInterval")
237 .HasColumnType(
"int unsigned");
239 b.Property<ushort?>(
"ChatBotLimit")
241 .HasColumnType(
"smallint unsigned");
243 b.Property<
int>(
"ConfigurationType")
244 .HasColumnType(
"int");
246 b.Property<
string>(
"Name")
248 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
249 .HasMaxLength(10000);
251 b.Property<
bool?>(
"Online")
253 .HasColumnType(
"tinyint(1)");
255 b.Property<
string>(
"Path")
257 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
264 b.ToTable(
"Instances");
267 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
269 b.Property<
long>(
"Id")
270 .ValueGeneratedOnAdd()
271 .HasColumnType(
"bigint");
273 b.Property<ulong>(
"ByondRights")
274 .HasColumnType(
"bigint unsigned");
276 b.Property<ulong>(
"ChatBotRights")
277 .HasColumnType(
"bigint unsigned");
279 b.Property<ulong>(
"ConfigurationRights")
280 .HasColumnType(
"bigint unsigned");
282 b.Property<ulong>(
"DreamDaemonRights")
283 .HasColumnType(
"bigint unsigned");
285 b.Property<ulong>(
"DreamMakerRights")
286 .HasColumnType(
"bigint unsigned");
288 b.Property<
long>(
"InstanceId")
289 .HasColumnType(
"bigint");
291 b.Property<ulong>(
"InstanceUserRights")
292 .HasColumnType(
"bigint unsigned");
294 b.Property<ulong>(
"RepositoryRights")
295 .HasColumnType(
"bigint unsigned");
297 b.Property<
long?>(
"UserId")
299 .HasColumnType(
"bigint");
303 b.HasIndex(
"InstanceId");
305 b.HasIndex(
"UserId",
"InstanceId")
308 b.ToTable(
"InstanceUsers");
311 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
313 b.Property<
long>(
"Id")
314 .ValueGeneratedOnAdd()
315 .HasColumnType(
"bigint");
317 b.Property<ulong?>(
"CancelRight")
318 .HasColumnType(
"bigint unsigned");
320 b.Property<ulong?>(
"CancelRightsType")
321 .HasColumnType(
"bigint unsigned");
323 b.Property<
bool?>(
"Cancelled")
325 .HasColumnType(
"tinyint(1)");
327 b.Property<
long?>(
"CancelledById")
328 .HasColumnType(
"bigint");
330 b.Property<
string>(
"Description")
332 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
334 b.Property<uint?>(
"ErrorCode")
335 .HasColumnType(
"int unsigned");
337 b.Property<
string>(
"ExceptionDetails")
338 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
340 b.Property<
long>(
"InstanceId")
341 .HasColumnType(
"bigint");
343 b.Property<DateTimeOffset?>(
"StartedAt")
345 .HasColumnType(
"datetime(6)");
347 b.Property<
long>(
"StartedById")
348 .HasColumnType(
"bigint");
350 b.Property<DateTimeOffset?>(
"StoppedAt")
351 .HasColumnType(
"datetime(6)");
355 b.HasIndex(
"CancelledById");
357 b.HasIndex(
"InstanceId");
359 b.HasIndex(
"StartedById");
364 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
366 b.Property<
long>(
"Id")
367 .ValueGeneratedOnAdd()
368 .HasColumnType(
"bigint");
370 b.Property<
string>(
"AccessIdentifier")
372 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
374 b.Property<
long>(
"CompileJobId")
375 .HasColumnType(
"bigint");
377 b.Property<
bool>(
"IsPrimary")
378 .HasColumnType(
"tinyint(1)");
380 b.Property<
int>(
"LaunchSecurityLevel")
381 .HasColumnType(
"int");
383 b.Property<ushort>(
"Port")
384 .HasColumnType(
"smallint unsigned");
386 b.Property<
int>(
"ProcessId")
387 .HasColumnType(
"int");
389 b.Property<
int>(
"RebootState")
390 .HasColumnType(
"int");
394 b.HasIndex(
"CompileJobId");
396 b.ToTable(
"ReattachInformations");
399 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
401 b.Property<
long>(
"Id")
402 .ValueGeneratedOnAdd()
403 .HasColumnType(
"bigint");
405 b.Property<
string>(
"AccessToken")
406 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
407 .HasMaxLength(10000);
409 b.Property<
string>(
"AccessUser")
410 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
411 .HasMaxLength(10000);
413 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
415 .HasColumnType(
"tinyint(1)");
417 b.Property<
bool?>(
"AutoUpdatesSynchronize")
419 .HasColumnType(
"tinyint(1)");
421 b.Property<
string>(
"CommitterEmail")
423 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
424 .HasMaxLength(10000);
426 b.Property<
string>(
"CommitterName")
428 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
429 .HasMaxLength(10000);
431 b.Property<
long>(
"InstanceId")
432 .HasColumnType(
"bigint");
434 b.Property<
bool?>(
"PostTestMergeComment")
436 .HasColumnType(
"tinyint(1)");
438 b.Property<
bool?>(
"PushTestMergeCommits")
440 .HasColumnType(
"tinyint(1)");
442 b.Property<
bool?>(
"ShowTestMergeCommitters")
444 .HasColumnType(
"tinyint(1)");
448 b.HasIndex(
"InstanceId")
451 b.ToTable(
"RepositorySettings");
454 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
456 b.Property<
long>(
"Id")
457 .ValueGeneratedOnAdd()
458 .HasColumnType(
"bigint");
460 b.Property<
long>(
"RevisionInformationId")
461 .HasColumnType(
"bigint");
463 b.Property<
long>(
"TestMergeId")
464 .HasColumnType(
"bigint");
468 b.HasIndex(
"RevisionInformationId");
470 b.HasIndex(
"TestMergeId");
472 b.ToTable(
"RevInfoTestMerges");
475 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
477 b.Property<
long>(
"Id")
478 .ValueGeneratedOnAdd()
479 .HasColumnType(
"bigint");
481 b.Property<
string>(
"CommitSha")
483 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
486 b.Property<
long>(
"InstanceId")
487 .HasColumnType(
"bigint");
489 b.Property<
string>(
"OriginCommitSha")
491 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
496 b.HasIndex(
"InstanceId",
"CommitSha")
499 b.ToTable(
"RevisionInformations");
502 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
504 b.Property<
long>(
"Id")
505 .ValueGeneratedOnAdd()
506 .HasColumnType(
"bigint");
508 b.Property<
string>(
"Author")
510 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
512 b.Property<
string>(
"BodyAtMerge")
514 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
516 b.Property<
string>(
"Comment")
517 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
518 .HasMaxLength(10000);
520 b.Property<DateTimeOffset>(
"MergedAt")
521 .HasColumnType(
"datetime(6)");
523 b.Property<
long>(
"MergedById")
524 .HasColumnType(
"bigint");
526 b.Property<
int>(
"Number")
527 .HasColumnType(
"int");
529 b.Property<
long?>(
"PrimaryRevisionInformationId")
531 .HasColumnType(
"bigint");
533 b.Property<
string>(
"PullRequestRevision")
535 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
538 b.Property<
string>(
"TitleAtMerge")
540 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
542 b.Property<
string>(
"Url")
544 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
548 b.HasIndex(
"MergedById");
550 b.HasIndex(
"PrimaryRevisionInformationId")
553 b.ToTable(
"TestMerges");
556 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
558 b.Property<
long?>(
"Id")
559 .ValueGeneratedOnAdd()
560 .HasColumnType(
"bigint");
562 b.Property<ulong>(
"AdministrationRights")
563 .HasColumnType(
"bigint unsigned");
565 b.Property<
string>(
"CanonicalName")
567 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
569 b.Property<DateTimeOffset?>(
"CreatedAt")
571 .HasColumnType(
"datetime(6)");
573 b.Property<
long?>(
"CreatedById")
574 .HasColumnType(
"bigint");
576 b.Property<
bool?>(
"Enabled")
578 .HasColumnType(
"tinyint(1)");
580 b.Property<ulong>(
"InstanceManagerRights")
581 .HasColumnType(
"bigint unsigned");
583 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
584 .HasColumnType(
"datetime(6)");
586 b.Property<
string>(
"Name")
588 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
589 .HasMaxLength(10000);
591 b.Property<
string>(
"PasswordHash")
592 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
594 b.Property<
string>(
"SystemIdentifier")
595 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
599 b.HasIndex(
"CanonicalName")
602 b.HasIndex(
"CreatedById");
604 b.HasIndex(
"SystemIdentifier")
610 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
612 b.Property<
long>(
"Id")
613 .ValueGeneratedOnAdd()
614 .HasColumnType(
"bigint");
616 b.Property<
long?>(
"AlphaId")
617 .HasColumnType(
"bigint");
619 b.Property<
bool>(
"AlphaIsActive")
620 .HasColumnType(
"tinyint(1)");
622 b.Property<
long?>(
"BravoId")
623 .HasColumnType(
"bigint");
625 b.Property<
long>(
"InstanceId")
626 .HasColumnType(
"bigint");
630 b.HasIndex(
"AlphaId");
632 b.HasIndex(
"BravoId");
634 b.HasIndex(
"InstanceId")
637 b.ToTable(
"WatchdogReattachInformations");
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.ClientNoAction)
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.InstanceUser", b =>
693 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
694 .WithMany(
"InstanceUsers")
695 .HasForeignKey(
"InstanceId")
696 .OnDelete(DeleteBehavior.Cascade)
699 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
700 .WithMany(
"InstanceUsers")
701 .HasForeignKey(
"UserId")
702 .OnDelete(DeleteBehavior.Cascade)
706 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
708 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
710 .HasForeignKey(
"CancelledById");
712 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
714 .HasForeignKey(
"InstanceId")
715 .OnDelete(DeleteBehavior.Cascade)
718 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
720 .HasForeignKey(
"StartedById")
721 .OnDelete(DeleteBehavior.Cascade)
725 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
727 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
729 .HasForeignKey(
"CompileJobId")
730 .OnDelete(DeleteBehavior.Cascade)
734 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
736 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
737 .WithOne(
"RepositorySettings")
738 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
739 .OnDelete(DeleteBehavior.Cascade)
743 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
745 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
746 .WithMany(
"ActiveTestMerges")
747 .HasForeignKey(
"RevisionInformationId")
748 .OnDelete(DeleteBehavior.Cascade)
751 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
752 .WithMany(
"RevisonInformations")
753 .HasForeignKey(
"TestMergeId")
754 .OnDelete(DeleteBehavior.ClientNoAction)
758 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
760 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
761 .WithMany(
"RevisionInformations")
762 .HasForeignKey(
"InstanceId")
763 .OnDelete(DeleteBehavior.Cascade)
767 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
769 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
770 .WithMany(
"TestMerges")
771 .HasForeignKey(
"MergedById")
772 .OnDelete(DeleteBehavior.Restrict)
775 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
776 .WithOne(
"PrimaryTestMerge")
777 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
778 .OnDelete(DeleteBehavior.Cascade)
782 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
784 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
785 .WithMany(
"CreatedUsers")
786 .HasForeignKey(
"CreatedById");
789 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
791 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
793 .HasForeignKey(
"AlphaId");
795 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
797 .HasForeignKey(
"BravoId");
799 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
800 .WithOne(
"WatchdogReattachInformation")
801 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
802 .OnDelete(DeleteBehavior.Cascade)
805#pragma warning restore 612, 618