16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.7");
20 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
22 b.Property<
long>(
"Id")
23 .ValueGeneratedOnAdd()
24 .HasColumnType(
"INTEGER");
26 b.Property<ushort?>(
"ChannelLimit")
28 .HasColumnType(
"INTEGER");
30 b.Property<
string>(
"ConnectionString")
32 .HasColumnType(
"TEXT")
35 b.Property<
bool?>(
"Enabled")
36 .HasColumnType(
"INTEGER");
38 b.Property<
long>(
"InstanceId")
39 .HasColumnType(
"INTEGER");
41 b.Property<
string>(
"Name")
43 .HasColumnType(
"TEXT")
46 b.Property<
int>(
"Provider")
47 .HasColumnType(
"INTEGER");
49 b.Property<uint?>(
"ReconnectionInterval")
51 .HasColumnType(
"INTEGER");
55 b.HasIndex(
"InstanceId",
"Name")
58 b.ToTable(
"ChatBots");
61 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
63 b.Property<
long>(
"Id")
64 .ValueGeneratedOnAdd()
65 .HasColumnType(
"INTEGER");
67 b.Property<
long>(
"ChatSettingsId")
68 .HasColumnType(
"INTEGER");
70 b.Property<ulong?>(
"DiscordChannelId")
71 .HasColumnType(
"INTEGER");
73 b.Property<
string>(
"IrcChannel")
74 .HasColumnType(
"TEXT")
77 b.Property<
bool?>(
"IsAdminChannel")
79 .HasColumnType(
"INTEGER");
81 b.Property<
bool?>(
"IsUpdatesChannel")
83 .HasColumnType(
"INTEGER");
85 b.Property<
bool?>(
"IsWatchdogChannel")
87 .HasColumnType(
"INTEGER");
89 b.Property<
string>(
"Tag")
90 .HasColumnType(
"TEXT")
95 b.HasIndex(
"ChatSettingsId",
"DiscordChannelId")
98 b.HasIndex(
"ChatSettingsId",
"IrcChannel")
101 b.ToTable(
"ChatChannels");
104 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
106 b.Property<
long>(
"Id")
107 .ValueGeneratedOnAdd()
108 .HasColumnType(
"INTEGER");
110 b.Property<
string>(
"ByondVersion")
112 .HasColumnType(
"TEXT");
114 b.Property<
int?>(
"DMApiMajorVersion")
115 .HasColumnType(
"INTEGER");
117 b.Property<
int?>(
"DMApiMinorVersion")
118 .HasColumnType(
"INTEGER");
120 b.Property<
int?>(
"DMApiPatchVersion")
121 .HasColumnType(
"INTEGER");
123 b.Property<Guid?>(
"DirectoryName")
125 .HasColumnType(
"TEXT");
127 b.Property<
string>(
"DmeName")
129 .HasColumnType(
"TEXT");
131 b.Property<
int?>(
"GitHubDeploymentId")
132 .HasColumnType(
"INTEGER");
134 b.Property<
long?>(
"GitHubRepoId")
135 .HasColumnType(
"INTEGER");
137 b.Property<
long>(
"JobId")
138 .HasColumnType(
"INTEGER");
140 b.Property<
int?>(
"MinimumSecurityLevel")
141 .HasColumnType(
"INTEGER");
143 b.Property<
string>(
"Output")
145 .HasColumnType(
"TEXT");
147 b.Property<
long>(
"RevisionInformationId")
148 .HasColumnType(
"INTEGER");
152 b.HasIndex(
"DirectoryName");
157 b.HasIndex(
"RevisionInformationId");
159 b.ToTable(
"CompileJobs");
162 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
164 b.Property<
long>(
"Id")
165 .ValueGeneratedOnAdd()
166 .HasColumnType(
"INTEGER");
168 b.Property<
string>(
"AdditionalParameters")
170 .HasColumnType(
"TEXT")
171 .HasMaxLength(10000);
173 b.Property<
bool?>(
"AllowWebClient")
175 .HasColumnType(
"INTEGER");
177 b.Property<
bool?>(
"AutoStart")
179 .HasColumnType(
"INTEGER");
181 b.Property<uint?>(
"HeartbeatSeconds")
183 .HasColumnType(
"INTEGER");
185 b.Property<
long>(
"InstanceId")
186 .HasColumnType(
"INTEGER");
188 b.Property<ushort?>(
"Port")
190 .HasColumnType(
"INTEGER");
192 b.Property<
int>(
"SecurityLevel")
193 .HasColumnType(
"INTEGER");
195 b.Property<uint?>(
"StartupTimeout")
197 .HasColumnType(
"INTEGER");
199 b.Property<uint?>(
"TopicRequestTimeout")
201 .HasColumnType(
"INTEGER");
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(
"INTEGER");
217 b.Property<ushort?>(
"ApiValidationPort")
219 .HasColumnType(
"INTEGER");
221 b.Property<
int>(
"ApiValidationSecurityLevel")
222 .HasColumnType(
"INTEGER");
224 b.Property<
long>(
"InstanceId")
225 .HasColumnType(
"INTEGER");
227 b.Property<
string>(
"ProjectName")
228 .HasColumnType(
"TEXT")
229 .HasMaxLength(10000);
231 b.Property<
bool?>(
"RequireDMApiValidation")
233 .HasColumnType(
"INTEGER");
237 b.HasIndex(
"InstanceId")
240 b.ToTable(
"DreamMakerSettings");
243 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
245 b.Property<
long>(
"Id")
246 .ValueGeneratedOnAdd()
247 .HasColumnType(
"INTEGER");
249 b.Property<uint?>(
"AutoUpdateInterval")
251 .HasColumnType(
"INTEGER");
253 b.Property<ushort?>(
"ChatBotLimit")
255 .HasColumnType(
"INTEGER");
257 b.Property<
int>(
"ConfigurationType")
258 .HasColumnType(
"INTEGER");
260 b.Property<
string>(
"Name")
262 .HasColumnType(
"TEXT")
263 .HasMaxLength(10000);
265 b.Property<
bool?>(
"Online")
267 .HasColumnType(
"INTEGER");
269 b.Property<
string>(
"Path")
271 .HasColumnType(
"TEXT");
278 b.ToTable(
"Instances");
281 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
283 b.Property<
long>(
"Id")
284 .ValueGeneratedOnAdd()
285 .HasColumnType(
"INTEGER");
287 b.Property<ulong>(
"ByondRights")
288 .HasColumnType(
"INTEGER");
290 b.Property<ulong>(
"ChatBotRights")
291 .HasColumnType(
"INTEGER");
293 b.Property<ulong>(
"ConfigurationRights")
294 .HasColumnType(
"INTEGER");
296 b.Property<ulong>(
"DreamDaemonRights")
297 .HasColumnType(
"INTEGER");
299 b.Property<ulong>(
"DreamMakerRights")
300 .HasColumnType(
"INTEGER");
302 b.Property<
long>(
"InstanceId")
303 .HasColumnType(
"INTEGER");
305 b.Property<ulong>(
"InstanceUserRights")
306 .HasColumnType(
"INTEGER");
308 b.Property<ulong>(
"RepositoryRights")
309 .HasColumnType(
"INTEGER");
311 b.Property<
long>(
"UserId")
312 .HasColumnType(
"INTEGER");
316 b.HasIndex(
"InstanceId");
318 b.HasIndex(
"UserId",
"InstanceId")
321 b.ToTable(
"InstanceUsers");
324 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
326 b.Property<
long>(
"Id")
327 .ValueGeneratedOnAdd()
328 .HasColumnType(
"INTEGER");
330 b.Property<ulong?>(
"CancelRight")
331 .HasColumnType(
"INTEGER");
333 b.Property<ulong?>(
"CancelRightsType")
334 .HasColumnType(
"INTEGER");
336 b.Property<
bool?>(
"Cancelled")
338 .HasColumnType(
"INTEGER");
340 b.Property<
long?>(
"CancelledById")
341 .HasColumnType(
"INTEGER");
343 b.Property<
string>(
"Description")
345 .HasColumnType(
"TEXT");
347 b.Property<uint?>(
"ErrorCode")
348 .HasColumnType(
"INTEGER");
350 b.Property<
string>(
"ExceptionDetails")
351 .HasColumnType(
"TEXT");
353 b.Property<
long>(
"InstanceId")
354 .HasColumnType(
"INTEGER");
356 b.Property<DateTimeOffset?>(
"StartedAt")
358 .HasColumnType(
"TEXT");
360 b.Property<
long>(
"StartedById")
361 .HasColumnType(
"INTEGER");
363 b.Property<DateTimeOffset?>(
"StoppedAt")
364 .HasColumnType(
"TEXT");
368 b.HasIndex(
"CancelledById");
370 b.HasIndex(
"InstanceId");
372 b.HasIndex(
"StartedById");
377 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
379 b.Property<
long>(
"Id")
380 .ValueGeneratedOnAdd()
381 .HasColumnType(
"INTEGER");
383 b.Property<
string>(
"AccessIdentifier")
385 .HasColumnType(
"TEXT");
387 b.Property<
long>(
"CompileJobId")
388 .HasColumnType(
"INTEGER");
390 b.Property<
int>(
"LaunchSecurityLevel")
391 .HasColumnType(
"INTEGER");
393 b.Property<ushort>(
"Port")
394 .HasColumnType(
"INTEGER");
396 b.Property<
int>(
"ProcessId")
397 .HasColumnType(
"INTEGER");
399 b.Property<
int>(
"RebootState")
400 .HasColumnType(
"INTEGER");
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(
"INTEGER");
415 b.Property<
string>(
"AccessToken")
416 .HasColumnType(
"TEXT")
417 .HasMaxLength(10000);
419 b.Property<
string>(
"AccessUser")
420 .HasColumnType(
"TEXT")
421 .HasMaxLength(10000);
423 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
425 .HasColumnType(
"INTEGER");
427 b.Property<
bool?>(
"AutoUpdatesSynchronize")
429 .HasColumnType(
"INTEGER");
431 b.Property<
string>(
"CommitterEmail")
433 .HasColumnType(
"TEXT")
434 .HasMaxLength(10000);
436 b.Property<
string>(
"CommitterName")
438 .HasColumnType(
"TEXT")
439 .HasMaxLength(10000);
441 b.Property<
bool?>(
"CreateGitHubDeployments")
443 .HasColumnType(
"INTEGER");
445 b.Property<
long>(
"InstanceId")
446 .HasColumnType(
"INTEGER");
448 b.Property<
bool?>(
"PostTestMergeComment")
450 .HasColumnType(
"INTEGER");
452 b.Property<
bool?>(
"PushTestMergeCommits")
454 .HasColumnType(
"INTEGER");
456 b.Property<
bool?>(
"ShowTestMergeCommitters")
458 .HasColumnType(
"INTEGER");
462 b.HasIndex(
"InstanceId")
465 b.ToTable(
"RepositorySettings");
468 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
470 b.Property<
long>(
"Id")
471 .ValueGeneratedOnAdd()
472 .HasColumnType(
"INTEGER");
474 b.Property<
long>(
"RevisionInformationId")
475 .HasColumnType(
"INTEGER");
477 b.Property<
long>(
"TestMergeId")
478 .HasColumnType(
"INTEGER");
482 b.HasIndex(
"RevisionInformationId");
484 b.HasIndex(
"TestMergeId");
486 b.ToTable(
"RevInfoTestMerges");
489 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
491 b.Property<
long>(
"Id")
492 .ValueGeneratedOnAdd()
493 .HasColumnType(
"INTEGER");
495 b.Property<
string>(
"CommitSha")
497 .HasColumnType(
"TEXT")
500 b.Property<
long>(
"InstanceId")
501 .HasColumnType(
"INTEGER");
503 b.Property<
string>(
"OriginCommitSha")
505 .HasColumnType(
"TEXT")
510 b.HasIndex(
"InstanceId",
"CommitSha")
513 b.ToTable(
"RevisionInformations");
516 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
518 b.Property<
long>(
"Id")
519 .ValueGeneratedOnAdd()
520 .HasColumnType(
"INTEGER");
522 b.Property<
string>(
"Author")
524 .HasColumnType(
"TEXT");
526 b.Property<
string>(
"BodyAtMerge")
528 .HasColumnType(
"TEXT");
530 b.Property<
string>(
"Comment")
531 .HasColumnType(
"TEXT")
532 .HasMaxLength(10000);
534 b.Property<DateTimeOffset>(
"MergedAt")
535 .HasColumnType(
"TEXT");
537 b.Property<
long>(
"MergedById")
538 .HasColumnType(
"INTEGER");
540 b.Property<
int>(
"Number")
541 .HasColumnType(
"INTEGER");
543 b.Property<
long?>(
"PrimaryRevisionInformationId")
545 .HasColumnType(
"INTEGER");
547 b.Property<
string>(
"PullRequestRevision")
549 .HasColumnType(
"TEXT")
552 b.Property<
string>(
"TitleAtMerge")
554 .HasColumnType(
"TEXT");
556 b.Property<
string>(
"Url")
558 .HasColumnType(
"TEXT");
562 b.HasIndex(
"MergedById");
564 b.HasIndex(
"PrimaryRevisionInformationId")
567 b.ToTable(
"TestMerges");
570 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
572 b.Property<
long?>(
"Id")
573 .ValueGeneratedOnAdd()
574 .HasColumnType(
"INTEGER");
576 b.Property<ulong>(
"AdministrationRights")
577 .HasColumnType(
"INTEGER");
579 b.Property<
string>(
"CanonicalName")
581 .HasColumnType(
"TEXT");
583 b.Property<DateTimeOffset?>(
"CreatedAt")
585 .HasColumnType(
"TEXT");
587 b.Property<
long?>(
"CreatedById")
588 .HasColumnType(
"INTEGER");
590 b.Property<
bool?>(
"Enabled")
592 .HasColumnType(
"INTEGER");
594 b.Property<ulong>(
"InstanceManagerRights")
595 .HasColumnType(
"INTEGER");
597 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
598 .HasColumnType(
"TEXT");
600 b.Property<
string>(
"Name")
602 .HasColumnType(
"TEXT")
603 .HasMaxLength(10000);
605 b.Property<
string>(
"PasswordHash")
606 .HasColumnType(
"TEXT");
608 b.Property<
string>(
"SystemIdentifier")
609 .HasColumnType(
"TEXT");
613 b.HasIndex(
"CanonicalName")
616 b.HasIndex(
"CreatedById");
618 b.HasIndex(
"SystemIdentifier")
624 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
626 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
627 .WithMany(
"ChatSettings")
628 .HasForeignKey(
"InstanceId")
629 .OnDelete(DeleteBehavior.Cascade)
633 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
635 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
636 .WithMany(
"Channels")
637 .HasForeignKey(
"ChatSettingsId")
638 .OnDelete(DeleteBehavior.Cascade)
642 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
644 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
646 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
647 .OnDelete(DeleteBehavior.Cascade)
650 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
651 .WithMany(
"CompileJobs")
652 .HasForeignKey(
"RevisionInformationId")
653 .OnDelete(DeleteBehavior.ClientNoAction)
657 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
659 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
660 .WithOne(
"DreamDaemonSettings")
661 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
662 .OnDelete(DeleteBehavior.Cascade)
666 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
668 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
669 .WithOne(
"DreamMakerSettings")
670 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
671 .OnDelete(DeleteBehavior.Cascade)
675 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
677 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
678 .WithMany(
"InstanceUsers")
679 .HasForeignKey(
"InstanceId")
680 .OnDelete(DeleteBehavior.Cascade)
683 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
684 .WithMany(
"InstanceUsers")
685 .HasForeignKey(
"UserId")
686 .OnDelete(DeleteBehavior.Cascade)
690 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
692 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
694 .HasForeignKey(
"CancelledById");
696 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
698 .HasForeignKey(
"InstanceId")
699 .OnDelete(DeleteBehavior.Cascade)
702 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
704 .HasForeignKey(
"StartedById")
705 .OnDelete(DeleteBehavior.Cascade)
709 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
711 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
713 .HasForeignKey(
"CompileJobId")
714 .OnDelete(DeleteBehavior.Cascade)
718 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
720 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
721 .WithOne(
"RepositorySettings")
722 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
723 .OnDelete(DeleteBehavior.Cascade)
727 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
729 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
730 .WithMany(
"ActiveTestMerges")
731 .HasForeignKey(
"RevisionInformationId")
732 .OnDelete(DeleteBehavior.Cascade)
735 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
736 .WithMany(
"RevisonInformations")
737 .HasForeignKey(
"TestMergeId")
738 .OnDelete(DeleteBehavior.ClientNoAction)
742 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
744 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
745 .WithMany(
"RevisionInformations")
746 .HasForeignKey(
"InstanceId")
747 .OnDelete(DeleteBehavior.Cascade)
751 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
753 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
754 .WithMany(
"TestMerges")
755 .HasForeignKey(
"MergedById")
756 .OnDelete(DeleteBehavior.Restrict)
759 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
760 .WithOne(
"PrimaryTestMerge")
761 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
762 .OnDelete(DeleteBehavior.Cascade)
766 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
768 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
769 .WithMany(
"CreatedUsers")
770 .HasForeignKey(
"CreatedById");
772#pragma warning restore 612, 618