16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.6")
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<
int?>(
"GitHubDeploymentId")
133 .HasColumnType(
"int");
135 b.Property<
long?>(
"GitHubRepoId")
136 .HasColumnType(
"bigint");
138 b.Property<
long>(
"JobId")
139 .HasColumnType(
"bigint");
141 b.Property<
int?>(
"MinimumSecurityLevel")
142 .HasColumnType(
"int");
144 b.Property<
string>(
"Output")
146 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
148 b.Property<
long>(
"RevisionInformationId")
149 .HasColumnType(
"bigint");
153 b.HasIndex(
"DirectoryName");
158 b.HasIndex(
"RevisionInformationId");
160 b.ToTable(
"CompileJobs");
163 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
165 b.Property<
long>(
"Id")
166 .ValueGeneratedOnAdd()
167 .HasColumnType(
"bigint");
169 b.Property<
bool?>(
"AllowWebClient")
171 .HasColumnType(
"tinyint(1)");
173 b.Property<
bool?>(
"AutoStart")
175 .HasColumnType(
"tinyint(1)");
177 b.Property<uint?>(
"HeartbeatSeconds")
179 .HasColumnType(
"int unsigned");
181 b.Property<
long>(
"InstanceId")
182 .HasColumnType(
"bigint");
184 b.Property<ushort?>(
"Port")
186 .HasColumnType(
"smallint unsigned");
188 b.Property<
int>(
"SecurityLevel")
189 .HasColumnType(
"int");
191 b.Property<uint?>(
"StartupTimeout")
193 .HasColumnType(
"int unsigned");
195 b.Property<uint?>(
"TopicRequestTimeout")
197 .HasColumnType(
"int unsigned");
201 b.HasIndex(
"InstanceId")
204 b.ToTable(
"DreamDaemonSettings");
207 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
209 b.Property<
long>(
"Id")
210 .ValueGeneratedOnAdd()
211 .HasColumnType(
"bigint");
213 b.Property<ushort?>(
"ApiValidationPort")
215 .HasColumnType(
"smallint unsigned");
217 b.Property<
int>(
"ApiValidationSecurityLevel")
218 .HasColumnType(
"int");
220 b.Property<
long>(
"InstanceId")
221 .HasColumnType(
"bigint");
223 b.Property<
string>(
"ProjectName")
224 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
225 .HasMaxLength(10000);
227 b.Property<
bool?>(
"RequireDMApiValidation")
229 .HasColumnType(
"tinyint(1)");
233 b.HasIndex(
"InstanceId")
236 b.ToTable(
"DreamMakerSettings");
239 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
241 b.Property<
long>(
"Id")
242 .ValueGeneratedOnAdd()
243 .HasColumnType(
"bigint");
245 b.Property<uint?>(
"AutoUpdateInterval")
247 .HasColumnType(
"int unsigned");
249 b.Property<ushort?>(
"ChatBotLimit")
251 .HasColumnType(
"smallint unsigned");
253 b.Property<
int>(
"ConfigurationType")
254 .HasColumnType(
"int");
256 b.Property<
string>(
"Name")
258 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
259 .HasMaxLength(10000);
261 b.Property<
bool?>(
"Online")
263 .HasColumnType(
"tinyint(1)");
265 b.Property<
string>(
"Path")
267 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
274 b.ToTable(
"Instances");
277 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
279 b.Property<
long>(
"Id")
280 .ValueGeneratedOnAdd()
281 .HasColumnType(
"bigint");
283 b.Property<ulong>(
"ByondRights")
284 .HasColumnType(
"bigint unsigned");
286 b.Property<ulong>(
"ChatBotRights")
287 .HasColumnType(
"bigint unsigned");
289 b.Property<ulong>(
"ConfigurationRights")
290 .HasColumnType(
"bigint unsigned");
292 b.Property<ulong>(
"DreamDaemonRights")
293 .HasColumnType(
"bigint unsigned");
295 b.Property<ulong>(
"DreamMakerRights")
296 .HasColumnType(
"bigint unsigned");
298 b.Property<
long>(
"InstanceId")
299 .HasColumnType(
"bigint");
301 b.Property<ulong>(
"InstanceUserRights")
302 .HasColumnType(
"bigint unsigned");
304 b.Property<ulong>(
"RepositoryRights")
305 .HasColumnType(
"bigint unsigned");
307 b.Property<
long>(
"UserId")
308 .HasColumnType(
"bigint");
312 b.HasIndex(
"InstanceId");
314 b.HasIndex(
"UserId",
"InstanceId")
317 b.ToTable(
"InstanceUsers");
320 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
322 b.Property<
long>(
"Id")
323 .ValueGeneratedOnAdd()
324 .HasColumnType(
"bigint");
326 b.Property<ulong?>(
"CancelRight")
327 .HasColumnType(
"bigint unsigned");
329 b.Property<ulong?>(
"CancelRightsType")
330 .HasColumnType(
"bigint unsigned");
332 b.Property<
bool?>(
"Cancelled")
334 .HasColumnType(
"tinyint(1)");
336 b.Property<
long?>(
"CancelledById")
337 .HasColumnType(
"bigint");
339 b.Property<
string>(
"Description")
341 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
343 b.Property<uint?>(
"ErrorCode")
344 .HasColumnType(
"int unsigned");
346 b.Property<
string>(
"ExceptionDetails")
347 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
349 b.Property<
long>(
"InstanceId")
350 .HasColumnType(
"bigint");
352 b.Property<DateTimeOffset?>(
"StartedAt")
354 .HasColumnType(
"datetime(6)");
356 b.Property<
long>(
"StartedById")
357 .HasColumnType(
"bigint");
359 b.Property<DateTimeOffset?>(
"StoppedAt")
360 .HasColumnType(
"datetime(6)");
364 b.HasIndex(
"CancelledById");
366 b.HasIndex(
"InstanceId");
368 b.HasIndex(
"StartedById");
373 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
375 b.Property<
long>(
"Id")
376 .ValueGeneratedOnAdd()
377 .HasColumnType(
"bigint");
379 b.Property<
string>(
"AccessIdentifier")
381 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
383 b.Property<
long>(
"CompileJobId")
384 .HasColumnType(
"bigint");
386 b.Property<
int>(
"LaunchSecurityLevel")
387 .HasColumnType(
"int");
389 b.Property<ushort>(
"Port")
390 .HasColumnType(
"smallint unsigned");
392 b.Property<
int>(
"ProcessId")
393 .HasColumnType(
"int");
395 b.Property<
int>(
"RebootState")
396 .HasColumnType(
"int");
400 b.HasIndex(
"CompileJobId");
402 b.ToTable(
"ReattachInformations");
405 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
407 b.Property<
long>(
"Id")
408 .ValueGeneratedOnAdd()
409 .HasColumnType(
"bigint");
411 b.Property<
string>(
"AccessToken")
412 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
413 .HasMaxLength(10000);
415 b.Property<
string>(
"AccessUser")
416 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
417 .HasMaxLength(10000);
419 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
421 .HasColumnType(
"tinyint(1)");
423 b.Property<
bool?>(
"AutoUpdatesSynchronize")
425 .HasColumnType(
"tinyint(1)");
427 b.Property<
string>(
"CommitterEmail")
429 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
430 .HasMaxLength(10000);
432 b.Property<
string>(
"CommitterName")
434 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
435 .HasMaxLength(10000);
437 b.Property<
bool?>(
"CreateGitHubDeployments")
439 .HasColumnType(
"tinyint(1)");
441 b.Property<
long>(
"InstanceId")
442 .HasColumnType(
"bigint");
444 b.Property<
bool?>(
"PostTestMergeComment")
446 .HasColumnType(
"tinyint(1)");
448 b.Property<
bool?>(
"PushTestMergeCommits")
450 .HasColumnType(
"tinyint(1)");
452 b.Property<
bool?>(
"ShowTestMergeCommitters")
454 .HasColumnType(
"tinyint(1)");
458 b.HasIndex(
"InstanceId")
461 b.ToTable(
"RepositorySettings");
464 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
466 b.Property<
long>(
"Id")
467 .ValueGeneratedOnAdd()
468 .HasColumnType(
"bigint");
470 b.Property<
long>(
"RevisionInformationId")
471 .HasColumnType(
"bigint");
473 b.Property<
long>(
"TestMergeId")
474 .HasColumnType(
"bigint");
478 b.HasIndex(
"RevisionInformationId");
480 b.HasIndex(
"TestMergeId");
482 b.ToTable(
"RevInfoTestMerges");
485 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
487 b.Property<
long>(
"Id")
488 .ValueGeneratedOnAdd()
489 .HasColumnType(
"bigint");
491 b.Property<
string>(
"CommitSha")
493 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
496 b.Property<
long>(
"InstanceId")
497 .HasColumnType(
"bigint");
499 b.Property<
string>(
"OriginCommitSha")
501 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
506 b.HasIndex(
"InstanceId",
"CommitSha")
509 b.ToTable(
"RevisionInformations");
512 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
514 b.Property<
long>(
"Id")
515 .ValueGeneratedOnAdd()
516 .HasColumnType(
"bigint");
518 b.Property<
string>(
"Author")
520 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
522 b.Property<
string>(
"BodyAtMerge")
524 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
526 b.Property<
string>(
"Comment")
527 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
528 .HasMaxLength(10000);
530 b.Property<DateTimeOffset>(
"MergedAt")
531 .HasColumnType(
"datetime(6)");
533 b.Property<
long>(
"MergedById")
534 .HasColumnType(
"bigint");
536 b.Property<
int>(
"Number")
537 .HasColumnType(
"int");
539 b.Property<
long?>(
"PrimaryRevisionInformationId")
541 .HasColumnType(
"bigint");
543 b.Property<
string>(
"PullRequestRevision")
545 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
548 b.Property<
string>(
"TitleAtMerge")
550 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
552 b.Property<
string>(
"Url")
554 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
558 b.HasIndex(
"MergedById");
560 b.HasIndex(
"PrimaryRevisionInformationId")
563 b.ToTable(
"TestMerges");
566 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
568 b.Property<
long?>(
"Id")
569 .ValueGeneratedOnAdd()
570 .HasColumnType(
"bigint");
572 b.Property<ulong>(
"AdministrationRights")
573 .HasColumnType(
"bigint unsigned");
575 b.Property<
string>(
"CanonicalName")
577 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
579 b.Property<DateTimeOffset?>(
"CreatedAt")
581 .HasColumnType(
"datetime(6)");
583 b.Property<
long?>(
"CreatedById")
584 .HasColumnType(
"bigint");
586 b.Property<
bool?>(
"Enabled")
588 .HasColumnType(
"tinyint(1)");
590 b.Property<ulong>(
"InstanceManagerRights")
591 .HasColumnType(
"bigint unsigned");
593 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
594 .HasColumnType(
"datetime(6)");
596 b.Property<
string>(
"Name")
598 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
599 .HasMaxLength(10000);
601 b.Property<
string>(
"PasswordHash")
602 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
604 b.Property<
string>(
"SystemIdentifier")
605 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
609 b.HasIndex(
"CanonicalName")
612 b.HasIndex(
"CreatedById");
614 b.HasIndex(
"SystemIdentifier")
620 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
622 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
623 .WithMany(
"ChatSettings")
624 .HasForeignKey(
"InstanceId")
625 .OnDelete(DeleteBehavior.Cascade)
629 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
631 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
632 .WithMany(
"Channels")
633 .HasForeignKey(
"ChatSettingsId")
634 .OnDelete(DeleteBehavior.Cascade)
638 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
640 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
642 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
643 .OnDelete(DeleteBehavior.Cascade)
646 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
647 .WithMany(
"CompileJobs")
648 .HasForeignKey(
"RevisionInformationId")
649 .OnDelete(DeleteBehavior.Cascade)
653 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
655 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
656 .WithOne(
"DreamDaemonSettings")
657 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
658 .OnDelete(DeleteBehavior.Cascade)
662 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
664 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
665 .WithOne(
"DreamMakerSettings")
666 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
667 .OnDelete(DeleteBehavior.Cascade)
671 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
673 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
674 .WithMany(
"InstanceUsers")
675 .HasForeignKey(
"InstanceId")
676 .OnDelete(DeleteBehavior.Cascade)
679 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
680 .WithMany(
"InstanceUsers")
681 .HasForeignKey(
"UserId")
682 .OnDelete(DeleteBehavior.Cascade)
686 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
688 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
690 .HasForeignKey(
"CancelledById");
692 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
694 .HasForeignKey(
"InstanceId")
695 .OnDelete(DeleteBehavior.Cascade)
698 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
700 .HasForeignKey(
"StartedById")
701 .OnDelete(DeleteBehavior.Cascade)
705 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
707 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
709 .HasForeignKey(
"CompileJobId")
710 .OnDelete(DeleteBehavior.Cascade)
714 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
716 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
717 .WithOne(
"RepositorySettings")
718 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
719 .OnDelete(DeleteBehavior.Cascade)
723 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
725 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
726 .WithMany(
"ActiveTestMerges")
727 .HasForeignKey(
"RevisionInformationId")
728 .OnDelete(DeleteBehavior.Cascade)
731 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
732 .WithMany(
"RevisonInformations")
733 .HasForeignKey(
"TestMergeId")
734 .OnDelete(DeleteBehavior.ClientNoAction)
738 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
740 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
741 .WithMany(
"RevisionInformations")
742 .HasForeignKey(
"InstanceId")
743 .OnDelete(DeleteBehavior.Cascade)
747 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
749 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
750 .WithMany(
"TestMerges")
751 .HasForeignKey(
"MergedById")
752 .OnDelete(DeleteBehavior.Restrict)
755 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
756 .WithOne(
"PrimaryTestMerge")
757 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
758 .OnDelete(DeleteBehavior.Cascade)
762 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
764 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
765 .WithMany(
"CreatedUsers")
766 .HasForeignKey(
"CreatedById");
768#pragma warning restore 612, 618