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);
222 b.HasIndex(
"InstanceId")
225 b.ToTable(
"DreamMakerSettings");
228 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Instance", b =>
230 b.Property<
long>(
"Id")
231 .ValueGeneratedOnAdd()
232 .HasColumnType(
"INTEGER");
234 b.Property<uint?>(
"AutoUpdateInterval")
236 .HasColumnType(
"INTEGER");
238 b.Property<ushort?>(
"ChatBotLimit")
240 .HasColumnType(
"INTEGER");
242 b.Property<
int>(
"ConfigurationType")
243 .HasColumnType(
"INTEGER");
245 b.Property<
string>(
"Name")
247 .HasColumnType(
"TEXT")
248 .HasMaxLength(10000);
250 b.Property<
bool?>(
"Online")
252 .HasColumnType(
"INTEGER");
254 b.Property<
string>(
"Path")
256 .HasColumnType(
"TEXT");
263 b.ToTable(
"Instances");
266 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
268 b.Property<
long>(
"Id")
269 .ValueGeneratedOnAdd()
270 .HasColumnType(
"INTEGER");
272 b.Property<ulong>(
"ByondRights")
273 .HasColumnType(
"INTEGER");
275 b.Property<ulong>(
"ChatBotRights")
276 .HasColumnType(
"INTEGER");
278 b.Property<ulong>(
"ConfigurationRights")
279 .HasColumnType(
"INTEGER");
281 b.Property<ulong>(
"DreamDaemonRights")
282 .HasColumnType(
"INTEGER");
284 b.Property<ulong>(
"DreamMakerRights")
285 .HasColumnType(
"INTEGER");
287 b.Property<
long>(
"InstanceId")
288 .HasColumnType(
"INTEGER");
290 b.Property<ulong>(
"InstanceUserRights")
291 .HasColumnType(
"INTEGER");
293 b.Property<ulong>(
"RepositoryRights")
294 .HasColumnType(
"INTEGER");
296 b.Property<
long?>(
"UserId")
298 .HasColumnType(
"INTEGER");
302 b.HasIndex(
"InstanceId");
304 b.HasIndex(
"UserId",
"InstanceId")
307 b.ToTable(
"InstanceUsers");
310 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
312 b.Property<
long>(
"Id")
313 .ValueGeneratedOnAdd()
314 .HasColumnType(
"INTEGER");
316 b.Property<ulong?>(
"CancelRight")
317 .HasColumnType(
"INTEGER");
319 b.Property<ulong?>(
"CancelRightsType")
320 .HasColumnType(
"INTEGER");
322 b.Property<
bool?>(
"Cancelled")
324 .HasColumnType(
"INTEGER");
326 b.Property<
long?>(
"CancelledById")
327 .HasColumnType(
"INTEGER");
329 b.Property<
string>(
"Description")
331 .HasColumnType(
"TEXT");
333 b.Property<uint?>(
"ErrorCode")
334 .HasColumnType(
"INTEGER");
336 b.Property<
string>(
"ExceptionDetails")
337 .HasColumnType(
"TEXT");
339 b.Property<
long>(
"InstanceId")
340 .HasColumnType(
"INTEGER");
342 b.Property<DateTimeOffset?>(
"StartedAt")
344 .HasColumnType(
"TEXT");
346 b.Property<
long>(
"StartedById")
347 .HasColumnType(
"INTEGER");
349 b.Property<DateTimeOffset?>(
"StoppedAt")
350 .HasColumnType(
"TEXT");
354 b.HasIndex(
"CancelledById");
356 b.HasIndex(
"InstanceId");
358 b.HasIndex(
"StartedById");
363 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
365 b.Property<
long>(
"Id")
366 .ValueGeneratedOnAdd()
367 .HasColumnType(
"INTEGER");
369 b.Property<
string>(
"AccessIdentifier")
371 .HasColumnType(
"TEXT");
373 b.Property<
long>(
"CompileJobId")
374 .HasColumnType(
"INTEGER");
376 b.Property<
int>(
"LaunchSecurityLevel")
377 .HasColumnType(
"INTEGER");
379 b.Property<ushort>(
"Port")
380 .HasColumnType(
"INTEGER");
382 b.Property<
int>(
"ProcessId")
383 .HasColumnType(
"INTEGER");
385 b.Property<
int>(
"RebootState")
386 .HasColumnType(
"INTEGER");
390 b.HasIndex(
"CompileJobId");
392 b.ToTable(
"ReattachInformations");
395 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
397 b.Property<
long>(
"Id")
398 .ValueGeneratedOnAdd()
399 .HasColumnType(
"INTEGER");
401 b.Property<
string>(
"AccessToken")
402 .HasColumnType(
"TEXT")
403 .HasMaxLength(10000);
405 b.Property<
string>(
"AccessUser")
406 .HasColumnType(
"TEXT")
407 .HasMaxLength(10000);
409 b.Property<
bool?>(
"AutoUpdatesKeepTestMerges")
411 .HasColumnType(
"INTEGER");
413 b.Property<
bool?>(
"AutoUpdatesSynchronize")
415 .HasColumnType(
"INTEGER");
417 b.Property<
string>(
"CommitterEmail")
419 .HasColumnType(
"TEXT")
420 .HasMaxLength(10000);
422 b.Property<
string>(
"CommitterName")
424 .HasColumnType(
"TEXT")
425 .HasMaxLength(10000);
427 b.Property<
long>(
"InstanceId")
428 .HasColumnType(
"INTEGER");
430 b.Property<
bool?>(
"PostTestMergeComment")
432 .HasColumnType(
"INTEGER");
434 b.Property<
bool?>(
"PushTestMergeCommits")
436 .HasColumnType(
"INTEGER");
438 b.Property<
bool?>(
"ShowTestMergeCommitters")
440 .HasColumnType(
"INTEGER");
444 b.HasIndex(
"InstanceId")
447 b.ToTable(
"RepositorySettings");
450 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
452 b.Property<
long>(
"Id")
453 .ValueGeneratedOnAdd()
454 .HasColumnType(
"INTEGER");
456 b.Property<
long>(
"RevisionInformationId")
457 .HasColumnType(
"INTEGER");
459 b.Property<
long>(
"TestMergeId")
460 .HasColumnType(
"INTEGER");
464 b.HasIndex(
"RevisionInformationId");
466 b.HasIndex(
"TestMergeId");
468 b.ToTable(
"RevInfoTestMerges");
471 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
473 b.Property<
long>(
"Id")
474 .ValueGeneratedOnAdd()
475 .HasColumnType(
"INTEGER");
477 b.Property<
string>(
"CommitSha")
479 .HasColumnType(
"TEXT")
482 b.Property<
long>(
"InstanceId")
483 .HasColumnType(
"INTEGER");
485 b.Property<
string>(
"OriginCommitSha")
487 .HasColumnType(
"TEXT")
492 b.HasIndex(
"InstanceId",
"CommitSha")
495 b.ToTable(
"RevisionInformations");
498 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
500 b.Property<
long>(
"Id")
501 .ValueGeneratedOnAdd()
502 .HasColumnType(
"INTEGER");
504 b.Property<
string>(
"Author")
506 .HasColumnType(
"TEXT");
508 b.Property<
string>(
"BodyAtMerge")
510 .HasColumnType(
"TEXT");
512 b.Property<
string>(
"Comment")
513 .HasColumnType(
"TEXT")
514 .HasMaxLength(10000);
516 b.Property<DateTimeOffset>(
"MergedAt")
517 .HasColumnType(
"TEXT");
519 b.Property<
long>(
"MergedById")
520 .HasColumnType(
"INTEGER");
522 b.Property<
int>(
"Number")
523 .HasColumnType(
"INTEGER");
525 b.Property<
long?>(
"PrimaryRevisionInformationId")
527 .HasColumnType(
"INTEGER");
529 b.Property<
string>(
"PullRequestRevision")
531 .HasColumnType(
"TEXT")
534 b.Property<
string>(
"TitleAtMerge")
536 .HasColumnType(
"TEXT");
538 b.Property<
string>(
"Url")
540 .HasColumnType(
"TEXT");
544 b.HasIndex(
"MergedById");
546 b.HasIndex(
"PrimaryRevisionInformationId")
549 b.ToTable(
"TestMerges");
552 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
554 b.Property<
long?>(
"Id")
555 .ValueGeneratedOnAdd()
556 .HasColumnType(
"INTEGER");
558 b.Property<ulong>(
"AdministrationRights")
559 .HasColumnType(
"INTEGER");
561 b.Property<
string>(
"CanonicalName")
563 .HasColumnType(
"TEXT");
565 b.Property<DateTimeOffset?>(
"CreatedAt")
567 .HasColumnType(
"TEXT");
569 b.Property<
long?>(
"CreatedById")
570 .HasColumnType(
"INTEGER");
572 b.Property<
bool?>(
"Enabled")
574 .HasColumnType(
"INTEGER");
576 b.Property<ulong>(
"InstanceManagerRights")
577 .HasColumnType(
"INTEGER");
579 b.Property<DateTimeOffset?>(
"LastPasswordUpdate")
580 .HasColumnType(
"TEXT");
582 b.Property<
string>(
"Name")
584 .HasColumnType(
"TEXT")
585 .HasMaxLength(10000);
587 b.Property<
string>(
"PasswordHash")
588 .HasColumnType(
"TEXT");
590 b.Property<
string>(
"SystemIdentifier")
591 .HasColumnType(
"TEXT");
595 b.HasIndex(
"CanonicalName")
598 b.HasIndex(
"CreatedById");
600 b.HasIndex(
"SystemIdentifier")
606 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatBot", b =>
608 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
609 .WithMany(
"ChatSettings")
610 .HasForeignKey(
"InstanceId")
611 .OnDelete(DeleteBehavior.Cascade)
615 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ChatChannel", b =>
617 b.HasOne(
"Tgstation.Server.Host.Models.ChatBot",
"ChatSettings")
618 .WithMany(
"Channels")
619 .HasForeignKey(
"ChatSettingsId")
620 .OnDelete(DeleteBehavior.Cascade)
624 modelBuilder.Entity(
"Tgstation.Server.Host.Models.CompileJob", b =>
626 b.HasOne(
"Tgstation.Server.Host.Models.Job",
"Job")
628 .HasForeignKey(
"Tgstation.Server.Host.Models.CompileJob",
"JobId")
629 .OnDelete(DeleteBehavior.Cascade)
632 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
633 .WithMany(
"CompileJobs")
634 .HasForeignKey(
"RevisionInformationId")
635 .OnDelete(DeleteBehavior.ClientNoAction)
639 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
641 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
642 .WithOne(
"DreamDaemonSettings")
643 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamDaemonSettings",
"InstanceId")
644 .OnDelete(DeleteBehavior.Cascade)
648 modelBuilder.Entity(
"Tgstation.Server.Host.Models.DreamMakerSettings", b =>
650 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
651 .WithOne(
"DreamMakerSettings")
652 .HasForeignKey(
"Tgstation.Server.Host.Models.DreamMakerSettings",
"InstanceId")
653 .OnDelete(DeleteBehavior.Cascade)
657 modelBuilder.Entity(
"Tgstation.Server.Host.Models.InstanceUser", b =>
659 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
660 .WithMany(
"InstanceUsers")
661 .HasForeignKey(
"InstanceId")
662 .OnDelete(DeleteBehavior.Cascade)
665 b.HasOne(
"Tgstation.Server.Host.Models.User",
null)
666 .WithMany(
"InstanceUsers")
667 .HasForeignKey(
"UserId")
668 .OnDelete(DeleteBehavior.Cascade)
672 modelBuilder.Entity(
"Tgstation.Server.Host.Models.Job", b =>
674 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CancelledBy")
676 .HasForeignKey(
"CancelledById");
678 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
680 .HasForeignKey(
"InstanceId")
681 .OnDelete(DeleteBehavior.Cascade)
684 b.HasOne(
"Tgstation.Server.Host.Models.User",
"StartedBy")
686 .HasForeignKey(
"StartedById")
687 .OnDelete(DeleteBehavior.Cascade)
691 modelBuilder.Entity(
"Tgstation.Server.Host.Models.ReattachInformation", b =>
693 b.HasOne(
"Tgstation.Server.Host.Models.CompileJob",
"CompileJob")
695 .HasForeignKey(
"CompileJobId")
696 .OnDelete(DeleteBehavior.Cascade)
700 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RepositorySettings", b =>
702 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
703 .WithOne(
"RepositorySettings")
704 .HasForeignKey(
"Tgstation.Server.Host.Models.RepositorySettings",
"InstanceId")
705 .OnDelete(DeleteBehavior.Cascade)
709 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
711 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"RevisionInformation")
712 .WithMany(
"ActiveTestMerges")
713 .HasForeignKey(
"RevisionInformationId")
714 .OnDelete(DeleteBehavior.Cascade)
717 b.HasOne(
"Tgstation.Server.Host.Models.TestMerge",
"TestMerge")
718 .WithMany(
"RevisonInformations")
719 .HasForeignKey(
"TestMergeId")
720 .OnDelete(DeleteBehavior.ClientNoAction)
724 modelBuilder.Entity(
"Tgstation.Server.Host.Models.RevisionInformation", b =>
726 b.HasOne(
"Tgstation.Server.Host.Models.Instance",
"Instance")
727 .WithMany(
"RevisionInformations")
728 .HasForeignKey(
"InstanceId")
729 .OnDelete(DeleteBehavior.Cascade)
733 modelBuilder.Entity(
"Tgstation.Server.Host.Models.TestMerge", b =>
735 b.HasOne(
"Tgstation.Server.Host.Models.User",
"MergedBy")
736 .WithMany(
"TestMerges")
737 .HasForeignKey(
"MergedById")
738 .OnDelete(DeleteBehavior.Restrict)
741 b.HasOne(
"Tgstation.Server.Host.Models.RevisionInformation",
"PrimaryRevisionInformation")
742 .WithOne(
"PrimaryTestMerge")
743 .HasForeignKey(
"Tgstation.Server.Host.Models.TestMerge",
"PrimaryRevisionInformationId")
744 .OnDelete(DeleteBehavior.Cascade)
748 modelBuilder.Entity(
"Tgstation.Server.Host.Models.User", b =>
750 b.HasOne(
"Tgstation.Server.Host.Models.User",
"CreatedBy")
751 .WithMany(
"CreatedUsers")
752 .HasForeignKey(
"CreatedById");
754#pragma warning restore 612, 618