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<
string>(
"AccessToken")
164 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
166 b.Property<
bool?>(
"AllowWebClient")
168 .HasColumnType(
"tinyint(1)");
170 b.Property<
bool?>(
"AutoStart")
172 .HasColumnType(
"tinyint(1)");
174 b.Property<uint?>(
"HeartbeatSeconds")
176 .HasColumnType(
"int unsigned");
178 b.Property<
long>(
"InstanceId")
179 .HasColumnType(
"bigint");
181 b.Property<ushort?>(
"PrimaryPort")
183 .HasColumnType(
"smallint unsigned");
185 b.Property<
int?>(
"ProcessId")
186 .HasColumnType(
"int");
188 b.Property<ushort?>(
"SecondaryPort")
190 .HasColumnType(
"smallint unsigned");
192 b.Property<
int>(
"SecurityLevel")
193 .HasColumnType(
"int");
195 b.Property<
bool?>(
"SoftRestart")
197 .HasColumnType(
"tinyint(1)");
199 b.Property<
bool?>(
"SoftShutdown")
201 .HasColumnType(
"tinyint(1)");
203 b.Property<uint?>(
"StartupTimeout")
205 .HasColumnType(
"int unsigned");
209 b.HasIndex(
"InstanceId")
212 b.ToTable(
"DreamDaemonSettings");
215 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
217 b.Property<
long>(
"Id")
218 .ValueGeneratedOnAdd()
219 .HasColumnType(
"bigint");
221 b.Property<ushort?>(
"ApiValidationPort")
223 .HasColumnType(
"smallint unsigned");
225 b.Property<
int>(
"ApiValidationSecurityLevel")
226 .HasColumnType(
"int");
228 b.Property<
long>(
"InstanceId")
229 .HasColumnType(
"bigint");
231 b.Property<
string>(
"ProjectName")
232 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
233 .HasMaxLength(10000);
237 b.HasIndex(
"InstanceId")
240 b.ToTable(
"DreamMakerSettings");
243 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
245 b.Property<
long>(
"Id")
246 .ValueGeneratedOnAdd()
247 .HasColumnType(
"bigint");
249 b.Property<uint?>(
"AutoUpdateInterval")
251 .HasColumnType(
"int unsigned");
253 b.Property<ushort?>(
"ChatBotLimit")
255 .HasColumnType(
"smallint unsigned");
257 b.Property<
int>(
"ConfigurationType")
258 .HasColumnType(
"int");
260 b.Property<
string>(
"Name")
262 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
263 .HasMaxLength(10000);
265 b.Property<
bool?>(
"Online")
267 .HasColumnType(
"tinyint(1)");
269 b.Property<
string>(
"Path")
271 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
278 b.ToTable(
"Instances");
281 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
283 b.Property<
long>(
"Id")
284 .ValueGeneratedOnAdd()
285 .HasColumnType(
"bigint");
287 b.Property<ulong>(
"ByondRights")
288 .HasColumnType(
"bigint unsigned");
290 b.Property<ulong>(
"ChatBotRights")
291 .HasColumnType(
"bigint unsigned");
293 b.Property<ulong>(
"ConfigurationRights")
294 .HasColumnType(
"bigint unsigned");
296 b.Property<ulong>(
"DreamDaemonRights")
297 .HasColumnType(
"bigint unsigned");
299 b.Property<ulong>(
"DreamMakerRights")
300 .HasColumnType(
"bigint unsigned");
302 b.Property<
long>(
"InstanceId")
303 .HasColumnType(
"bigint");
305 b.Property<ulong>(
"InstanceUserRights")
306 .HasColumnType(
"bigint unsigned");
308 b.Property<ulong>(
"RepositoryRights")
309 .HasColumnType(
"bigint unsigned");
311 b.Property<
long?>(
"UserId")
313 .HasColumnType(
"bigint");
317 b.HasIndex(
"InstanceId");
319 b.HasIndex(
"UserId",
"InstanceId")
322 b.ToTable(
"InstanceUsers");
325 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
327 b.Property<
long>(
"Id")
328 .ValueGeneratedOnAdd()
329 .HasColumnType(
"bigint");
331 b.Property<ulong?>(
"CancelRight")
332 .HasColumnType(
"bigint unsigned");
334 b.Property<ulong?>(
"CancelRightsType")
335 .HasColumnType(
"bigint unsigned");
337 b.Property<
bool?>(
"Cancelled")
339 .HasColumnType(
"tinyint(1)");
341 b.Property<
long?>(
"CancelledById")
342 .HasColumnType(
"bigint");
344 b.Property<
string>(
"Description")
346 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
348 b.Property<uint?>(
"ErrorCode")
349 .HasColumnType(
"int unsigned");
351 b.Property<
string>(
"ExceptionDetails")
352 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
354 b.Property<
long>(
"InstanceId")
355 .HasColumnType(
"bigint");
357 b.Property<DateTimeOffset?>(
"StartedAt")
359 .HasColumnType(
"datetime(6)");
361 b.Property<
long>(
"StartedById")
362 .HasColumnType(
"bigint");
364 b.Property<DateTimeOffset?>(
"StoppedAt")
365 .HasColumnType(
"datetime(6)");
369 b.HasIndex(
"CancelledById");
371 b.HasIndex(
"InstanceId");
373 b.HasIndex(
"StartedById");
378 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
380 b.Property<
long>(
"Id")
381 .ValueGeneratedOnAdd()
382 .HasColumnType(
"bigint");
384 b.Property<
string>(
"AccessIdentifier")
386 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
388 b.Property<
long>(
"CompileJobId")
389 .HasColumnType(
"bigint");
391 b.Property<
bool>(
"IsPrimary")
392 .HasColumnType(
"tinyint(1)");
394 b.Property<
int>(
"LaunchSecurityLevel")
395 .HasColumnType(
"int");
397 b.Property<ushort>(
"Port")
398 .HasColumnType(
"smallint unsigned");
400 b.Property<
int>(
"ProcessId")
401 .HasColumnType(
"int");
403 b.Property<
int>(
"RebootState")
404 .HasColumnType(
"int");
408 b.HasIndex(
"CompileJobId");
410 b.ToTable(
"ReattachInformations");
413 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
415 b.Property<
long>(
"Id")
416 .ValueGeneratedOnAdd()
417 .HasColumnType(
"bigint");
419 b.Property<
string>(
"AccessToken")
420 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
421 .HasMaxLength(10000);
423 b.Property<
string>(
"AccessUser")
424 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
425 .HasMaxLength(10000);
427 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
429 .HasColumnType(
"tinyint(1)");
431 b.Property<
bool?>(
"AutoUpdatesSynchronize")
433 .HasColumnType(
"tinyint(1)");
435 b.Property<
string>(
"CommitterEmail")
437 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
438 .HasMaxLength(10000);
440 b.Property<
string>(
"CommitterName")
442 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
443 .HasMaxLength(10000);
445 b.Property<
long>(
"InstanceId")
446 .HasColumnType(
"bigint");
448 b.Property<
bool?>(
"PostTestMergeComment")
450 .HasColumnType(
"tinyint(1)");
452 b.Property<
bool?>(
"PushTestMergeCommits")
454 .HasColumnType(
"tinyint(1)");
456 b.Property<
bool?>(
"ShowTestMergeCommitters")
458 .HasColumnType(
"tinyint(1)");
462 b.HasIndex(
"InstanceId")
465 b.ToTable(
"RepositorySettings");
468 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
470 b.Property<
long>(
"Id")
471 .ValueGeneratedOnAdd()
472 .HasColumnType(
"bigint");
474 b.Property<
long>(
"RevisionInformationId")
475 .HasColumnType(
"bigint");
477 b.Property<
long>(
"TestMergeId")
478 .HasColumnType(
"bigint");
482 b.HasIndex(
"RevisionInformationId");
484 b.HasIndex(
"TestMergeId");
486 b.ToTable(
"RevInfoTestMerges");
489 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
491 b.Property<
long>(
"Id")
492 .ValueGeneratedOnAdd()
493 .HasColumnType(
"bigint");
495 b.Property<
string>(
"CommitSha")
497 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
500 b.Property<
long>(
"InstanceId")
501 .HasColumnType(
"bigint");
503 b.Property<
string>(
"OriginCommitSha")
505 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
510 b.HasIndex(
"InstanceId",
"CommitSha")
513 b.ToTable(
"RevisionInformations");
516 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
518 b.Property<
long>(
"Id")
519 .ValueGeneratedOnAdd()
520 .HasColumnType(
"bigint");
522 b.Property<
string>(
"Author")
524 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
526 b.Property<
string>(
"BodyAtMerge")
528 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
530 b.Property<
string>(
"Comment")
531 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
532 .HasMaxLength(10000);
534 b.Property<DateTimeOffset>(
"MergedAt")
535 .HasColumnType(
"datetime(6)");
537 b.Property<
long>(
"MergedById")
538 .HasColumnType(
"bigint");
540 b.Property<
int>(
"Number")
541 .HasColumnType(
"int");
543 b.Property<
long?>(
"PrimaryRevisionInformationId")
545 .HasColumnType(
"bigint");
547 b.Property<
string>(
"PullRequestRevision")
549 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
552 b.Property<
string>(
"TitleAtMerge")
554 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
556 b.Property<
string>(
"Url")
558 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
562 b.HasIndex(
"MergedById");
564 b.HasIndex(
"PrimaryRevisionInformationId")
567 b.ToTable(
"TestMerges");
570 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
572 b.Property<
long?>(
"Id")
573 .ValueGeneratedOnAdd()
574 .HasColumnType(
"bigint");
576 b.Property<ulong>(
"AdministrationRights")
577 .HasColumnType(
"bigint unsigned");
579 b.Property<
string>(
"CanonicalName")
581 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
583 b.Property<DateTimeOffset?>(
"CreatedAt")
585 .HasColumnType(
"datetime(6)");
587 b.Property<
long?>(
"CreatedById")
588 .HasColumnType(
"bigint");
590 b.Property<
bool?>(
"Enabled")
592 .HasColumnType(
"tinyint(1)");
594 b.Property<ulong>(
"InstanceManagerRights")
595 .HasColumnType(
"bigint unsigned");
597 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
598 .HasColumnType(
"datetime(6)");
600 b.Property<
string>(
"Name")
602 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
603 .HasMaxLength(10000);
605 b.Property<
string>(
"PasswordHash")
606 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
608 b.Property<
string>(
"SystemIdentifier")
609 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
613 b.HasIndex(
"CanonicalName")
616 b.HasIndex(
"CreatedById");
618 b.HasIndex(
"SystemIdentifier")
624 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
626 b.Property<
long>(
"Id")
627 .ValueGeneratedOnAdd()
628 .HasColumnType(
"bigint");
630 b.Property<
long?>(
"AlphaId")
631 .HasColumnType(
"bigint");
633 b.Property<
bool>(
"AlphaIsActive")
634 .HasColumnType(
"tinyint(1)");
636 b.Property<
long?>(
"BravoId")
637 .HasColumnType(
"bigint");
639 b.Property<
long>(
"InstanceId")
640 .HasColumnType(
"bigint");
644 b.HasIndex(
"AlphaId");
646 b.HasIndex(
"BravoId");
648 b.HasIndex(
"InstanceId")
651 b.ToTable(
"WatchdogReattachInformations");
654 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
656 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
657 .WithMany(
"ChatSettings")
658 .HasForeignKey(
"InstanceId")
659 .OnDelete(DeleteBehavior.Cascade)
663 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
665 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
666 .WithMany(
"Channels")
667 .HasForeignKey(
"ChatSettingsId")
668 .OnDelete(DeleteBehavior.Cascade)
672 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
674 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
676 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
677 .OnDelete(DeleteBehavior.Cascade)
680 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
681 .WithMany(
"CompileJobs")
682 .HasForeignKey(
"RevisionInformationId")
683 .OnDelete(DeleteBehavior.ClientNoAction)
687 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
689 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
690 .WithOne(
"DreamDaemonSettings")
691 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
692 .OnDelete(DeleteBehavior.Cascade)
696 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
698 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
699 .WithOne(
"DreamMakerSettings")
700 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
701 .OnDelete(DeleteBehavior.Cascade)
705 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
707 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
708 .WithMany(
"InstanceUsers")
709 .HasForeignKey(
"InstanceId")
710 .OnDelete(DeleteBehavior.Cascade)
713 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
714 .WithMany(
"InstanceUsers")
715 .HasForeignKey(
"UserId")
716 .OnDelete(DeleteBehavior.Cascade)
720 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
722 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
724 .HasForeignKey(
"CancelledById");
726 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
728 .HasForeignKey(
"InstanceId")
729 .OnDelete(DeleteBehavior.Cascade)
732 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
734 .HasForeignKey(
"StartedById")
735 .OnDelete(DeleteBehavior.Cascade)
739 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
741 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
743 .HasForeignKey(
"CompileJobId")
744 .OnDelete(DeleteBehavior.Cascade)
748 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
750 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
751 .WithOne(
"RepositorySettings")
752 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
753 .OnDelete(DeleteBehavior.Cascade)
757 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
759 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
760 .WithMany(
"ActiveTestMerges")
761 .HasForeignKey(
"RevisionInformationId")
762 .OnDelete(DeleteBehavior.Cascade)
765 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
766 .WithMany(
"RevisonInformations")
767 .HasForeignKey(
"TestMergeId")
768 .OnDelete(DeleteBehavior.ClientNoAction)
772 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
774 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
775 .WithMany(
"RevisionInformations")
776 .HasForeignKey(
"InstanceId")
777 .OnDelete(DeleteBehavior.Cascade)
781 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
783 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
784 .WithMany(
"TestMerges")
785 .HasForeignKey(
"MergedById")
786 .OnDelete(DeleteBehavior.Restrict)
789 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
790 .WithOne(
"PrimaryTestMerge")
791 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
792 .OnDelete(DeleteBehavior.Cascade)
796 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
798 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
799 .WithMany(
"CreatedUsers")
800 .HasForeignKey(
"CreatedById");
803 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
805 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
807 .HasForeignKey(
"AlphaId");
809 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
811 .HasForeignKey(
"BravoId");
813 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
814 .WithOne(
"WatchdogReattachInformation")
815 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
816 .OnDelete(DeleteBehavior.Cascade)
819#pragma warning restore 612, 618