17#pragma warning disable 612, 618
19 .HasAnnotation(
"ProductVersion",
"3.1.7")
20 .HasAnnotation(
"Relational:MaxIdentifierLength", 64);
22 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
24 b.Property<
long>(
"Id")
25 .ValueGeneratedOnAdd()
26 .HasColumnType(
"bigint");
28 b.Property<ushort?>(
"ChannelLimit")
30 .HasColumnType(
"smallint unsigned");
32 b.Property<
string>(
"ConnectionString")
34 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
37 b.Property<
bool?>(
"Enabled")
38 .HasColumnType(
"tinyint(1)");
40 b.Property<
long>(
"InstanceId")
41 .HasColumnType(
"bigint");
43 b.Property<
string>(
"Name")
45 .HasColumnType(
"varchar(100) CHARACTER SET utf8mb4")
48 b.Property<
int>(
"Provider")
49 .HasColumnType(
"int");
51 b.Property<uint?>(
"ReconnectionInterval")
53 .HasColumnType(
"int unsigned");
57 b.HasIndex(
"InstanceId",
"Name")
60 b.ToTable(
"ChatBots");
63 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
65 b.Property<
long>(
"Id")
66 .ValueGeneratedOnAdd()
67 .HasColumnType(
"bigint");
69 b.Property<
long>(
"ChatSettingsId")
70 .HasColumnType(
"bigint");
72 b.Property<ulong?>(
"DiscordChannelId")
73 .HasColumnType(
"bigint unsigned");
75 b.Property<
string>(
"IrcChannel")
76 .HasColumnType(
"varchar(100) CHARACTER SET utf8mb4")
79 b.Property<
bool?>(
"IsAdminChannel")
81 .HasColumnType(
"tinyint(1)");
83 b.Property<
bool?>(
"IsUpdatesChannel")
85 .HasColumnType(
"tinyint(1)");
87 b.Property<
bool?>(
"IsWatchdogChannel")
89 .HasColumnType(
"tinyint(1)");
91 b.Property<
string>(
"Tag")
92 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
97 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
100 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
103 b.ToTable(
"ChatChannels");
106 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
108 b.Property<
long>(
"Id")
109 .ValueGeneratedOnAdd()
110 .HasColumnType(
"bigint");
112 b.Property<
string>(
"ByondVersion")
114 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
116 b.Property<
int?>(
"DMApiMajorVersion")
117 .HasColumnType(
"int");
119 b.Property<
int?>(
"DMApiMinorVersion")
120 .HasColumnType(
"int");
122 b.Property<
int?>(
"DMApiPatchVersion")
123 .HasColumnType(
"int");
125 b.Property<Guid?>(
"DirectoryName")
127 .HasColumnType(
"char(36)");
129 b.Property<
string>(
"DmeName")
131 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
133 b.Property<
int?>(
"GitHubDeploymentId")
134 .HasColumnType(
"int");
136 b.Property<
long?>(
"GitHubRepoId")
137 .HasColumnType(
"bigint");
139 b.Property<
long>(
"JobId")
140 .HasColumnType(
"bigint");
142 b.Property<
int?>(
"MinimumSecurityLevel")
143 .HasColumnType(
"int");
145 b.Property<
string>(
"Output")
147 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
149 b.Property<
long>(
"RevisionInformationId")
150 .HasColumnType(
"bigint");
154 b.HasIndex(
"DirectoryName");
159 b.HasIndex(
"RevisionInformationId");
161 b.ToTable(
"CompileJobs");
164 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
166 b.Property<
long>(
"Id")
167 .ValueGeneratedOnAdd()
168 .HasColumnType(
"bigint");
170 b.Property<
string>(
"AdditionalParameters")
172 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
173 .HasMaxLength(10000);
175 b.Property<
bool?>(
"AllowWebClient")
177 .HasColumnType(
"tinyint(1)");
179 b.Property<
bool?>(
"AutoStart")
181 .HasColumnType(
"tinyint(1)");
183 b.Property<uint?>(
"HeartbeatSeconds")
185 .HasColumnType(
"int unsigned");
187 b.Property<
long>(
"InstanceId")
188 .HasColumnType(
"bigint");
190 b.Property<ushort?>(
"Port")
192 .HasColumnType(
"smallint unsigned");
194 b.Property<
int>(
"SecurityLevel")
195 .HasColumnType(
"int");
197 b.Property<uint?>(
"StartupTimeout")
199 .HasColumnType(
"int unsigned");
201 b.Property<uint?>(
"TopicRequestTimeout")
203 .HasColumnType(
"int unsigned");
207 b.HasIndex(
"InstanceId")
210 b.ToTable(
"DreamDaemonSettings");
213 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
215 b.Property<
long>(
"Id")
216 .ValueGeneratedOnAdd()
217 .HasColumnType(
"bigint");
219 b.Property<ushort?>(
"ApiValidationPort")
221 .HasColumnType(
"smallint unsigned");
223 b.Property<
int>(
"ApiValidationSecurityLevel")
224 .HasColumnType(
"int");
226 b.Property<
long>(
"InstanceId")
227 .HasColumnType(
"bigint");
229 b.Property<
string>(
"ProjectName")
230 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
231 .HasMaxLength(10000);
233 b.Property<
bool?>(
"RequireDMApiValidation")
235 .HasColumnType(
"tinyint(1)");
239 b.HasIndex(
"InstanceId")
242 b.ToTable(
"DreamMakerSettings");
245 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
247 b.Property<
long>(
"Id")
248 .ValueGeneratedOnAdd()
249 .HasColumnType(
"bigint");
251 b.Property<uint?>(
"AutoUpdateInterval")
253 .HasColumnType(
"int unsigned");
255 b.Property<ushort?>(
"ChatBotLimit")
257 .HasColumnType(
"smallint unsigned");
259 b.Property<
int>(
"ConfigurationType")
260 .HasColumnType(
"int");
262 b.Property<
string>(
"Name")
264 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
265 .HasMaxLength(10000);
267 b.Property<
bool?>(
"Online")
269 .HasColumnType(
"tinyint(1)");
271 b.Property<
string>(
"Path")
273 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
280 b.ToTable(
"Instances");
283 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
285 b.Property<
long>(
"Id")
286 .ValueGeneratedOnAdd()
287 .HasColumnType(
"bigint");
289 b.Property<ulong>(
"ByondRights")
290 .HasColumnType(
"bigint unsigned");
292 b.Property<ulong>(
"ChatBotRights")
293 .HasColumnType(
"bigint unsigned");
295 b.Property<ulong>(
"ConfigurationRights")
296 .HasColumnType(
"bigint unsigned");
298 b.Property<ulong>(
"DreamDaemonRights")
299 .HasColumnType(
"bigint unsigned");
301 b.Property<ulong>(
"DreamMakerRights")
302 .HasColumnType(
"bigint unsigned");
304 b.Property<
long>(
"InstanceId")
305 .HasColumnType(
"bigint");
307 b.Property<ulong>(
"InstanceUserRights")
308 .HasColumnType(
"bigint unsigned");
310 b.Property<ulong>(
"RepositoryRights")
311 .HasColumnType(
"bigint unsigned");
313 b.Property<
long>(
"UserId")
314 .HasColumnType(
"bigint");
318 b.HasIndex(
"InstanceId");
320 b.HasIndex(
"UserId",
"InstanceId")
323 b.ToTable(
"InstanceUsers");
326 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
328 b.Property<
long>(
"Id")
329 .ValueGeneratedOnAdd()
330 .HasColumnType(
"bigint");
332 b.Property<ulong?>(
"CancelRight")
333 .HasColumnType(
"bigint unsigned");
335 b.Property<ulong?>(
"CancelRightsType")
336 .HasColumnType(
"bigint unsigned");
338 b.Property<
bool?>(
"Cancelled")
340 .HasColumnType(
"tinyint(1)");
342 b.Property<
long?>(
"CancelledById")
343 .HasColumnType(
"bigint");
345 b.Property<
string>(
"Description")
347 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
349 b.Property<uint?>(
"ErrorCode")
350 .HasColumnType(
"int unsigned");
352 b.Property<
string>(
"ExceptionDetails")
353 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
355 b.Property<
long>(
"InstanceId")
356 .HasColumnType(
"bigint");
358 b.Property<DateTimeOffset?>(
"StartedAt")
360 .HasColumnType(
"datetime(6)");
362 b.Property<
long>(
"StartedById")
363 .HasColumnType(
"bigint");
365 b.Property<DateTimeOffset?>(
"StoppedAt")
366 .HasColumnType(
"datetime(6)");
370 b.HasIndex(
"CancelledById");
372 b.HasIndex(
"InstanceId");
374 b.HasIndex(
"StartedById");
379 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
381 b.Property<
long>(
"Id")
382 .ValueGeneratedOnAdd()
383 .HasColumnType(
"bigint");
385 b.Property<
string>(
"AccessIdentifier")
387 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
389 b.Property<
long>(
"CompileJobId")
390 .HasColumnType(
"bigint");
392 b.Property<
int>(
"LaunchSecurityLevel")
393 .HasColumnType(
"int");
395 b.Property<ushort>(
"Port")
396 .HasColumnType(
"smallint unsigned");
398 b.Property<
int>(
"ProcessId")
399 .HasColumnType(
"int");
401 b.Property<
int>(
"RebootState")
402 .HasColumnType(
"int");
406 b.HasIndex(
"CompileJobId");
408 b.ToTable(
"ReattachInformations");
411 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
413 b.Property<
long>(
"Id")
414 .ValueGeneratedOnAdd()
415 .HasColumnType(
"bigint");
417 b.Property<
string>(
"AccessToken")
418 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
419 .HasMaxLength(10000);
421 b.Property<
string>(
"AccessUser")
422 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
423 .HasMaxLength(10000);
425 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
427 .HasColumnType(
"tinyint(1)");
429 b.Property<
bool?>(
"AutoUpdatesSynchronize")
431 .HasColumnType(
"tinyint(1)");
433 b.Property<
string>(
"CommitterEmail")
435 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
436 .HasMaxLength(10000);
438 b.Property<
string>(
"CommitterName")
440 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
441 .HasMaxLength(10000);
443 b.Property<
bool?>(
"CreateGitHubDeployments")
445 .HasColumnType(
"tinyint(1)");
447 b.Property<
long>(
"InstanceId")
448 .HasColumnType(
"bigint");
450 b.Property<
bool?>(
"PostTestMergeComment")
452 .HasColumnType(
"tinyint(1)");
454 b.Property<
bool?>(
"PushTestMergeCommits")
456 .HasColumnType(
"tinyint(1)");
458 b.Property<
bool?>(
"ShowTestMergeCommitters")
460 .HasColumnType(
"tinyint(1)");
464 b.HasIndex(
"InstanceId")
467 b.ToTable(
"RepositorySettings");
470 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
472 b.Property<
long>(
"Id")
473 .ValueGeneratedOnAdd()
474 .HasColumnType(
"bigint");
476 b.Property<
long>(
"RevisionInformationId")
477 .HasColumnType(
"bigint");
479 b.Property<
long>(
"TestMergeId")
480 .HasColumnType(
"bigint");
484 b.HasIndex(
"RevisionInformationId");
486 b.HasIndex(
"TestMergeId");
488 b.ToTable(
"RevInfoTestMerges");
491 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
493 b.Property<
long>(
"Id")
494 .ValueGeneratedOnAdd()
495 .HasColumnType(
"bigint");
497 b.Property<
string>(
"CommitSha")
499 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
502 b.Property<
long>(
"InstanceId")
503 .HasColumnType(
"bigint");
505 b.Property<
string>(
"OriginCommitSha")
507 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
512 b.HasIndex(
"InstanceId",
"CommitSha")
515 b.ToTable(
"RevisionInformations");
518 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
520 b.Property<
long>(
"Id")
521 .ValueGeneratedOnAdd()
522 .HasColumnType(
"bigint");
524 b.Property<
string>(
"Author")
526 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
528 b.Property<
string>(
"BodyAtMerge")
530 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
532 b.Property<
string>(
"Comment")
533 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
534 .HasMaxLength(10000);
536 b.Property<DateTimeOffset>(
"MergedAt")
537 .HasColumnType(
"datetime(6)");
539 b.Property<
long>(
"MergedById")
540 .HasColumnType(
"bigint");
542 b.Property<
int>(
"Number")
543 .HasColumnType(
"int");
545 b.Property<
long?>(
"PrimaryRevisionInformationId")
547 .HasColumnType(
"bigint");
549 b.Property<
string>(
"PullRequestRevision")
551 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
554 b.Property<
string>(
"TitleAtMerge")
556 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
558 b.Property<
string>(
"Url")
560 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
564 b.HasIndex(
"MergedById");
566 b.HasIndex(
"PrimaryRevisionInformationId")
569 b.ToTable(
"TestMerges");
572 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
574 b.Property<
long?>(
"Id")
575 .ValueGeneratedOnAdd()
576 .HasColumnType(
"bigint");
578 b.Property<ulong>(
"AdministrationRights")
579 .HasColumnType(
"bigint unsigned");
581 b.Property<
string>(
"CanonicalName")
583 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
585 b.Property<DateTimeOffset?>(
"CreatedAt")
587 .HasColumnType(
"datetime(6)");
589 b.Property<
long?>(
"CreatedById")
590 .HasColumnType(
"bigint");
592 b.Property<
bool?>(
"Enabled")
594 .HasColumnType(
"tinyint(1)");
596 b.Property<ulong>(
"InstanceManagerRights")
597 .HasColumnType(
"bigint unsigned");
599 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
600 .HasColumnType(
"datetime(6)");
602 b.Property<
string>(
"Name")
604 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
605 .HasMaxLength(10000);
607 b.Property<
string>(
"PasswordHash")
608 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
610 b.Property<
string>(
"SystemIdentifier")
611 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
615 b.HasIndex(
"CanonicalName")
618 b.HasIndex(
"CreatedById");
620 b.HasIndex(
"SystemIdentifier")
626 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
628 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
629 .WithMany(
"ChatSettings")
630 .HasForeignKey(
"InstanceId")
631 .OnDelete(DeleteBehavior.Cascade)
635 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
637 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
638 .WithMany(
"Channels")
639 .HasForeignKey(
"ChatSettingsId")
640 .OnDelete(DeleteBehavior.Cascade)
644 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
646 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
648 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
649 .OnDelete(DeleteBehavior.Cascade)
652 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
653 .WithMany(
"CompileJobs")
654 .HasForeignKey(
"RevisionInformationId")
655 .OnDelete(DeleteBehavior.Cascade)
659 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
661 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
662 .WithOne(
"DreamDaemonSettings")
663 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
664 .OnDelete(DeleteBehavior.Cascade)
668 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
670 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
671 .WithOne(
"DreamMakerSettings")
672 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
673 .OnDelete(DeleteBehavior.Cascade)
677 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
679 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
680 .WithMany(
"InstanceUsers")
681 .HasForeignKey(
"InstanceId")
682 .OnDelete(DeleteBehavior.Cascade)
685 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
686 .WithMany(
"InstanceUsers")
687 .HasForeignKey(
"UserId")
688 .OnDelete(DeleteBehavior.Cascade)
692 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
694 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
696 .HasForeignKey(
"CancelledById");
698 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
700 .HasForeignKey(
"InstanceId")
701 .OnDelete(DeleteBehavior.Cascade)
704 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
706 .HasForeignKey(
"StartedById")
707 .OnDelete(DeleteBehavior.Cascade)
711 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
713 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
715 .HasForeignKey(
"CompileJobId")
716 .OnDelete(DeleteBehavior.Cascade)
720 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
722 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
723 .WithOne(
"RepositorySettings")
724 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
725 .OnDelete(DeleteBehavior.Cascade)
729 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
731 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
732 .WithMany(
"ActiveTestMerges")
733 .HasForeignKey(
"RevisionInformationId")
734 .OnDelete(DeleteBehavior.Cascade)
737 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
738 .WithMany(
"RevisonInformations")
739 .HasForeignKey(
"TestMergeId")
740 .OnDelete(DeleteBehavior.ClientNoAction)
744 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
746 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
747 .WithMany(
"RevisionInformations")
748 .HasForeignKey(
"InstanceId")
749 .OnDelete(DeleteBehavior.Cascade)
753 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
755 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
756 .WithMany(
"TestMerges")
757 .HasForeignKey(
"MergedById")
758 .OnDelete(DeleteBehavior.Restrict)
761 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
762 .WithOne(
"PrimaryTestMerge")
763 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
764 .OnDelete(DeleteBehavior.Cascade)
768 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
770 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
771 .WithMany(
"CreatedUsers")
772 .HasForeignKey(
"CreatedById");
774#pragma warning restore 612, 618