16#pragma warning disable 612, 618
18 .HasAnnotation(
"ProductVersion",
"3.1.5");
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<
long>(
"JobId")
132 .HasColumnType(
"INTEGER");
134 b.Property<
int?>(
"MinimumSecurityLevel")
135 .HasColumnType(
"INTEGER");
137 b.Property<
string>(
"Output")
139 .HasColumnType(
"TEXT");
141 b.Property<
long>(
"RevisionInformationId")
142 .HasColumnType(
"INTEGER");
146 b.HasIndex(
"DirectoryName");
151 b.HasIndex(
"RevisionInformationId");
153 b.ToTable(
"CompileJobs");
156 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
158 b.Property<
long>(
"Id")
159 .ValueGeneratedOnAdd()
160 .HasColumnType(
"INTEGER");
162 b.Property<
bool?>(
"AllowWebClient")
164 .HasColumnType(
"INTEGER");
166 b.Property<
bool?>(
"AutoStart")
168 .HasColumnType(
"INTEGER");
170 b.Property<uint?>(
"HeartbeatSeconds")
172 .HasColumnType(
"INTEGER");
174 b.Property<
long>(
"InstanceId")
175 .HasColumnType(
"INTEGER");
177 b.Property<ushort?>(
"Port")
179 .HasColumnType(
"INTEGER");
181 b.Property<
int>(
"SecurityLevel")
182 .HasColumnType(
"INTEGER");
184 b.Property<uint?>(
"StartupTimeout")
186 .HasColumnType(
"INTEGER");
188 b.Property<uint?>(
"TopicRequestTimeout")
190 .HasColumnType(
"INTEGER");
194 b.HasIndex(
"InstanceId")
197 b.ToTable(
"DreamDaemonSettings");
200 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
202 b.Property<
long>(
"Id")
203 .ValueGeneratedOnAdd()
204 .HasColumnType(
"INTEGER");
206 b.Property<ushort?>(
"ApiValidationPort")
208 .HasColumnType(
"INTEGER");
210 b.Property<
int>(
"ApiValidationSecurityLevel")
211 .HasColumnType(
"INTEGER");
213 b.Property<
long>(
"InstanceId")
214 .HasColumnType(
"INTEGER");
216 b.Property<
string>(
"ProjectName")
217 .HasColumnType(
"TEXT")
218 .HasMaxLength(10000);
220 b.Property<
bool?>(
"RequireDMApiValidation")
222 .HasColumnType(
"INTEGER");
226 b.HasIndex(
"InstanceId")
229 b.ToTable(
"DreamMakerSettings");
232 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
234 b.Property<
long>(
"Id")
235 .ValueGeneratedOnAdd()
236 .HasColumnType(
"INTEGER");
238 b.Property<uint?>(
"AutoUpdateInterval")
240 .HasColumnType(
"INTEGER");
242 b.Property<ushort?>(
"ChatBotLimit")
244 .HasColumnType(
"INTEGER");
246 b.Property<
int>(
"ConfigurationType")
247 .HasColumnType(
"INTEGER");
249 b.Property<
string>(
"Name")
251 .HasColumnType(
"TEXT")
252 .HasMaxLength(10000);
254 b.Property<
bool?>(
"Online")
256 .HasColumnType(
"INTEGER");
258 b.Property<
string>(
"Path")
260 .HasColumnType(
"TEXT");
267 b.ToTable(
"Instances");
270 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
272 b.Property<
long>(
"Id")
273 .ValueGeneratedOnAdd()
274 .HasColumnType(
"INTEGER");
276 b.Property<ulong>(
"ByondRights")
277 .HasColumnType(
"INTEGER");
279 b.Property<ulong>(
"ChatBotRights")
280 .HasColumnType(
"INTEGER");
282 b.Property<ulong>(
"ConfigurationRights")
283 .HasColumnType(
"INTEGER");
285 b.Property<ulong>(
"DreamDaemonRights")
286 .HasColumnType(
"INTEGER");
288 b.Property<ulong>(
"DreamMakerRights")
289 .HasColumnType(
"INTEGER");
291 b.Property<
long>(
"InstanceId")
292 .HasColumnType(
"INTEGER");
294 b.Property<ulong>(
"InstanceUserRights")
295 .HasColumnType(
"INTEGER");
297 b.Property<ulong>(
"RepositoryRights")
298 .HasColumnType(
"INTEGER");
300 b.Property<
long?>(
"UserId")
302 .HasColumnType(
"INTEGER");
306 b.HasIndex(
"InstanceId");
308 b.HasIndex(
"UserId",
"InstanceId")
311 b.ToTable(
"InstanceUsers");
314 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
316 b.Property<
long>(
"Id")
317 .ValueGeneratedOnAdd()
318 .HasColumnType(
"INTEGER");
320 b.Property<ulong?>(
"CancelRight")
321 .HasColumnType(
"INTEGER");
323 b.Property<ulong?>(
"CancelRightsType")
324 .HasColumnType(
"INTEGER");
326 b.Property<
bool?>(
"Cancelled")
328 .HasColumnType(
"INTEGER");
330 b.Property<
long?>(
"CancelledById")
331 .HasColumnType(
"INTEGER");
333 b.Property<
string>(
"Description")
335 .HasColumnType(
"TEXT");
337 b.Property<uint?>(
"ErrorCode")
338 .HasColumnType(
"INTEGER");
340 b.Property<
string>(
"ExceptionDetails")
341 .HasColumnType(
"TEXT");
343 b.Property<
long>(
"InstanceId")
344 .HasColumnType(
"INTEGER");
346 b.Property<DateTimeOffset?>(
"StartedAt")
348 .HasColumnType(
"TEXT");
350 b.Property<
long>(
"StartedById")
351 .HasColumnType(
"INTEGER");
353 b.Property<DateTimeOffset?>(
"StoppedAt")
354 .HasColumnType(
"TEXT");
358 b.HasIndex(
"CancelledById");
360 b.HasIndex(
"InstanceId");
362 b.HasIndex(
"StartedById");
367 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
369 b.Property<
long>(
"Id")
370 .ValueGeneratedOnAdd()
371 .HasColumnType(
"INTEGER");
373 b.Property<
string>(
"AccessIdentifier")
375 .HasColumnType(
"TEXT");
377 b.Property<
long>(
"CompileJobId")
378 .HasColumnType(
"INTEGER");
380 b.Property<
int>(
"LaunchSecurityLevel")
381 .HasColumnType(
"INTEGER");
383 b.Property<ushort>(
"Port")
384 .HasColumnType(
"INTEGER");
386 b.Property<
int>(
"ProcessId")
387 .HasColumnType(
"INTEGER");
389 b.Property<
int>(
"RebootState")
390 .HasColumnType(
"INTEGER");
394 b.HasIndex(
"CompileJobId");
396 b.ToTable(
"ReattachInformations");
399 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
401 b.Property<
long>(
"Id")
402 .ValueGeneratedOnAdd()
403 .HasColumnType(
"INTEGER");
405 b.Property<
string>(
"AccessToken")
406 .HasColumnType(
"TEXT")
407 .HasMaxLength(10000);
409 b.Property<
string>(
"AccessUser")
410 .HasColumnType(
"TEXT")
411 .HasMaxLength(10000);
413 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
415 .HasColumnType(
"INTEGER");
417 b.Property<
bool?>(
"AutoUpdatesSynchronize")
419 .HasColumnType(
"INTEGER");
421 b.Property<
string>(
"CommitterEmail")
423 .HasColumnType(
"TEXT")
424 .HasMaxLength(10000);
426 b.Property<
string>(
"CommitterName")
428 .HasColumnType(
"TEXT")
429 .HasMaxLength(10000);
431 b.Property<
long>(
"InstanceId")
432 .HasColumnType(
"INTEGER");
434 b.Property<
bool?>(
"PostTestMergeComment")
436 .HasColumnType(
"INTEGER");
438 b.Property<
bool?>(
"PushTestMergeCommits")
440 .HasColumnType(
"INTEGER");
442 b.Property<
bool?>(
"ShowTestMergeCommitters")
444 .HasColumnType(
"INTEGER");
448 b.HasIndex(
"InstanceId")
451 b.ToTable(
"RepositorySettings");
454 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
456 b.Property<
long>(
"Id")
457 .ValueGeneratedOnAdd()
458 .HasColumnType(
"INTEGER");
460 b.Property<
long>(
"RevisionInformationId")
461 .HasColumnType(
"INTEGER");
463 b.Property<
long>(
"TestMergeId")
464 .HasColumnType(
"INTEGER");
468 b.HasIndex(
"RevisionInformationId");
470 b.HasIndex(
"TestMergeId");
472 b.ToTable(
"RevInfoTestMerges");
475 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
477 b.Property<
long>(
"Id")
478 .ValueGeneratedOnAdd()
479 .HasColumnType(
"INTEGER");
481 b.Property<
string>(
"CommitSha")
483 .HasColumnType(
"TEXT")
486 b.Property<
long>(
"InstanceId")
487 .HasColumnType(
"INTEGER");
489 b.Property<
string>(
"OriginCommitSha")
491 .HasColumnType(
"TEXT")
496 b.HasIndex(
"InstanceId",
"CommitSha")
499 b.ToTable(
"RevisionInformations");
502 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
504 b.Property<
long>(
"Id")
505 .ValueGeneratedOnAdd()
506 .HasColumnType(
"INTEGER");
508 b.Property<
string>(
"Author")
510 .HasColumnType(
"TEXT");
512 b.Property<
string>(
"BodyAtMerge")
514 .HasColumnType(
"TEXT");
516 b.Property<
string>(
"Comment")
517 .HasColumnType(
"TEXT")
518 .HasMaxLength(10000);
520 b.Property<DateTimeOffset>(
"MergedAt")
521 .HasColumnType(
"TEXT");
523 b.Property<
long>(
"MergedById")
524 .HasColumnType(
"INTEGER");
526 b.Property<
int>(
"Number")
527 .HasColumnType(
"INTEGER");
529 b.Property<
long?>(
"PrimaryRevisionInformationId")
531 .HasColumnType(
"INTEGER");
533 b.Property<
string>(
"PullRequestRevision")
535 .HasColumnType(
"TEXT")
538 b.Property<
string>(
"TitleAtMerge")
540 .HasColumnType(
"TEXT");
542 b.Property<
string>(
"Url")
544 .HasColumnType(
"TEXT");
548 b.HasIndex(
"MergedById");
550 b.HasIndex(
"PrimaryRevisionInformationId")
553 b.ToTable(
"TestMerges");
556 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
558 b.Property<
long?>(
"Id")
559 .ValueGeneratedOnAdd()
560 .HasColumnType(
"INTEGER");
562 b.Property<ulong>(
"AdministrationRights")
563 .HasColumnType(
"INTEGER");
565 b.Property<
string>(
"CanonicalName")
567 .HasColumnType(
"TEXT");
569 b.Property<DateTimeOffset?>(
"CreatedAt")
571 .HasColumnType(
"TEXT");
573 b.Property<
long?>(
"CreatedById")
574 .HasColumnType(
"INTEGER");
576 b.Property<
bool?>(
"Enabled")
578 .HasColumnType(
"INTEGER");
580 b.Property<ulong>(
"InstanceManagerRights")
581 .HasColumnType(
"INTEGER");
583 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
584 .HasColumnType(
"TEXT");
586 b.Property<
string>(
"Name")
588 .HasColumnType(
"TEXT")
589 .HasMaxLength(10000);
591 b.Property<
string>(
"PasswordHash")
592 .HasColumnType(
"TEXT");
594 b.Property<
string>(
"SystemIdentifier")
595 .HasColumnType(
"TEXT");
599 b.HasIndex(
"CanonicalName")
602 b.HasIndex(
"CreatedById");
604 b.HasIndex(
"SystemIdentifier")
610 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
612 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
613 .WithMany(
"ChatSettings")
614 .HasForeignKey(
"InstanceId")
615 .OnDelete(DeleteBehavior.Cascade)
619 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
621 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
622 .WithMany(
"Channels")
623 .HasForeignKey(
"ChatSettingsId")
624 .OnDelete(DeleteBehavior.Cascade)
628 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
630 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
632 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
633 .OnDelete(DeleteBehavior.Cascade)
636 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
637 .WithMany(
"CompileJobs")
638 .HasForeignKey(
"RevisionInformationId")
639 .OnDelete(DeleteBehavior.ClientNoAction)
643 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
645 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
646 .WithOne(
"DreamDaemonSettings")
647 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
648 .OnDelete(DeleteBehavior.Cascade)
652 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
654 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
655 .WithOne(
"DreamMakerSettings")
656 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
657 .OnDelete(DeleteBehavior.Cascade)
661 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
663 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
664 .WithMany(
"InstanceUsers")
665 .HasForeignKey(
"InstanceId")
666 .OnDelete(DeleteBehavior.Cascade)
669 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
670 .WithMany(
"InstanceUsers")
671 .HasForeignKey(
"UserId")
672 .OnDelete(DeleteBehavior.Cascade)
676 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
678 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
680 .HasForeignKey(
"CancelledById");
682 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
684 .HasForeignKey(
"InstanceId")
685 .OnDelete(DeleteBehavior.Cascade)
688 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
690 .HasForeignKey(
"StartedById")
691 .OnDelete(DeleteBehavior.Cascade)
695 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
697 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
699 .HasForeignKey(
"CompileJobId")
700 .OnDelete(DeleteBehavior.Cascade)
704 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
706 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
707 .WithOne(
"RepositorySettings")
708 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
709 .OnDelete(DeleteBehavior.Cascade)
713 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
715 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
716 .WithMany(
"ActiveTestMerges")
717 .HasForeignKey(
"RevisionInformationId")
718 .OnDelete(DeleteBehavior.Cascade)
721 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
722 .WithMany(
"RevisonInformations")
723 .HasForeignKey(
"TestMergeId")
724 .OnDelete(DeleteBehavior.ClientNoAction)
728 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
730 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
731 .WithMany(
"RevisionInformations")
732 .HasForeignKey(
"InstanceId")
733 .OnDelete(DeleteBehavior.Cascade)
737 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
739 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
740 .WithMany(
"TestMerges")
741 .HasForeignKey(
"MergedById")
742 .OnDelete(DeleteBehavior.Restrict)
745 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
746 .WithOne(
"PrimaryTestMerge")
747 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
748 .OnDelete(DeleteBehavior.Cascade)
752 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
754 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
755 .WithMany(
"CreatedUsers")
756 .HasForeignKey(
"CreatedById");
758#pragma warning restore 612, 618