tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20200516111712_PGCreate.Designer.cs
Go to the documentation of this file.
1// <auto-generated />
2using System;
3using Microsoft.EntityFrameworkCore;
4using Microsoft.EntityFrameworkCore.Infrastructure;
5using Microsoft.EntityFrameworkCore.Migrations;
6using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
7
9{
10 [DbContext(typeof(PostgresSqlDatabaseContext))]
11 [Migration("20200516111712_PGCreate")]
12 partial class PGCreate
13 {
15 protected override void BuildTargetModel(ModelBuilder modelBuilder)
16 {
17#pragma warning disable 612, 618
18 modelBuilder
19 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
20 .HasAnnotation("ProductVersion", "3.1.4")
21 .HasAnnotation("Relational:MaxIdentifierLength", 63);
22
23 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
24 {
25 b.Property<long>("Id")
26 .ValueGeneratedOnAdd()
27 .HasColumnType("bigint")
28 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
29
30 b.Property<int>("ChannelLimit")
31 .HasColumnType("integer");
32
33 b.Property<string>("ConnectionString")
34 .IsRequired()
35 .HasColumnType("character varying(10000)")
36 .HasMaxLength(10000);
37
38 b.Property<bool?>("Enabled")
39 .HasColumnType("boolean");
40
41 b.Property<long>("InstanceId")
42 .HasColumnType("bigint");
43
44 b.Property<string>("Name")
45 .IsRequired()
46 .HasColumnType("character varying(100)")
47 .HasMaxLength(100);
48
49 b.Property<int>("Provider")
50 .HasColumnType("integer");
51
52 b.Property<long>("ReconnectionInterval")
53 .HasColumnType("bigint");
54
55 b.HasKey("Id");
56
57 b.HasIndex("InstanceId", "Name")
58 .IsUnique();
59
60 b.ToTable("ChatBots");
61 });
62
63 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
64 {
65 b.Property<long>("Id")
66 .ValueGeneratedOnAdd()
67 .HasColumnType("bigint")
68 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
69
70 b.Property<long>("ChatSettingsId")
71 .HasColumnType("bigint");
72
73 b.Property<decimal?>("DiscordChannelId")
74 .HasColumnType("numeric(20,0)");
75
76 b.Property<string>("IrcChannel")
77 .HasColumnType("character varying(100)")
78 .HasMaxLength(100);
79
80 b.Property<bool?>("IsAdminChannel")
81 .IsRequired()
82 .HasColumnType("boolean");
83
84 b.Property<bool?>("IsUpdatesChannel")
85 .IsRequired()
86 .HasColumnType("boolean");
87
88 b.Property<bool?>("IsWatchdogChannel")
89 .IsRequired()
90 .HasColumnType("boolean");
91
92 b.Property<string>("Tag")
93 .HasColumnType("character varying(10000)")
94 .HasMaxLength(10000);
95
96 b.HasKey("Id");
97
98 b.HasIndex("ChatSettingsId", "DiscordChannelId")
99 .IsUnique();
100
101 b.HasIndex("ChatSettingsId", "IrcChannel")
102 .IsUnique();
103
104 b.ToTable("ChatChannels");
105 });
106
107 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
108 {
109 b.Property<long>("Id")
110 .ValueGeneratedOnAdd()
111 .HasColumnType("bigint")
112 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
113
114 b.Property<string>("ByondVersion")
115 .IsRequired()
116 .HasColumnType("text");
117
118 b.Property<int?>("DMApiMajorVersion")
119 .HasColumnType("integer");
120
121 b.Property<int?>("DMApiMinorVersion")
122 .HasColumnType("integer");
123
124 b.Property<int?>("DMApiPatchVersion")
125 .HasColumnType("integer");
126
127 b.Property<Guid?>("DirectoryName")
128 .IsRequired()
129 .HasColumnType("uuid");
130
131 b.Property<string>("DmeName")
132 .IsRequired()
133 .HasColumnType("text");
134
135 b.Property<long>("JobId")
136 .HasColumnType("bigint");
137
138 b.Property<int>("MinimumSecurityLevel")
139 .HasColumnType("integer");
140
141 b.Property<string>("Output")
142 .IsRequired()
143 .HasColumnType("text");
144
145 b.Property<long>("RevisionInformationId")
146 .HasColumnType("bigint");
147
148 b.HasKey("Id");
149
150 b.HasIndex("DirectoryName");
151
152 b.HasIndex("JobId")
153 .IsUnique();
154
155 b.HasIndex("RevisionInformationId");
156
157 b.ToTable("CompileJobs");
158 });
159
160 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
161 {
162 b.Property<long>("Id")
163 .ValueGeneratedOnAdd()
164 .HasColumnType("bigint")
165 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
166
167 b.Property<bool?>("AllowWebClient")
168 .IsRequired()
169 .HasColumnType("boolean");
170
171 b.Property<bool?>("AutoStart")
172 .IsRequired()
173 .HasColumnType("boolean");
174
175 b.Property<long>("HeartbeatSeconds")
176 .HasColumnType("bigint");
177
178 b.Property<long>("InstanceId")
179 .HasColumnType("bigint");
180
181 b.Property<int>("PrimaryPort")
182 .HasColumnType("integer");
183
184 b.Property<int>("SecondaryPort")
185 .HasColumnType("integer");
186
187 b.Property<int>("SecurityLevel")
188 .HasColumnType("integer");
189
190 b.Property<long>("StartupTimeout")
191 .HasColumnType("bigint");
192
193 b.HasKey("Id");
194
195 b.HasIndex("InstanceId")
196 .IsUnique();
197
198 b.ToTable("DreamDaemonSettings");
199 });
200
201 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
202 {
203 b.Property<long>("Id")
204 .ValueGeneratedOnAdd()
205 .HasColumnType("bigint")
206 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
207
208 b.Property<int>("ApiValidationPort")
209 .HasColumnType("integer");
210
211 b.Property<int>("ApiValidationSecurityLevel")
212 .HasColumnType("integer");
213
214 b.Property<long>("InstanceId")
215 .HasColumnType("bigint");
216
217 b.Property<string>("ProjectName")
218 .HasColumnType("character varying(10000)")
219 .HasMaxLength(10000);
220
221 b.HasKey("Id");
222
223 b.HasIndex("InstanceId")
224 .IsUnique();
225
226 b.ToTable("DreamMakerSettings");
227 });
228
229 modelBuilder.Entity("Tgstation.Server.Host.Models.DualReattachInformation", b =>
230 {
231 b.Property<long>("Id")
232 .ValueGeneratedOnAdd()
233 .HasColumnType("bigint")
234 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
235
236 b.Property<long?>("AlphaId")
237 .HasColumnType("bigint");
238
239 b.Property<bool>("AlphaIsActive")
240 .HasColumnType("boolean");
241
242 b.Property<long?>("BravoId")
243 .HasColumnType("bigint");
244
245 b.Property<long>("InstanceId")
246 .HasColumnType("bigint");
247
248 b.HasKey("Id");
249
250 b.HasIndex("AlphaId");
251
252 b.HasIndex("BravoId");
253
254 b.HasIndex("InstanceId")
255 .IsUnique();
256
257 b.ToTable("WatchdogReattachInformations");
258 });
259
260 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
261 {
262 b.Property<long>("Id")
263 .ValueGeneratedOnAdd()
264 .HasColumnType("bigint")
265 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
266
267 b.Property<long>("AutoUpdateInterval")
268 .HasColumnType("bigint");
269
270 b.Property<int>("ChatBotLimit")
271 .HasColumnType("integer");
272
273 b.Property<int>("ConfigurationType")
274 .HasColumnType("integer");
275
276 b.Property<string>("Name")
277 .IsRequired()
278 .HasColumnType("character varying(10000)")
279 .HasMaxLength(10000);
280
281 b.Property<bool?>("Online")
282 .IsRequired()
283 .HasColumnType("boolean");
284
285 b.Property<string>("Path")
286 .IsRequired()
287 .HasColumnType("text");
288
289 b.HasKey("Id");
290
291 b.HasIndex("Path")
292 .IsUnique();
293
294 b.ToTable("Instances");
295 });
296
297 modelBuilder.Entity("Tgstation.Server.Host.Models.InstanceUser", b =>
298 {
299 b.Property<long>("Id")
300 .ValueGeneratedOnAdd()
301 .HasColumnType("bigint")
302 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
303
304 b.Property<decimal>("ByondRights")
305 .HasColumnType("numeric(20,0)");
306
307 b.Property<decimal>("ChatBotRights")
308 .HasColumnType("numeric(20,0)");
309
310 b.Property<decimal>("ConfigurationRights")
311 .HasColumnType("numeric(20,0)");
312
313 b.Property<decimal>("DreamDaemonRights")
314 .HasColumnType("numeric(20,0)");
315
316 b.Property<decimal>("DreamMakerRights")
317 .HasColumnType("numeric(20,0)");
318
319 b.Property<long>("InstanceId")
320 .HasColumnType("bigint");
321
322 b.Property<decimal>("InstanceUserRights")
323 .HasColumnType("numeric(20,0)");
324
325 b.Property<decimal>("RepositoryRights")
326 .HasColumnType("numeric(20,0)");
327
328 b.Property<long?>("UserId")
329 .IsRequired()
330 .HasColumnType("bigint");
331
332 b.HasKey("Id");
333
334 b.HasIndex("InstanceId");
335
336 b.HasIndex("UserId", "InstanceId")
337 .IsUnique();
338
339 b.ToTable("InstanceUsers");
340 });
341
342 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
343 {
344 b.Property<long>("Id")
345 .ValueGeneratedOnAdd()
346 .HasColumnType("bigint")
347 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
348
349 b.Property<decimal?>("CancelRight")
350 .HasColumnType("numeric(20,0)");
351
352 b.Property<decimal?>("CancelRightsType")
353 .HasColumnType("numeric(20,0)");
354
355 b.Property<bool?>("Cancelled")
356 .IsRequired()
357 .HasColumnType("boolean");
358
359 b.Property<long?>("CancelledById")
360 .HasColumnType("bigint");
361
362 b.Property<string>("Description")
363 .IsRequired()
364 .HasColumnType("text");
365
366 b.Property<long?>("ErrorCode")
367 .HasColumnType("bigint");
368
369 b.Property<string>("ExceptionDetails")
370 .HasColumnType("text");
371
372 b.Property<long>("InstanceId")
373 .HasColumnType("bigint");
374
375 b.Property<DateTimeOffset?>("StartedAt")
376 .IsRequired()
377 .HasColumnType("timestamp with time zone");
378
379 b.Property<long>("StartedById")
380 .HasColumnType("bigint");
381
382 b.Property<DateTimeOffset?>("StoppedAt")
383 .HasColumnType("timestamp with time zone");
384
385 b.HasKey("Id");
386
387 b.HasIndex("CancelledById");
388
389 b.HasIndex("InstanceId");
390
391 b.HasIndex("StartedById");
392
393 b.ToTable("Jobs");
394 });
395
396 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
397 {
398 b.Property<long>("Id")
399 .ValueGeneratedOnAdd()
400 .HasColumnType("bigint")
401 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
402
403 b.Property<string>("AccessIdentifier")
404 .IsRequired()
405 .HasColumnType("text");
406
407 b.Property<long>("CompileJobId")
408 .HasColumnType("bigint");
409
410 b.Property<bool>("IsPrimary")
411 .HasColumnType("boolean");
412
413 b.Property<int>("LaunchSecurityLevel")
414 .HasColumnType("integer");
415
416 b.Property<int>("Port")
417 .HasColumnType("integer");
418
419 b.Property<int>("ProcessId")
420 .HasColumnType("integer");
421
422 b.Property<int>("RebootState")
423 .HasColumnType("integer");
424
425 b.HasKey("Id");
426
427 b.HasIndex("CompileJobId");
428
429 b.ToTable("ReattachInformations");
430 });
431
432 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
433 {
434 b.Property<long>("Id")
435 .ValueGeneratedOnAdd()
436 .HasColumnType("bigint")
437 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
438
439 b.Property<string>("AccessToken")
440 .HasColumnType("character varying(10000)")
441 .HasMaxLength(10000);
442
443 b.Property<string>("AccessUser")
444 .HasColumnType("character varying(10000)")
445 .HasMaxLength(10000);
446
447 b.Property<bool?>("AutoUpdatesKeepTestMerges")
448 .IsRequired()
449 .HasColumnType("boolean");
450
451 b.Property<bool?>("AutoUpdatesSynchronize")
452 .IsRequired()
453 .HasColumnType("boolean");
454
455 b.Property<string>("CommitterEmail")
456 .IsRequired()
457 .HasColumnType("character varying(10000)")
458 .HasMaxLength(10000);
459
460 b.Property<string>("CommitterName")
461 .IsRequired()
462 .HasColumnType("character varying(10000)")
463 .HasMaxLength(10000);
464
465 b.Property<long>("InstanceId")
466 .HasColumnType("bigint");
467
468 b.Property<bool?>("PostTestMergeComment")
469 .IsRequired()
470 .HasColumnType("boolean");
471
472 b.Property<bool?>("PushTestMergeCommits")
473 .IsRequired()
474 .HasColumnType("boolean");
475
476 b.Property<bool?>("ShowTestMergeCommitters")
477 .IsRequired()
478 .HasColumnType("boolean");
479
480 b.HasKey("Id");
481
482 b.HasIndex("InstanceId")
483 .IsUnique();
484
485 b.ToTable("RepositorySettings");
486 });
487
488 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
489 {
490 b.Property<long>("Id")
491 .ValueGeneratedOnAdd()
492 .HasColumnType("bigint")
493 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
494
495 b.Property<long>("RevisionInformationId")
496 .HasColumnType("bigint");
497
498 b.Property<long>("TestMergeId")
499 .HasColumnType("bigint");
500
501 b.HasKey("Id");
502
503 b.HasIndex("RevisionInformationId");
504
505 b.HasIndex("TestMergeId");
506
507 b.ToTable("RevInfoTestMerges");
508 });
509
510 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
511 {
512 b.Property<long>("Id")
513 .ValueGeneratedOnAdd()
514 .HasColumnType("bigint")
515 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
516
517 b.Property<string>("CommitSha")
518 .IsRequired()
519 .HasColumnType("character varying(40)")
520 .HasMaxLength(40);
521
522 b.Property<long>("InstanceId")
523 .HasColumnType("bigint");
524
525 b.Property<string>("OriginCommitSha")
526 .IsRequired()
527 .HasColumnType("character varying(40)")
528 .HasMaxLength(40);
529
530 b.HasKey("Id");
531
532 b.HasIndex("InstanceId", "CommitSha")
533 .IsUnique();
534
535 b.ToTable("RevisionInformations");
536 });
537
538 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
539 {
540 b.Property<long>("Id")
541 .ValueGeneratedOnAdd()
542 .HasColumnType("bigint")
543 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
544
545 b.Property<string>("Author")
546 .IsRequired()
547 .HasColumnType("text");
548
549 b.Property<string>("BodyAtMerge")
550 .IsRequired()
551 .HasColumnType("text");
552
553 b.Property<string>("Comment")
554 .HasColumnType("character varying(10000)")
555 .HasMaxLength(10000);
556
557 b.Property<DateTimeOffset>("MergedAt")
558 .HasColumnType("timestamp with time zone");
559
560 b.Property<long>("MergedById")
561 .HasColumnType("bigint");
562
563 b.Property<int>("Number")
564 .HasColumnType("integer");
565
566 b.Property<long?>("PrimaryRevisionInformationId")
567 .IsRequired()
568 .HasColumnType("bigint");
569
570 b.Property<string>("PullRequestRevision")
571 .IsRequired()
572 .HasColumnType("character varying(40)")
573 .HasMaxLength(40);
574
575 b.Property<string>("TitleAtMerge")
576 .IsRequired()
577 .HasColumnType("text");
578
579 b.Property<string>("Url")
580 .IsRequired()
581 .HasColumnType("text");
582
583 b.HasKey("Id");
584
585 b.HasIndex("MergedById");
586
587 b.HasIndex("PrimaryRevisionInformationId")
588 .IsUnique();
589
590 b.ToTable("TestMerges");
591 });
592
593 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
594 {
595 b.Property<long?>("Id")
596 .ValueGeneratedOnAdd()
597 .HasColumnType("bigint")
598 .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
599
600 b.Property<decimal>("AdministrationRights")
601 .HasColumnType("numeric(20,0)");
602
603 b.Property<string>("CanonicalName")
604 .IsRequired()
605 .HasColumnType("text");
606
607 b.Property<DateTimeOffset?>("CreatedAt")
608 .IsRequired()
609 .HasColumnType("timestamp with time zone");
610
611 b.Property<long?>("CreatedById")
612 .HasColumnType("bigint");
613
614 b.Property<bool?>("Enabled")
615 .IsRequired()
616 .HasColumnType("boolean");
617
618 b.Property<decimal>("InstanceManagerRights")
619 .HasColumnType("numeric(20,0)");
620
621 b.Property<DateTimeOffset?>("LastPasswordUpdate")
622 .HasColumnType("timestamp with time zone");
623
624 b.Property<string>("Name")
625 .IsRequired()
626 .HasColumnType("character varying(10000)")
627 .HasMaxLength(10000);
628
629 b.Property<string>("PasswordHash")
630 .HasColumnType("text");
631
632 b.Property<string>("SystemIdentifier")
633 .HasColumnType("text");
634
635 b.HasKey("Id");
636
637 b.HasIndex("CanonicalName")
638 .IsUnique();
639
640 b.HasIndex("CreatedById");
641
642 b.HasIndex("SystemIdentifier")
643 .IsUnique();
644
645 b.ToTable("Users");
646 });
647
648 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
649 {
650 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
651 .WithMany("ChatSettings")
652 .HasForeignKey("InstanceId")
653 .OnDelete(DeleteBehavior.Cascade)
654 .IsRequired();
655 });
656
657 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
658 {
659 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
660 .WithMany("Channels")
661 .HasForeignKey("ChatSettingsId")
662 .OnDelete(DeleteBehavior.Cascade)
663 .IsRequired();
664 });
665
666 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
667 {
668 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
669 .WithOne()
670 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
671 .OnDelete(DeleteBehavior.Cascade)
672 .IsRequired();
673
674 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
675 .WithMany("CompileJobs")
676 .HasForeignKey("RevisionInformationId")
677 .OnDelete(DeleteBehavior.Cascade)
678 .IsRequired();
679 });
680
681 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
682 {
683 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
684 .WithOne("DreamDaemonSettings")
685 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
686 .OnDelete(DeleteBehavior.Cascade)
687 .IsRequired();
688 });
689
690 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
691 {
692 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
693 .WithOne("DreamMakerSettings")
694 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
695 .OnDelete(DeleteBehavior.Cascade)
696 .IsRequired();
697 });
698
699 modelBuilder.Entity("Tgstation.Server.Host.Models.DualReattachInformation", b =>
700 {
701 b.HasOne("Tgstation.Server.Host.Models.ReattachInformation", "Alpha")
702 .WithMany()
703 .HasForeignKey("AlphaId");
704
705 b.HasOne("Tgstation.Server.Host.Models.ReattachInformation", "Bravo")
706 .WithMany()
707 .HasForeignKey("BravoId");
708
709 b.HasOne("Tgstation.Server.Host.Models.Instance", null)
710 .WithOne("WatchdogReattachInformation")
711 .HasForeignKey("Tgstation.Server.Host.Models.DualReattachInformation", "InstanceId")
712 .OnDelete(DeleteBehavior.Cascade)
713 .IsRequired();
714 });
715
716 modelBuilder.Entity("Tgstation.Server.Host.Models.InstanceUser", b =>
717 {
718 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
719 .WithMany("InstanceUsers")
720 .HasForeignKey("InstanceId")
721 .OnDelete(DeleteBehavior.Cascade)
722 .IsRequired();
723
724 b.HasOne("Tgstation.Server.Host.Models.User", null)
725 .WithMany("InstanceUsers")
726 .HasForeignKey("UserId")
727 .OnDelete(DeleteBehavior.Cascade)
728 .IsRequired();
729 });
730
731 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
732 {
733 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
734 .WithMany()
735 .HasForeignKey("CancelledById");
736
737 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
738 .WithMany("Jobs")
739 .HasForeignKey("InstanceId")
740 .OnDelete(DeleteBehavior.Cascade)
741 .IsRequired();
742
743 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
744 .WithMany()
745 .HasForeignKey("StartedById")
746 .OnDelete(DeleteBehavior.Cascade)
747 .IsRequired();
748 });
749
750 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
751 {
752 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
753 .WithMany()
754 .HasForeignKey("CompileJobId")
755 .OnDelete(DeleteBehavior.Cascade)
756 .IsRequired();
757 });
758
759 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
760 {
761 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
762 .WithOne("RepositorySettings")
763 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
764 .OnDelete(DeleteBehavior.Cascade)
765 .IsRequired();
766 });
767
768 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
769 {
770 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
771 .WithMany("ActiveTestMerges")
772 .HasForeignKey("RevisionInformationId")
773 .OnDelete(DeleteBehavior.Cascade)
774 .IsRequired();
775
776 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
777 .WithMany("RevisonInformations")
778 .HasForeignKey("TestMergeId")
779 .OnDelete(DeleteBehavior.ClientNoAction)
780 .IsRequired();
781 });
782
783 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
784 {
785 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
786 .WithMany("RevisionInformations")
787 .HasForeignKey("InstanceId")
788 .OnDelete(DeleteBehavior.Cascade)
789 .IsRequired();
790 });
791
792 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
793 {
794 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
795 .WithMany("TestMerges")
796 .HasForeignKey("MergedById")
797 .OnDelete(DeleteBehavior.Restrict)
798 .IsRequired();
799
800 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
801 .WithOne("PrimaryTestMerge")
802 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
803 .OnDelete(DeleteBehavior.Cascade)
804 .IsRequired();
805 });
806
807 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
808 {
809 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
810 .WithMany("CreatedUsers")
811 .HasForeignKey("CreatedById");
812 });
813#pragma warning restore 612, 618
814 }
815 }
816}