16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.5")
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?>(
"Port")
180 .HasColumnType(
"smallint unsigned");
182 b.Property<
int>(
"SecurityLevel")
183 .HasColumnType(
"int");
185 b.Property<uint?>(
"StartupTimeout")
187 .HasColumnType(
"int unsigned");
189 b.Property<uint?>(
"TopicRequestTimeout")
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);
221 b.Property<
bool?>(
"RequireDMApiValidation")
223 .HasColumnType(
"tinyint(1)");
227 b.HasIndex(
"InstanceId")
230 b.ToTable(
"DreamMakerSettings");
233 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
235 b.Property<
long>(
"Id")
236 .ValueGeneratedOnAdd()
237 .HasColumnType(
"bigint");
239 b.Property<uint?>(
"AutoUpdateInterval")
241 .HasColumnType(
"int unsigned");
243 b.Property<ushort?>(
"ChatBotLimit")
245 .HasColumnType(
"smallint unsigned");
247 b.Property<
int>(
"ConfigurationType")
248 .HasColumnType(
"int");
250 b.Property<
string>(
"Name")
252 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
253 .HasMaxLength(10000);
255 b.Property<
bool?>(
"Online")
257 .HasColumnType(
"tinyint(1)");
259 b.Property<
string>(
"Path")
261 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
268 b.ToTable(
"Instances");
271 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
273 b.Property<
long>(
"Id")
274 .ValueGeneratedOnAdd()
275 .HasColumnType(
"bigint");
277 b.Property<ulong>(
"ByondRights")
278 .HasColumnType(
"bigint unsigned");
280 b.Property<ulong>(
"ChatBotRights")
281 .HasColumnType(
"bigint unsigned");
283 b.Property<ulong>(
"ConfigurationRights")
284 .HasColumnType(
"bigint unsigned");
286 b.Property<ulong>(
"DreamDaemonRights")
287 .HasColumnType(
"bigint unsigned");
289 b.Property<ulong>(
"DreamMakerRights")
290 .HasColumnType(
"bigint unsigned");
292 b.Property<
long>(
"InstanceId")
293 .HasColumnType(
"bigint");
295 b.Property<ulong>(
"InstanceUserRights")
296 .HasColumnType(
"bigint unsigned");
298 b.Property<ulong>(
"RepositoryRights")
299 .HasColumnType(
"bigint unsigned");
301 b.Property<
long?>(
"UserId")
303 .HasColumnType(
"bigint");
307 b.HasIndex(
"InstanceId");
309 b.HasIndex(
"UserId",
"InstanceId")
312 b.ToTable(
"InstanceUsers");
315 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
317 b.Property<
long>(
"Id")
318 .ValueGeneratedOnAdd()
319 .HasColumnType(
"bigint");
321 b.Property<ulong?>(
"CancelRight")
322 .HasColumnType(
"bigint unsigned");
324 b.Property<ulong?>(
"CancelRightsType")
325 .HasColumnType(
"bigint unsigned");
327 b.Property<
bool?>(
"Cancelled")
329 .HasColumnType(
"tinyint(1)");
331 b.Property<
long?>(
"CancelledById")
332 .HasColumnType(
"bigint");
334 b.Property<
string>(
"Description")
336 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
338 b.Property<uint?>(
"ErrorCode")
339 .HasColumnType(
"int unsigned");
341 b.Property<
string>(
"ExceptionDetails")
342 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
344 b.Property<
long>(
"InstanceId")
345 .HasColumnType(
"bigint");
347 b.Property<DateTimeOffset?>(
"StartedAt")
349 .HasColumnType(
"datetime(6)");
351 b.Property<
long>(
"StartedById")
352 .HasColumnType(
"bigint");
354 b.Property<DateTimeOffset?>(
"StoppedAt")
355 .HasColumnType(
"datetime(6)");
359 b.HasIndex(
"CancelledById");
361 b.HasIndex(
"InstanceId");
363 b.HasIndex(
"StartedById");
368 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
370 b.Property<
long>(
"Id")
371 .ValueGeneratedOnAdd()
372 .HasColumnType(
"bigint");
374 b.Property<
string>(
"AccessIdentifier")
376 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
378 b.Property<
long>(
"CompileJobId")
379 .HasColumnType(
"bigint");
381 b.Property<
int>(
"LaunchSecurityLevel")
382 .HasColumnType(
"int");
384 b.Property<ushort>(
"Port")
385 .HasColumnType(
"smallint unsigned");
387 b.Property<
int>(
"ProcessId")
388 .HasColumnType(
"int");
390 b.Property<
int>(
"RebootState")
391 .HasColumnType(
"int");
395 b.HasIndex(
"CompileJobId");
397 b.ToTable(
"ReattachInformations");
400 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
402 b.Property<
long>(
"Id")
403 .ValueGeneratedOnAdd()
404 .HasColumnType(
"bigint");
406 b.Property<
string>(
"AccessToken")
407 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
408 .HasMaxLength(10000);
410 b.Property<
string>(
"AccessUser")
411 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
412 .HasMaxLength(10000);
414 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
416 .HasColumnType(
"tinyint(1)");
418 b.Property<
bool?>(
"AutoUpdatesSynchronize")
420 .HasColumnType(
"tinyint(1)");
422 b.Property<
string>(
"CommitterEmail")
424 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
425 .HasMaxLength(10000);
427 b.Property<
string>(
"CommitterName")
429 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
430 .HasMaxLength(10000);
432 b.Property<
long>(
"InstanceId")
433 .HasColumnType(
"bigint");
435 b.Property<
bool?>(
"PostTestMergeComment")
437 .HasColumnType(
"tinyint(1)");
439 b.Property<
bool?>(
"PushTestMergeCommits")
441 .HasColumnType(
"tinyint(1)");
443 b.Property<
bool?>(
"ShowTestMergeCommitters")
445 .HasColumnType(
"tinyint(1)");
449 b.HasIndex(
"InstanceId")
452 b.ToTable(
"RepositorySettings");
455 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
457 b.Property<
long>(
"Id")
458 .ValueGeneratedOnAdd()
459 .HasColumnType(
"bigint");
461 b.Property<
long>(
"RevisionInformationId")
462 .HasColumnType(
"bigint");
464 b.Property<
long>(
"TestMergeId")
465 .HasColumnType(
"bigint");
469 b.HasIndex(
"RevisionInformationId");
471 b.HasIndex(
"TestMergeId");
473 b.ToTable(
"RevInfoTestMerges");
476 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
478 b.Property<
long>(
"Id")
479 .ValueGeneratedOnAdd()
480 .HasColumnType(
"bigint");
482 b.Property<
string>(
"CommitSha")
484 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
487 b.Property<
long>(
"InstanceId")
488 .HasColumnType(
"bigint");
490 b.Property<
string>(
"OriginCommitSha")
492 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
497 b.HasIndex(
"InstanceId",
"CommitSha")
500 b.ToTable(
"RevisionInformations");
503 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
505 b.Property<
long>(
"Id")
506 .ValueGeneratedOnAdd()
507 .HasColumnType(
"bigint");
509 b.Property<
string>(
"Author")
511 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
513 b.Property<
string>(
"BodyAtMerge")
515 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
517 b.Property<
string>(
"Comment")
518 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
519 .HasMaxLength(10000);
521 b.Property<DateTimeOffset>(
"MergedAt")
522 .HasColumnType(
"datetime(6)");
524 b.Property<
long>(
"MergedById")
525 .HasColumnType(
"bigint");
527 b.Property<
int>(
"Number")
528 .HasColumnType(
"int");
530 b.Property<
long?>(
"PrimaryRevisionInformationId")
532 .HasColumnType(
"bigint");
534 b.Property<
string>(
"PullRequestRevision")
536 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
539 b.Property<
string>(
"TitleAtMerge")
541 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
543 b.Property<
string>(
"Url")
545 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
549 b.HasIndex(
"MergedById");
551 b.HasIndex(
"PrimaryRevisionInformationId")
554 b.ToTable(
"TestMerges");
557 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
559 b.Property<
long?>(
"Id")
560 .ValueGeneratedOnAdd()
561 .HasColumnType(
"bigint");
563 b.Property<ulong>(
"AdministrationRights")
564 .HasColumnType(
"bigint unsigned");
566 b.Property<
string>(
"CanonicalName")
568 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
570 b.Property<DateTimeOffset?>(
"CreatedAt")
572 .HasColumnType(
"datetime(6)");
574 b.Property<
long?>(
"CreatedById")
575 .HasColumnType(
"bigint");
577 b.Property<
bool?>(
"Enabled")
579 .HasColumnType(
"tinyint(1)");
581 b.Property<ulong>(
"InstanceManagerRights")
582 .HasColumnType(
"bigint unsigned");
584 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
585 .HasColumnType(
"datetime(6)");
587 b.Property<
string>(
"Name")
589 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
590 .HasMaxLength(10000);
592 b.Property<
string>(
"PasswordHash")
593 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
595 b.Property<
string>(
"SystemIdentifier")
596 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
600 b.HasIndex(
"CanonicalName")
603 b.HasIndex(
"CreatedById");
605 b.HasIndex(
"SystemIdentifier")
611 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
613 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
614 .WithMany(
"ChatSettings")
615 .HasForeignKey(
"InstanceId")
616 .OnDelete(DeleteBehavior.Cascade)
620 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
622 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
623 .WithMany(
"Channels")
624 .HasForeignKey(
"ChatSettingsId")
625 .OnDelete(DeleteBehavior.Cascade)
629 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
631 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
633 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
634 .OnDelete(DeleteBehavior.Cascade)
637 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
638 .WithMany(
"CompileJobs")
639 .HasForeignKey(
"RevisionInformationId")
640 .OnDelete(DeleteBehavior.Cascade)
644 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
646 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
647 .WithOne(
"DreamDaemonSettings")
648 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
649 .OnDelete(DeleteBehavior.Cascade)
653 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
655 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
656 .WithOne(
"DreamMakerSettings")
657 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
658 .OnDelete(DeleteBehavior.Cascade)
662 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
664 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
665 .WithMany(
"InstanceUsers")
666 .HasForeignKey(
"InstanceId")
667 .OnDelete(DeleteBehavior.Cascade)
670 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
671 .WithMany(
"InstanceUsers")
672 .HasForeignKey(
"UserId")
673 .OnDelete(DeleteBehavior.Cascade)
677 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
679 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
681 .HasForeignKey(
"CancelledById");
683 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
685 .HasForeignKey(
"InstanceId")
686 .OnDelete(DeleteBehavior.Cascade)
689 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
691 .HasForeignKey(
"StartedById")
692 .OnDelete(DeleteBehavior.Cascade)
696 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
698 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
700 .HasForeignKey(
"CompileJobId")
701 .OnDelete(DeleteBehavior.Cascade)
705 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
707 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
708 .WithOne(
"RepositorySettings")
709 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
710 .OnDelete(DeleteBehavior.Cascade)
714 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
716 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
717 .WithMany(
"ActiveTestMerges")
718 .HasForeignKey(
"RevisionInformationId")
719 .OnDelete(DeleteBehavior.Cascade)
722 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
723 .WithMany(
"RevisonInformations")
724 .HasForeignKey(
"TestMergeId")
725 .OnDelete(DeleteBehavior.ClientNoAction)
729 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
731 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
732 .WithMany(
"RevisionInformations")
733 .HasForeignKey(
"InstanceId")
734 .OnDelete(DeleteBehavior.Cascade)
738 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
740 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
741 .WithMany(
"TestMerges")
742 .HasForeignKey(
"MergedById")
743 .OnDelete(DeleteBehavior.Restrict)
746 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
747 .WithOne(
"PrimaryTestMerge")
748 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
749 .OnDelete(DeleteBehavior.Cascade)
753 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
755 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
756 .WithMany(
"CreatedUsers")
757 .HasForeignKey(
"CreatedById");
759#pragma warning restore 612, 618