16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.6");
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<
bool?>(
"AllowWebClient")
170 .HasColumnType(
"INTEGER");
172 b.Property<
bool?>(
"AutoStart")
174 .HasColumnType(
"INTEGER");
176 b.Property<uint?>(
"HeartbeatSeconds")
178 .HasColumnType(
"INTEGER");
180 b.Property<
long>(
"InstanceId")
181 .HasColumnType(
"INTEGER");
183 b.Property<ushort?>(
"Port")
185 .HasColumnType(
"INTEGER");
187 b.Property<
int>(
"SecurityLevel")
188 .HasColumnType(
"INTEGER");
190 b.Property<uint?>(
"StartupTimeout")
192 .HasColumnType(
"INTEGER");
194 b.Property<uint?>(
"TopicRequestTimeout")
196 .HasColumnType(
"INTEGER");
200 b.HasIndex(
"InstanceId")
203 b.ToTable(
"DreamDaemonSettings");
206 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
208 b.Property<
long>(
"Id")
209 .ValueGeneratedOnAdd()
210 .HasColumnType(
"INTEGER");
212 b.Property<ushort?>(
"ApiValidationPort")
214 .HasColumnType(
"INTEGER");
216 b.Property<
int>(
"ApiValidationSecurityLevel")
217 .HasColumnType(
"INTEGER");
219 b.Property<
long>(
"InstanceId")
220 .HasColumnType(
"INTEGER");
222 b.Property<
string>(
"ProjectName")
223 .HasColumnType(
"TEXT")
224 .HasMaxLength(10000);
226 b.Property<
bool?>(
"RequireDMApiValidation")
228 .HasColumnType(
"INTEGER");
232 b.HasIndex(
"InstanceId")
235 b.ToTable(
"DreamMakerSettings");
238 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
240 b.Property<
long>(
"Id")
241 .ValueGeneratedOnAdd()
242 .HasColumnType(
"INTEGER");
244 b.Property<uint?>(
"AutoUpdateInterval")
246 .HasColumnType(
"INTEGER");
248 b.Property<ushort?>(
"ChatBotLimit")
250 .HasColumnType(
"INTEGER");
252 b.Property<
int>(
"ConfigurationType")
253 .HasColumnType(
"INTEGER");
255 b.Property<
string>(
"Name")
257 .HasColumnType(
"TEXT")
258 .HasMaxLength(10000);
260 b.Property<
bool?>(
"Online")
262 .HasColumnType(
"INTEGER");
264 b.Property<
string>(
"Path")
266 .HasColumnType(
"TEXT");
273 b.ToTable(
"Instances");
276 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
278 b.Property<
long>(
"Id")
279 .ValueGeneratedOnAdd()
280 .HasColumnType(
"INTEGER");
282 b.Property<ulong>(
"ByondRights")
283 .HasColumnType(
"INTEGER");
285 b.Property<ulong>(
"ChatBotRights")
286 .HasColumnType(
"INTEGER");
288 b.Property<ulong>(
"ConfigurationRights")
289 .HasColumnType(
"INTEGER");
291 b.Property<ulong>(
"DreamDaemonRights")
292 .HasColumnType(
"INTEGER");
294 b.Property<ulong>(
"DreamMakerRights")
295 .HasColumnType(
"INTEGER");
297 b.Property<
long>(
"InstanceId")
298 .HasColumnType(
"INTEGER");
300 b.Property<ulong>(
"InstanceUserRights")
301 .HasColumnType(
"INTEGER");
303 b.Property<ulong>(
"RepositoryRights")
304 .HasColumnType(
"INTEGER");
306 b.Property<
long>(
"UserId")
307 .HasColumnType(
"INTEGER");
311 b.HasIndex(
"InstanceId");
313 b.HasIndex(
"UserId",
"InstanceId")
316 b.ToTable(
"InstanceUsers");
319 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
321 b.Property<
long>(
"Id")
322 .ValueGeneratedOnAdd()
323 .HasColumnType(
"INTEGER");
325 b.Property<ulong?>(
"CancelRight")
326 .HasColumnType(
"INTEGER");
328 b.Property<ulong?>(
"CancelRightsType")
329 .HasColumnType(
"INTEGER");
331 b.Property<
bool?>(
"Cancelled")
333 .HasColumnType(
"INTEGER");
335 b.Property<
long?>(
"CancelledById")
336 .HasColumnType(
"INTEGER");
338 b.Property<
string>(
"Description")
340 .HasColumnType(
"TEXT");
342 b.Property<uint?>(
"ErrorCode")
343 .HasColumnType(
"INTEGER");
345 b.Property<
string>(
"ExceptionDetails")
346 .HasColumnType(
"TEXT");
348 b.Property<
long>(
"InstanceId")
349 .HasColumnType(
"INTEGER");
351 b.Property<DateTimeOffset?>(
"StartedAt")
353 .HasColumnType(
"TEXT");
355 b.Property<
long>(
"StartedById")
356 .HasColumnType(
"INTEGER");
358 b.Property<DateTimeOffset?>(
"StoppedAt")
359 .HasColumnType(
"TEXT");
363 b.HasIndex(
"CancelledById");
365 b.HasIndex(
"InstanceId");
367 b.HasIndex(
"StartedById");
372 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
374 b.Property<
long>(
"Id")
375 .ValueGeneratedOnAdd()
376 .HasColumnType(
"INTEGER");
378 b.Property<
string>(
"AccessIdentifier")
380 .HasColumnType(
"TEXT");
382 b.Property<
long>(
"CompileJobId")
383 .HasColumnType(
"INTEGER");
385 b.Property<
int>(
"LaunchSecurityLevel")
386 .HasColumnType(
"INTEGER");
388 b.Property<ushort>(
"Port")
389 .HasColumnType(
"INTEGER");
391 b.Property<
int>(
"ProcessId")
392 .HasColumnType(
"INTEGER");
394 b.Property<
int>(
"RebootState")
395 .HasColumnType(
"INTEGER");
399 b.HasIndex(
"CompileJobId");
401 b.ToTable(
"ReattachInformations");
404 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
406 b.Property<
long>(
"Id")
407 .ValueGeneratedOnAdd()
408 .HasColumnType(
"INTEGER");
410 b.Property<
string>(
"AccessToken")
411 .HasColumnType(
"TEXT")
412 .HasMaxLength(10000);
414 b.Property<
string>(
"AccessUser")
415 .HasColumnType(
"TEXT")
416 .HasMaxLength(10000);
418 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
420 .HasColumnType(
"INTEGER");
422 b.Property<
bool?>(
"AutoUpdatesSynchronize")
424 .HasColumnType(
"INTEGER");
426 b.Property<
string>(
"CommitterEmail")
428 .HasColumnType(
"TEXT")
429 .HasMaxLength(10000);
431 b.Property<
string>(
"CommitterName")
433 .HasColumnType(
"TEXT")
434 .HasMaxLength(10000);
436 b.Property<
bool?>(
"CreateGitHubDeployments")
438 .HasColumnType(
"INTEGER");
440 b.Property<
long>(
"InstanceId")
441 .HasColumnType(
"INTEGER");
443 b.Property<
bool?>(
"PostTestMergeComment")
445 .HasColumnType(
"INTEGER");
447 b.Property<
bool?>(
"PushTestMergeCommits")
449 .HasColumnType(
"INTEGER");
451 b.Property<
bool?>(
"ShowTestMergeCommitters")
453 .HasColumnType(
"INTEGER");
457 b.HasIndex(
"InstanceId")
460 b.ToTable(
"RepositorySettings");
463 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
465 b.Property<
long>(
"Id")
466 .ValueGeneratedOnAdd()
467 .HasColumnType(
"INTEGER");
469 b.Property<
long>(
"RevisionInformationId")
470 .HasColumnType(
"INTEGER");
472 b.Property<
long>(
"TestMergeId")
473 .HasColumnType(
"INTEGER");
477 b.HasIndex(
"RevisionInformationId");
479 b.HasIndex(
"TestMergeId");
481 b.ToTable(
"RevInfoTestMerges");
484 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
486 b.Property<
long>(
"Id")
487 .ValueGeneratedOnAdd()
488 .HasColumnType(
"INTEGER");
490 b.Property<
string>(
"CommitSha")
492 .HasColumnType(
"TEXT")
495 b.Property<
long>(
"InstanceId")
496 .HasColumnType(
"INTEGER");
498 b.Property<
string>(
"OriginCommitSha")
500 .HasColumnType(
"TEXT")
505 b.HasIndex(
"InstanceId",
"CommitSha")
508 b.ToTable(
"RevisionInformations");
511 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
513 b.Property<
long>(
"Id")
514 .ValueGeneratedOnAdd()
515 .HasColumnType(
"INTEGER");
517 b.Property<
string>(
"Author")
519 .HasColumnType(
"TEXT");
521 b.Property<
string>(
"BodyAtMerge")
523 .HasColumnType(
"TEXT");
525 b.Property<
string>(
"Comment")
526 .HasColumnType(
"TEXT")
527 .HasMaxLength(10000);
529 b.Property<DateTimeOffset>(
"MergedAt")
530 .HasColumnType(
"TEXT");
532 b.Property<
long>(
"MergedById")
533 .HasColumnType(
"INTEGER");
535 b.Property<
int>(
"Number")
536 .HasColumnType(
"INTEGER");
538 b.Property<
long?>(
"PrimaryRevisionInformationId")
540 .HasColumnType(
"INTEGER");
542 b.Property<
string>(
"PullRequestRevision")
544 .HasColumnType(
"TEXT")
547 b.Property<
string>(
"TitleAtMerge")
549 .HasColumnType(
"TEXT");
551 b.Property<
string>(
"Url")
553 .HasColumnType(
"TEXT");
557 b.HasIndex(
"MergedById");
559 b.HasIndex(
"PrimaryRevisionInformationId")
562 b.ToTable(
"TestMerges");
565 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
567 b.Property<
long?>(
"Id")
568 .ValueGeneratedOnAdd()
569 .HasColumnType(
"INTEGER");
571 b.Property<ulong>(
"AdministrationRights")
572 .HasColumnType(
"INTEGER");
574 b.Property<
string>(
"CanonicalName")
576 .HasColumnType(
"TEXT");
578 b.Property<DateTimeOffset?>(
"CreatedAt")
580 .HasColumnType(
"TEXT");
582 b.Property<
long?>(
"CreatedById")
583 .HasColumnType(
"INTEGER");
585 b.Property<
bool?>(
"Enabled")
587 .HasColumnType(
"INTEGER");
589 b.Property<ulong>(
"InstanceManagerRights")
590 .HasColumnType(
"INTEGER");
592 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
593 .HasColumnType(
"TEXT");
595 b.Property<
string>(
"Name")
597 .HasColumnType(
"TEXT")
598 .HasMaxLength(10000);
600 b.Property<
string>(
"PasswordHash")
601 .HasColumnType(
"TEXT");
603 b.Property<
string>(
"SystemIdentifier")
604 .HasColumnType(
"TEXT");
608 b.HasIndex(
"CanonicalName")
611 b.HasIndex(
"CreatedById");
613 b.HasIndex(
"SystemIdentifier")
619 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
621 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
622 .WithMany(
"ChatSettings")
623 .HasForeignKey(
"InstanceId")
624 .OnDelete(DeleteBehavior.Cascade)
628 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
630 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
631 .WithMany(
"Channels")
632 .HasForeignKey(
"ChatSettingsId")
633 .OnDelete(DeleteBehavior.Cascade)
637 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
639 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
641 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
642 .OnDelete(DeleteBehavior.Cascade)
645 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
646 .WithMany(
"CompileJobs")
647 .HasForeignKey(
"RevisionInformationId")
648 .OnDelete(DeleteBehavior.ClientNoAction)
652 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
654 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
655 .WithOne(
"DreamDaemonSettings")
656 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
657 .OnDelete(DeleteBehavior.Cascade)
661 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
663 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
664 .WithOne(
"DreamMakerSettings")
665 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
666 .OnDelete(DeleteBehavior.Cascade)
670 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
672 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
673 .WithMany(
"InstanceUsers")
674 .HasForeignKey(
"InstanceId")
675 .OnDelete(DeleteBehavior.Cascade)
678 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
679 .WithMany(
"InstanceUsers")
680 .HasForeignKey(
"UserId")
681 .OnDelete(DeleteBehavior.Cascade)
685 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
687 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
689 .HasForeignKey(
"CancelledById");
691 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
693 .HasForeignKey(
"InstanceId")
694 .OnDelete(DeleteBehavior.Cascade)
697 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
699 .HasForeignKey(
"StartedById")
700 .OnDelete(DeleteBehavior.Cascade)
704 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
706 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
708 .HasForeignKey(
"CompileJobId")
709 .OnDelete(DeleteBehavior.Cascade)
713 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
715 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
716 .WithOne(
"RepositorySettings")
717 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
718 .OnDelete(DeleteBehavior.Cascade)
722 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
724 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
725 .WithMany(
"ActiveTestMerges")
726 .HasForeignKey(
"RevisionInformationId")
727 .OnDelete(DeleteBehavior.Cascade)
730 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
731 .WithMany(
"RevisonInformations")
732 .HasForeignKey(
"TestMergeId")
733 .OnDelete(DeleteBehavior.ClientNoAction)
737 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
739 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
740 .WithMany(
"RevisionInformations")
741 .HasForeignKey(
"InstanceId")
742 .OnDelete(DeleteBehavior.Cascade)
746 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
748 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
749 .WithMany(
"TestMerges")
750 .HasForeignKey(
"MergedById")
751 .OnDelete(DeleteBehavior.Restrict)
754 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
755 .WithOne(
"PrimaryTestMerge")
756 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
757 .OnDelete(DeleteBehavior.Cascade)
761 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
763 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
764 .WithMany(
"CreatedUsers")
765 .HasForeignKey(
"CreatedById");
767#pragma warning restore 612, 618