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");
193 b.Property<uint?>(
"TopicRequestTimeout")
195 .HasColumnType(
"int unsigned");
199 b.HasIndex(
"InstanceId")
202 b.ToTable(
"DreamDaemonSettings");
205 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
207 b.Property<
long>(
"Id")
208 .ValueGeneratedOnAdd()
209 .HasColumnType(
"bigint");
211 b.Property<ushort?>(
"ApiValidationPort")
213 .HasColumnType(
"smallint unsigned");
215 b.Property<
int>(
"ApiValidationSecurityLevel")
216 .HasColumnType(
"int");
218 b.Property<
long>(
"InstanceId")
219 .HasColumnType(
"bigint");
221 b.Property<
string>(
"ProjectName")
222 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
223 .HasMaxLength(10000);
227 b.HasIndex(
"InstanceId")
230 b.ToTable(
"DreamMakerSettings");
233 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DualReattachInformation", b =>
235 b.Property<
long>(
"Id")
236 .ValueGeneratedOnAdd()
237 .HasColumnType(
"bigint");
239 b.Property<
long?>(
"AlphaId")
240 .HasColumnType(
"bigint");
242 b.Property<
bool>(
"AlphaIsActive")
243 .HasColumnType(
"tinyint(1)");
245 b.Property<
long?>(
"BravoId")
246 .HasColumnType(
"bigint");
248 b.Property<
long>(
"InstanceId")
249 .HasColumnType(
"bigint");
253 b.HasIndex(
"AlphaId");
255 b.HasIndex(
"BravoId");
257 b.HasIndex(
"InstanceId")
260 b.ToTable(
"WatchdogReattachInformations");
263 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
265 b.Property<
long>(
"Id")
266 .ValueGeneratedOnAdd()
267 .HasColumnType(
"bigint");
269 b.Property<uint?>(
"AutoUpdateInterval")
271 .HasColumnType(
"int unsigned");
273 b.Property<ushort?>(
"ChatBotLimit")
275 .HasColumnType(
"smallint unsigned");
277 b.Property<
int>(
"ConfigurationType")
278 .HasColumnType(
"int");
280 b.Property<
string>(
"Name")
282 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
283 .HasMaxLength(10000);
285 b.Property<
bool?>(
"Online")
287 .HasColumnType(
"tinyint(1)");
289 b.Property<
string>(
"Path")
291 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
298 b.ToTable(
"Instances");
301 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
303 b.Property<
long>(
"Id")
304 .ValueGeneratedOnAdd()
305 .HasColumnType(
"bigint");
307 b.Property<ulong>(
"ByondRights")
308 .HasColumnType(
"bigint unsigned");
310 b.Property<ulong>(
"ChatBotRights")
311 .HasColumnType(
"bigint unsigned");
313 b.Property<ulong>(
"ConfigurationRights")
314 .HasColumnType(
"bigint unsigned");
316 b.Property<ulong>(
"DreamDaemonRights")
317 .HasColumnType(
"bigint unsigned");
319 b.Property<ulong>(
"DreamMakerRights")
320 .HasColumnType(
"bigint unsigned");
322 b.Property<
long>(
"InstanceId")
323 .HasColumnType(
"bigint");
325 b.Property<ulong>(
"InstanceUserRights")
326 .HasColumnType(
"bigint unsigned");
328 b.Property<ulong>(
"RepositoryRights")
329 .HasColumnType(
"bigint unsigned");
331 b.Property<
long?>(
"UserId")
333 .HasColumnType(
"bigint");
337 b.HasIndex(
"InstanceId");
339 b.HasIndex(
"UserId",
"InstanceId")
342 b.ToTable(
"InstanceUsers");
345 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
347 b.Property<
long>(
"Id")
348 .ValueGeneratedOnAdd()
349 .HasColumnType(
"bigint");
351 b.Property<ulong?>(
"CancelRight")
352 .HasColumnType(
"bigint unsigned");
354 b.Property<ulong?>(
"CancelRightsType")
355 .HasColumnType(
"bigint unsigned");
357 b.Property<
bool?>(
"Cancelled")
359 .HasColumnType(
"tinyint(1)");
361 b.Property<
long?>(
"CancelledById")
362 .HasColumnType(
"bigint");
364 b.Property<
string>(
"Description")
366 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
368 b.Property<uint?>(
"ErrorCode")
369 .HasColumnType(
"int unsigned");
371 b.Property<
string>(
"ExceptionDetails")
372 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
374 b.Property<
long>(
"InstanceId")
375 .HasColumnType(
"bigint");
377 b.Property<DateTimeOffset?>(
"StartedAt")
379 .HasColumnType(
"datetime(6)");
381 b.Property<
long>(
"StartedById")
382 .HasColumnType(
"bigint");
384 b.Property<DateTimeOffset?>(
"StoppedAt")
385 .HasColumnType(
"datetime(6)");
389 b.HasIndex(
"CancelledById");
391 b.HasIndex(
"InstanceId");
393 b.HasIndex(
"StartedById");
398 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
400 b.Property<
long>(
"Id")
401 .ValueGeneratedOnAdd()
402 .HasColumnType(
"bigint");
404 b.Property<
string>(
"AccessIdentifier")
406 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
408 b.Property<
long>(
"CompileJobId")
409 .HasColumnType(
"bigint");
411 b.Property<
bool>(
"IsPrimary")
412 .HasColumnType(
"tinyint(1)");
414 b.Property<
int>(
"LaunchSecurityLevel")
415 .HasColumnType(
"int");
417 b.Property<ushort>(
"Port")
418 .HasColumnType(
"smallint unsigned");
420 b.Property<
int>(
"ProcessId")
421 .HasColumnType(
"int");
423 b.Property<
int>(
"RebootState")
424 .HasColumnType(
"int");
428 b.HasIndex(
"CompileJobId");
430 b.ToTable(
"ReattachInformations");
433 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
435 b.Property<
long>(
"Id")
436 .ValueGeneratedOnAdd()
437 .HasColumnType(
"bigint");
439 b.Property<
string>(
"AccessToken")
440 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
441 .HasMaxLength(10000);
443 b.Property<
string>(
"AccessUser")
444 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
445 .HasMaxLength(10000);
447 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
449 .HasColumnType(
"tinyint(1)");
451 b.Property<
bool?>(
"AutoUpdatesSynchronize")
453 .HasColumnType(
"tinyint(1)");
455 b.Property<
string>(
"CommitterEmail")
457 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
458 .HasMaxLength(10000);
460 b.Property<
string>(
"CommitterName")
462 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
463 .HasMaxLength(10000);
465 b.Property<
long>(
"InstanceId")
466 .HasColumnType(
"bigint");
468 b.Property<
bool?>(
"PostTestMergeComment")
470 .HasColumnType(
"tinyint(1)");
472 b.Property<
bool?>(
"PushTestMergeCommits")
474 .HasColumnType(
"tinyint(1)");
476 b.Property<
bool?>(
"ShowTestMergeCommitters")
478 .HasColumnType(
"tinyint(1)");
482 b.HasIndex(
"InstanceId")
485 b.ToTable(
"RepositorySettings");
488 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
490 b.Property<
long>(
"Id")
491 .ValueGeneratedOnAdd()
492 .HasColumnType(
"bigint");
494 b.Property<
long>(
"RevisionInformationId")
495 .HasColumnType(
"bigint");
497 b.Property<
long>(
"TestMergeId")
498 .HasColumnType(
"bigint");
502 b.HasIndex(
"RevisionInformationId");
504 b.HasIndex(
"TestMergeId");
506 b.ToTable(
"RevInfoTestMerges");
509 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
511 b.Property<
long>(
"Id")
512 .ValueGeneratedOnAdd()
513 .HasColumnType(
"bigint");
515 b.Property<
string>(
"CommitSha")
517 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
520 b.Property<
long>(
"InstanceId")
521 .HasColumnType(
"bigint");
523 b.Property<
string>(
"OriginCommitSha")
525 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
530 b.HasIndex(
"InstanceId",
"CommitSha")
533 b.ToTable(
"RevisionInformations");
536 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
538 b.Property<
long>(
"Id")
539 .ValueGeneratedOnAdd()
540 .HasColumnType(
"bigint");
542 b.Property<
string>(
"Author")
544 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
546 b.Property<
string>(
"BodyAtMerge")
548 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
550 b.Property<
string>(
"Comment")
551 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
552 .HasMaxLength(10000);
554 b.Property<DateTimeOffset>(
"MergedAt")
555 .HasColumnType(
"datetime(6)");
557 b.Property<
long>(
"MergedById")
558 .HasColumnType(
"bigint");
560 b.Property<
int>(
"Number")
561 .HasColumnType(
"int");
563 b.Property<
long?>(
"PrimaryRevisionInformationId")
565 .HasColumnType(
"bigint");
567 b.Property<
string>(
"PullRequestRevision")
569 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
572 b.Property<
string>(
"TitleAtMerge")
574 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
576 b.Property<
string>(
"Url")
578 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
582 b.HasIndex(
"MergedById");
584 b.HasIndex(
"PrimaryRevisionInformationId")
587 b.ToTable(
"TestMerges");
590 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
592 b.Property<
long?>(
"Id")
593 .ValueGeneratedOnAdd()
594 .HasColumnType(
"bigint");
596 b.Property<ulong>(
"AdministrationRights")
597 .HasColumnType(
"bigint unsigned");
599 b.Property<
string>(
"CanonicalName")
601 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
603 b.Property<DateTimeOffset?>(
"CreatedAt")
605 .HasColumnType(
"datetime(6)");
607 b.Property<
long?>(
"CreatedById")
608 .HasColumnType(
"bigint");
610 b.Property<
bool?>(
"Enabled")
612 .HasColumnType(
"tinyint(1)");
614 b.Property<ulong>(
"InstanceManagerRights")
615 .HasColumnType(
"bigint unsigned");
617 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
618 .HasColumnType(
"datetime(6)");
620 b.Property<
string>(
"Name")
622 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
623 .HasMaxLength(10000);
625 b.Property<
string>(
"PasswordHash")
626 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
628 b.Property<
string>(
"SystemIdentifier")
629 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
633 b.HasIndex(
"CanonicalName")
636 b.HasIndex(
"CreatedById");
638 b.HasIndex(
"SystemIdentifier")
644 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
646 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
647 .WithMany(
"ChatSettings")
648 .HasForeignKey(
"InstanceId")
649 .OnDelete(DeleteBehavior.Cascade)
653 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
655 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
656 .WithMany(
"Channels")
657 .HasForeignKey(
"ChatSettingsId")
658 .OnDelete(DeleteBehavior.Cascade)
662 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
664 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
666 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
667 .OnDelete(DeleteBehavior.Cascade)
670 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
671 .WithMany(
"CompileJobs")
672 .HasForeignKey(
"RevisionInformationId")
673 .OnDelete(DeleteBehavior.Cascade)
677 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
679 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
680 .WithOne(
"DreamDaemonSettings")
681 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
682 .OnDelete(DeleteBehavior.Cascade)
686 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
688 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
689 .WithOne(
"DreamMakerSettings")
690 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
691 .OnDelete(DeleteBehavior.Cascade)
695 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DualReattachInformation", b =>
697 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
699 .HasForeignKey(
"AlphaId");
701 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
703 .HasForeignKey(
"BravoId");
705 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
706 .WithOne(
"WatchdogReattachInformation")
707 .HasForeignKey(
"Tgstation.Server.Host.Models.DualReattachInformation",
"InstanceId")
708 .OnDelete(DeleteBehavior.Cascade)
712 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
714 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
715 .WithMany(
"InstanceUsers")
716 .HasForeignKey(
"InstanceId")
717 .OnDelete(DeleteBehavior.Cascade)
720 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
721 .WithMany(
"InstanceUsers")
722 .HasForeignKey(
"UserId")
723 .OnDelete(DeleteBehavior.Cascade)
727 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
729 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
731 .HasForeignKey(
"CancelledById");
733 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
735 .HasForeignKey(
"InstanceId")
736 .OnDelete(DeleteBehavior.Cascade)
739 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
741 .HasForeignKey(
"StartedById")
742 .OnDelete(DeleteBehavior.Cascade)
746 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
748 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
750 .HasForeignKey(
"CompileJobId")
751 .OnDelete(DeleteBehavior.Cascade)
755 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
757 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
758 .WithOne(
"RepositorySettings")
759 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
760 .OnDelete(DeleteBehavior.Cascade)
764 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
766 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
767 .WithMany(
"ActiveTestMerges")
768 .HasForeignKey(
"RevisionInformationId")
769 .OnDelete(DeleteBehavior.Cascade)
772 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
773 .WithMany(
"RevisonInformations")
774 .HasForeignKey(
"TestMergeId")
775 .OnDelete(DeleteBehavior.ClientNoAction)
779 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
781 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
782 .WithMany(
"RevisionInformations")
783 .HasForeignKey(
"InstanceId")
784 .OnDelete(DeleteBehavior.Cascade)
788 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
790 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
791 .WithMany(
"TestMerges")
792 .HasForeignKey(
"MergedById")
793 .OnDelete(DeleteBehavior.Restrict)
796 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
797 .WithOne(
"PrimaryTestMerge")
798 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
799 .OnDelete(DeleteBehavior.Cascade)
803 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
805 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
806 .WithMany(
"CreatedUsers")
807 .HasForeignKey(
"CreatedById");
809#pragma warning restore 612, 618