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);
223 b.HasIndex(
"InstanceId")
226 b.ToTable(
"DreamMakerSettings");
229 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
231 b.Property<
long>(
"Id")
232 .ValueGeneratedOnAdd()
233 .HasColumnType(
"bigint");
235 b.Property<uint?>(
"AutoUpdateInterval")
237 .HasColumnType(
"int unsigned");
239 b.Property<ushort?>(
"ChatBotLimit")
241 .HasColumnType(
"smallint unsigned");
243 b.Property<
int>(
"ConfigurationType")
244 .HasColumnType(
"int");
246 b.Property<
string>(
"Name")
248 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
249 .HasMaxLength(10000);
251 b.Property<
bool?>(
"Online")
253 .HasColumnType(
"tinyint(1)");
255 b.Property<
string>(
"Path")
257 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
264 b.ToTable(
"Instances");
267 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
269 b.Property<
long>(
"Id")
270 .ValueGeneratedOnAdd()
271 .HasColumnType(
"bigint");
273 b.Property<ulong>(
"ByondRights")
274 .HasColumnType(
"bigint unsigned");
276 b.Property<ulong>(
"ChatBotRights")
277 .HasColumnType(
"bigint unsigned");
279 b.Property<ulong>(
"ConfigurationRights")
280 .HasColumnType(
"bigint unsigned");
282 b.Property<ulong>(
"DreamDaemonRights")
283 .HasColumnType(
"bigint unsigned");
285 b.Property<ulong>(
"DreamMakerRights")
286 .HasColumnType(
"bigint unsigned");
288 b.Property<
long>(
"InstanceId")
289 .HasColumnType(
"bigint");
291 b.Property<ulong>(
"InstanceUserRights")
292 .HasColumnType(
"bigint unsigned");
294 b.Property<ulong>(
"RepositoryRights")
295 .HasColumnType(
"bigint unsigned");
297 b.Property<
long?>(
"UserId")
299 .HasColumnType(
"bigint");
303 b.HasIndex(
"InstanceId");
305 b.HasIndex(
"UserId",
"InstanceId")
308 b.ToTable(
"InstanceUsers");
311 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
313 b.Property<
long>(
"Id")
314 .ValueGeneratedOnAdd()
315 .HasColumnType(
"bigint");
317 b.Property<ulong?>(
"CancelRight")
318 .HasColumnType(
"bigint unsigned");
320 b.Property<ulong?>(
"CancelRightsType")
321 .HasColumnType(
"bigint unsigned");
323 b.Property<
bool?>(
"Cancelled")
325 .HasColumnType(
"tinyint(1)");
327 b.Property<
long?>(
"CancelledById")
328 .HasColumnType(
"bigint");
330 b.Property<
string>(
"Description")
332 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
334 b.Property<uint?>(
"ErrorCode")
335 .HasColumnType(
"int unsigned");
337 b.Property<
string>(
"ExceptionDetails")
338 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
340 b.Property<
long>(
"InstanceId")
341 .HasColumnType(
"bigint");
343 b.Property<DateTimeOffset?>(
"StartedAt")
345 .HasColumnType(
"datetime(6)");
347 b.Property<
long>(
"StartedById")
348 .HasColumnType(
"bigint");
350 b.Property<DateTimeOffset?>(
"StoppedAt")
351 .HasColumnType(
"datetime(6)");
355 b.HasIndex(
"CancelledById");
357 b.HasIndex(
"InstanceId");
359 b.HasIndex(
"StartedById");
364 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
366 b.Property<
long>(
"Id")
367 .ValueGeneratedOnAdd()
368 .HasColumnType(
"bigint");
370 b.Property<
string>(
"AccessIdentifier")
372 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
374 b.Property<
long>(
"CompileJobId")
375 .HasColumnType(
"bigint");
377 b.Property<
int>(
"LaunchSecurityLevel")
378 .HasColumnType(
"int");
380 b.Property<ushort>(
"Port")
381 .HasColumnType(
"smallint unsigned");
383 b.Property<
int>(
"ProcessId")
384 .HasColumnType(
"int");
386 b.Property<
int>(
"RebootState")
387 .HasColumnType(
"int");
391 b.HasIndex(
"CompileJobId");
393 b.ToTable(
"ReattachInformations");
396 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
398 b.Property<
long>(
"Id")
399 .ValueGeneratedOnAdd()
400 .HasColumnType(
"bigint");
402 b.Property<
string>(
"AccessToken")
403 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
404 .HasMaxLength(10000);
406 b.Property<
string>(
"AccessUser")
407 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
408 .HasMaxLength(10000);
410 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
412 .HasColumnType(
"tinyint(1)");
414 b.Property<
bool?>(
"AutoUpdatesSynchronize")
416 .HasColumnType(
"tinyint(1)");
418 b.Property<
string>(
"CommitterEmail")
420 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
421 .HasMaxLength(10000);
423 b.Property<
string>(
"CommitterName")
425 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
426 .HasMaxLength(10000);
428 b.Property<
long>(
"InstanceId")
429 .HasColumnType(
"bigint");
431 b.Property<
bool?>(
"PostTestMergeComment")
433 .HasColumnType(
"tinyint(1)");
435 b.Property<
bool?>(
"PushTestMergeCommits")
437 .HasColumnType(
"tinyint(1)");
439 b.Property<
bool?>(
"ShowTestMergeCommitters")
441 .HasColumnType(
"tinyint(1)");
445 b.HasIndex(
"InstanceId")
448 b.ToTable(
"RepositorySettings");
451 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
453 b.Property<
long>(
"Id")
454 .ValueGeneratedOnAdd()
455 .HasColumnType(
"bigint");
457 b.Property<
long>(
"RevisionInformationId")
458 .HasColumnType(
"bigint");
460 b.Property<
long>(
"TestMergeId")
461 .HasColumnType(
"bigint");
465 b.HasIndex(
"RevisionInformationId");
467 b.HasIndex(
"TestMergeId");
469 b.ToTable(
"RevInfoTestMerges");
472 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
474 b.Property<
long>(
"Id")
475 .ValueGeneratedOnAdd()
476 .HasColumnType(
"bigint");
478 b.Property<
string>(
"CommitSha")
480 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
483 b.Property<
long>(
"InstanceId")
484 .HasColumnType(
"bigint");
486 b.Property<
string>(
"OriginCommitSha")
488 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
493 b.HasIndex(
"InstanceId",
"CommitSha")
496 b.ToTable(
"RevisionInformations");
499 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
501 b.Property<
long>(
"Id")
502 .ValueGeneratedOnAdd()
503 .HasColumnType(
"bigint");
505 b.Property<
string>(
"Author")
507 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
509 b.Property<
string>(
"BodyAtMerge")
511 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
513 b.Property<
string>(
"Comment")
514 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
515 .HasMaxLength(10000);
517 b.Property<DateTimeOffset>(
"MergedAt")
518 .HasColumnType(
"datetime(6)");
520 b.Property<
long>(
"MergedById")
521 .HasColumnType(
"bigint");
523 b.Property<
int>(
"Number")
524 .HasColumnType(
"int");
526 b.Property<
long?>(
"PrimaryRevisionInformationId")
528 .HasColumnType(
"bigint");
530 b.Property<
string>(
"PullRequestRevision")
532 .HasColumnType(
"varchar(40) CHARACTER SET utf8mb4")
535 b.Property<
string>(
"TitleAtMerge")
537 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
539 b.Property<
string>(
"Url")
541 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
545 b.HasIndex(
"MergedById");
547 b.HasIndex(
"PrimaryRevisionInformationId")
550 b.ToTable(
"TestMerges");
553 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
555 b.Property<
long?>(
"Id")
556 .ValueGeneratedOnAdd()
557 .HasColumnType(
"bigint");
559 b.Property<ulong>(
"AdministrationRights")
560 .HasColumnType(
"bigint unsigned");
562 b.Property<
string>(
"CanonicalName")
564 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
566 b.Property<DateTimeOffset?>(
"CreatedAt")
568 .HasColumnType(
"datetime(6)");
570 b.Property<
long?>(
"CreatedById")
571 .HasColumnType(
"bigint");
573 b.Property<
bool?>(
"Enabled")
575 .HasColumnType(
"tinyint(1)");
577 b.Property<ulong>(
"InstanceManagerRights")
578 .HasColumnType(
"bigint unsigned");
580 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
581 .HasColumnType(
"datetime(6)");
583 b.Property<
string>(
"Name")
585 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
586 .HasMaxLength(10000);
588 b.Property<
string>(
"PasswordHash")
589 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
591 b.Property<
string>(
"SystemIdentifier")
592 .HasColumnType(
"varchar(255) CHARACTER SET utf8mb4");
596 b.HasIndex(
"CanonicalName")
599 b.HasIndex(
"CreatedById");
601 b.HasIndex(
"SystemIdentifier")
607 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
609 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
610 .WithMany(
"ChatSettings")
611 .HasForeignKey(
"InstanceId")
612 .OnDelete(DeleteBehavior.Cascade)
616 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
618 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
619 .WithMany(
"Channels")
620 .HasForeignKey(
"ChatSettingsId")
621 .OnDelete(DeleteBehavior.Cascade)
625 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
627 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
629 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
630 .OnDelete(DeleteBehavior.Cascade)
633 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
634 .WithMany(
"CompileJobs")
635 .HasForeignKey(
"RevisionInformationId")
636 .OnDelete(DeleteBehavior.Cascade)
640 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
642 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
643 .WithOne(
"DreamDaemonSettings")
644 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
645 .OnDelete(DeleteBehavior.Cascade)
649 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
651 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
652 .WithOne(
"DreamMakerSettings")
653 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
654 .OnDelete(DeleteBehavior.Cascade)
658 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
660 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
661 .WithMany(
"InstanceUsers")
662 .HasForeignKey(
"InstanceId")
663 .OnDelete(DeleteBehavior.Cascade)
666 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
667 .WithMany(
"InstanceUsers")
668 .HasForeignKey(
"UserId")
669 .OnDelete(DeleteBehavior.Cascade)
673 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
675 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
677 .HasForeignKey(
"CancelledById");
679 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
681 .HasForeignKey(
"InstanceId")
682 .OnDelete(DeleteBehavior.Cascade)
685 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
687 .HasForeignKey(
"StartedById")
688 .OnDelete(DeleteBehavior.Cascade)
692 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
694 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
696 .HasForeignKey(
"CompileJobId")
697 .OnDelete(DeleteBehavior.Cascade)
701 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
703 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
704 .WithOne(
"RepositorySettings")
705 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
706 .OnDelete(DeleteBehavior.Cascade)
710 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
712 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
713 .WithMany(
"ActiveTestMerges")
714 .HasForeignKey(
"RevisionInformationId")
715 .OnDelete(DeleteBehavior.Cascade)
718 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
719 .WithMany(
"RevisonInformations")
720 .HasForeignKey(
"TestMergeId")
721 .OnDelete(DeleteBehavior.ClientNoAction)
725 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
727 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
728 .WithMany(
"RevisionInformations")
729 .HasForeignKey(
"InstanceId")
730 .OnDelete(DeleteBehavior.Cascade)
734 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
736 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
737 .WithMany(
"TestMerges")
738 .HasForeignKey(
"MergedById")
739 .OnDelete(DeleteBehavior.Restrict)
742 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
743 .WithOne(
"PrimaryTestMerge")
744 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
745 .OnDelete(DeleteBehavior.Cascade)
749 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
751 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
752 .WithMany(
"CreatedUsers")
753 .HasForeignKey(
"CreatedById");
755#pragma warning restore 612, 618