16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.3")
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<
string>(
"AccessToken")
164 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
166 b.Property<
bool?>(
"AllowWebClient")
168 .HasColumnType(
"tinyint(1)");
170 b.Property<
bool?>(
"AutoStart")
172 .HasColumnType(
"tinyint(1)");
174 b.Property<
long>(
"InstanceId")
175 .HasColumnType(
"bigint");
177 b.Property<ushort?>(
"PrimaryPort")
179 .HasColumnType(
"smallint unsigned");
181 b.Property<
int?>(
"ProcessId")
182 .HasColumnType(
"int");
184 b.Property<ushort?>(
"SecondaryPort")
186 .HasColumnType(
"smallint unsigned");
188 b.Property<
int>(
"SecurityLevel")
189 .HasColumnType(
"int");
191 b.Property<
bool?>(
"SoftRestart")
193 .HasColumnType(
"tinyint(1)");
195 b.Property<
bool?>(
"SoftShutdown")
197 .HasColumnType(
"tinyint(1)");
199 b.Property<uint?>(
"StartupTimeout")
201 .HasColumnType(
"int unsigned");
205 b.HasIndex(
"InstanceId")
208 b.ToTable(
"DreamDaemonSettings");
211 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
213 b.Property<
long>(
"Id")
214 .ValueGeneratedOnAdd()
215 .HasColumnType(
"bigint");
217 b.Property<ushort?>(
"ApiValidationPort")
219 .HasColumnType(
"smallint unsigned");
221 b.Property<
int>(
"ApiValidationSecurityLevel")
222 .HasColumnType(
"int");
224 b.Property<
long>(
"InstanceId")
225 .HasColumnType(
"bigint");
227 b.Property<
string>(
"ProjectName")
228 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
229 .HasMaxLength(10000);
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")
309 .HasColumnType(
"bigint");
313 b.HasIndex(
"InstanceId");
315 b.HasIndex(
"UserId",
"InstanceId")
318 b.ToTable(
"InstanceUsers");
321 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
323 b.Property<
long>(
"Id")
324 .ValueGeneratedOnAdd()
325 .HasColumnType(
"bigint");
327 b.Property<ulong?>(
"CancelRight")
328 .HasColumnType(
"bigint unsigned");
330 b.Property<ulong?>(
"CancelRightsType")
331 .HasColumnType(
"bigint unsigned");
333 b.Property<
bool?>(
"Cancelled")
335 .HasColumnType(
"tinyint(1)");
337 b.Property<
long?>(
"CancelledById")
338 .HasColumnType(
"bigint");
340 b.Property<
string>(
"Description")
342 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
344 b.Property<uint?>(
"ErrorCode")
345 .HasColumnType(
"int unsigned");
347 b.Property<
string>(
"ExceptionDetails")
348 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
350 b.Property<
long>(
"InstanceId")
351 .HasColumnType(
"bigint");
353 b.Property<DateTimeOffset?>(
"StartedAt")
355 .HasColumnType(
"datetime(6)");
357 b.Property<
long>(
"StartedById")
358 .HasColumnType(
"bigint");
360 b.Property<DateTimeOffset?>(
"StoppedAt")
361 .HasColumnType(
"datetime(6)");
365 b.HasIndex(
"CancelledById");
367 b.HasIndex(
"InstanceId");
369 b.HasIndex(
"StartedById");
374 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
376 b.Property<
long>(
"Id")
377 .ValueGeneratedOnAdd()
378 .HasColumnType(
"bigint");
380 b.Property<
string>(
"AccessIdentifier")
382 .HasColumnType(
"longtext CHARACTER SET utf8mb4");
384 b.Property<
long>(
"CompileJobId")
385 .HasColumnType(
"bigint");
387 b.Property<
bool>(
"IsPrimary")
388 .HasColumnType(
"tinyint(1)");
390 b.Property<
int>(
"LaunchSecurityLevel")
391 .HasColumnType(
"int");
393 b.Property<ushort>(
"Port")
394 .HasColumnType(
"smallint unsigned");
396 b.Property<
int>(
"ProcessId")
397 .HasColumnType(
"int");
399 b.Property<
int>(
"RebootState")
400 .HasColumnType(
"int");
404 b.HasIndex(
"CompileJobId");
406 b.ToTable(
"ReattachInformations");
409 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
411 b.Property<
long>(
"Id")
412 .ValueGeneratedOnAdd()
413 .HasColumnType(
"bigint");
415 b.Property<
string>(
"AccessToken")
416 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
417 .HasMaxLength(10000);
419 b.Property<
string>(
"AccessUser")
420 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
421 .HasMaxLength(10000);
423 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
425 .HasColumnType(
"tinyint(1)");
427 b.Property<
bool?>(
"AutoUpdatesSynchronize")
429 .HasColumnType(
"tinyint(1)");
431 b.Property<
string>(
"CommitterEmail")
433 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
434 .HasMaxLength(10000);
436 b.Property<
string>(
"CommitterName")
438 .HasColumnType(
"longtext CHARACTER SET utf8mb4")
439 .HasMaxLength(10000);
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.WatchdogReattachInformation", b =>
622 b.Property<
long>(
"Id")
623 .ValueGeneratedOnAdd()
624 .HasColumnType(
"bigint");
626 b.Property<
long?>(
"AlphaId")
627 .HasColumnType(
"bigint");
629 b.Property<
bool>(
"AlphaIsActive")
630 .HasColumnType(
"tinyint(1)");
632 b.Property<
long?>(
"BravoId")
633 .HasColumnType(
"bigint");
635 b.Property<
long>(
"InstanceId")
636 .HasColumnType(
"bigint");
640 b.HasIndex(
"AlphaId");
642 b.HasIndex(
"BravoId");
644 b.HasIndex(
"InstanceId")
647 b.ToTable(
"WatchdogReattachInformations");
650 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
652 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
653 .WithMany(
"ChatSettings")
654 .HasForeignKey(
"InstanceId")
655 .OnDelete(DeleteBehavior.Cascade)
659 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
661 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
662 .WithMany(
"Channels")
663 .HasForeignKey(
"ChatSettingsId")
664 .OnDelete(DeleteBehavior.Cascade)
668 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
670 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
672 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
673 .OnDelete(DeleteBehavior.Cascade)
676 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
677 .WithMany(
"CompileJobs")
678 .HasForeignKey(
"RevisionInformationId")
679 .OnDelete(DeleteBehavior.ClientNoAction)
683 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
685 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
686 .WithOne(
"DreamDaemonSettings")
687 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
688 .OnDelete(DeleteBehavior.Cascade)
692 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
694 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
695 .WithOne(
"DreamMakerSettings")
696 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
697 .OnDelete(DeleteBehavior.Cascade)
701 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
703 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
704 .WithMany(
"InstanceUsers")
705 .HasForeignKey(
"InstanceId")
706 .OnDelete(DeleteBehavior.Cascade)
709 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
710 .WithMany(
"InstanceUsers")
711 .HasForeignKey(
"UserId")
712 .OnDelete(DeleteBehavior.Cascade)
716 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
718 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
720 .HasForeignKey(
"CancelledById");
722 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
724 .HasForeignKey(
"InstanceId")
725 .OnDelete(DeleteBehavior.Cascade)
728 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
730 .HasForeignKey(
"StartedById")
731 .OnDelete(DeleteBehavior.Cascade)
735 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
737 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
739 .HasForeignKey(
"CompileJobId")
740 .OnDelete(DeleteBehavior.Cascade)
744 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
746 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
747 .WithOne(
"RepositorySettings")
748 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
749 .OnDelete(DeleteBehavior.Cascade)
753 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
755 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
756 .WithMany(
"ActiveTestMerges")
757 .HasForeignKey(
"RevisionInformationId")
758 .OnDelete(DeleteBehavior.Cascade)
761 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
762 .WithMany(
"RevisonInformations")
763 .HasForeignKey(
"TestMergeId")
764 .OnDelete(DeleteBehavior.ClientNoAction)
768 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
770 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
771 .WithMany(
"RevisionInformations")
772 .HasForeignKey(
"InstanceId")
773 .OnDelete(DeleteBehavior.Cascade)
777 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
779 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
780 .WithMany(
"TestMerges")
781 .HasForeignKey(
"MergedById")
782 .OnDelete(DeleteBehavior.Restrict)
785 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
786 .WithOne(
"PrimaryTestMerge")
787 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
788 .OnDelete(DeleteBehavior.Cascade)
792 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
794 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
795 .WithMany(
"CreatedUsers")
796 .HasForeignKey(
"CreatedById");
799 modelBuilder.Entity(
"Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
801 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Alpha")
803 .HasForeignKey(
"AlphaId");
805 b.HasOne(
"Tgstation.Server.Host.Models.ReattachInformation",
"Bravo")
807 .HasForeignKey(
"BravoId");
809 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
null)
810 .WithOne(
"WatchdogReattachInformation")
811 .HasForeignKey(
"Tgstation.Server.Host.Models.WatchdogReattachInformation",
"InstanceId")
812 .OnDelete(DeleteBehavior.Cascade)
815#pragma warning restore 612, 618