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