tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20190219041825_MSFixRevInfoIndex.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("20190219041825_MSFixRevInfoIndex")]
13 partial class MSFixRevInfoIndex
14 {
16 protected override void BuildTargetModel(ModelBuilder modelBuilder)
17 {
18#pragma warning disable 612, 618
19 modelBuilder
20 .HasAnnotation("ProductVersion", "2.1.4-rtm-31024")
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?>("PostTestMergeComment")
358 .IsRequired();
359
360 b.Property<bool?>("PushTestMergeCommits")
361 .IsRequired();
362
363 b.Property<bool?>("ShowTestMergeCommitters")
364 .IsRequired();
365
366 b.HasKey("Id");
367
368 b.HasIndex("InstanceId")
369 .IsUnique();
370
371 b.ToTable("RepositorySettings");
372 });
373
374 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
375 {
376 b.Property<long>("Id")
377 .ValueGeneratedOnAdd()
378 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
379
380 b.Property<long>("RevisionInformationId");
381
382 b.Property<long>("TestMergeId");
383
384 b.HasKey("Id");
385
386 b.HasIndex("RevisionInformationId");
387
388 b.HasIndex("TestMergeId");
389
390 b.ToTable("RevInfoTestMerges");
391 });
392
393 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
394 {
395 b.Property<long>("Id")
396 .ValueGeneratedOnAdd()
397 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
398
399 b.Property<string>("CommitSha")
400 .IsRequired()
401 .HasMaxLength(40);
402
403 b.Property<long>("InstanceId");
404
405 b.Property<string>("OriginCommitSha")
406 .IsRequired()
407 .HasMaxLength(40);
408
409 b.HasKey("Id");
410
411 b.HasIndex("InstanceId", "CommitSha")
412 .IsUnique();
413
414 b.ToTable("RevisionInformations");
415 });
416
417 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
418 {
419 b.Property<long>("Id")
420 .ValueGeneratedOnAdd()
421 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
422
423 b.Property<string>("Author")
424 .IsRequired();
425
426 b.Property<string>("BodyAtMerge")
427 .IsRequired();
428
429 b.Property<string>("Comment");
430
431 b.Property<DateTimeOffset>("MergedAt");
432
433 b.Property<long>("MergedById");
434
435 b.Property<int?>("Number")
436 .IsRequired();
437
438 b.Property<long?>("PrimaryRevisionInformationId")
439 .IsRequired();
440
441 b.Property<string>("PullRequestRevision")
442 .IsRequired();
443
444 b.Property<string>("TitleAtMerge")
445 .IsRequired();
446
447 b.Property<string>("Url")
448 .IsRequired();
449
450 b.HasKey("Id");
451
452 b.HasIndex("MergedById");
453
454 b.HasIndex("PrimaryRevisionInformationId")
455 .IsUnique();
456
457 b.ToTable("TestMerges");
458 });
459
460 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
461 {
462 b.Property<long>("Id")
463 .ValueGeneratedOnAdd()
464 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
465
466 b.Property<decimal>("AdministrationRights")
467 .HasConversion(new ValueConverter<decimal, decimal>(v => default(decimal), v => default(decimal), new ConverterMappingHints(precision: 20, scale: 0)));
468
469 b.Property<string>("CanonicalName")
470 .IsRequired();
471
472 b.Property<DateTimeOffset?>("CreatedAt")
473 .IsRequired();
474
475 b.Property<long?>("CreatedById");
476
477 b.Property<bool?>("Enabled")
478 .IsRequired();
479
480 b.Property<decimal>("InstanceManagerRights")
481 .HasConversion(new ValueConverter<decimal, decimal>(v => default(decimal), v => default(decimal), new ConverterMappingHints(precision: 20, scale: 0)));
482
483 b.Property<DateTimeOffset?>("LastPasswordUpdate");
484
485 b.Property<string>("Name")
486 .IsRequired();
487
488 b.Property<string>("PasswordHash");
489
490 b.Property<string>("SystemIdentifier");
491
492 b.HasKey("Id");
493
494 b.HasIndex("CanonicalName")
495 .IsUnique();
496
497 b.HasIndex("CreatedById");
498
499 b.ToTable("Users");
500 });
501
502 modelBuilder.Entity("Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
503 {
504 b.Property<long>("Id")
505 .ValueGeneratedOnAdd()
506 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
507
508 b.Property<long?>("AlphaId");
509
510 b.Property<bool>("AlphaIsActive");
511
512 b.Property<long?>("BravoId");
513
514 b.Property<long>("InstanceId");
515
516 b.HasKey("Id");
517
518 b.HasIndex("AlphaId");
519
520 b.HasIndex("BravoId");
521
522 b.HasIndex("InstanceId")
523 .IsUnique();
524
525 b.ToTable("WatchdogReattachInformations");
526 });
527
528 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
529 {
530 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
531 .WithMany("ChatSettings")
532 .HasForeignKey("InstanceId")
533 .OnDelete(DeleteBehavior.Cascade);
534 });
535
536 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
537 {
538 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
539 .WithMany("Channels")
540 .HasForeignKey("ChatSettingsId")
541 .OnDelete(DeleteBehavior.Cascade);
542 });
543
544 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
545 {
546 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
547 .WithOne()
548 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
549 .OnDelete(DeleteBehavior.Restrict);
550
551 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
552 .WithMany("CompileJobs")
553 .HasForeignKey("RevisionInformationId")
554 .OnDelete(DeleteBehavior.Cascade);
555 });
556
557 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
558 {
559 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
560 .WithOne("DreamDaemonSettings")
561 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
562 .OnDelete(DeleteBehavior.Cascade);
563 });
564
565 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
566 {
567 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
568 .WithOne("DreamMakerSettings")
569 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
570 .OnDelete(DeleteBehavior.Cascade);
571 });
572
573 modelBuilder.Entity("Tgstation.Server.Host.Models.InstanceUser", b =>
574 {
575 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
576 .WithMany("InstanceUsers")
577 .HasForeignKey("InstanceId")
578 .OnDelete(DeleteBehavior.Cascade);
579
580 b.HasOne("Tgstation.Server.Host.Models.User")
581 .WithMany("InstanceUsers")
582 .HasForeignKey("UserId")
583 .OnDelete(DeleteBehavior.Cascade);
584 });
585
586 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
587 {
588 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
589 .WithMany()
590 .HasForeignKey("CancelledById");
591
592 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
593 .WithMany("Jobs")
594 .HasForeignKey("InstanceId")
595 .OnDelete(DeleteBehavior.Cascade);
596
597 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
598 .WithMany()
599 .HasForeignKey("StartedById")
600 .OnDelete(DeleteBehavior.Cascade);
601 });
602
603 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
604 {
605 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
606 .WithMany()
607 .HasForeignKey("CompileJobId")
608 .OnDelete(DeleteBehavior.Cascade);
609 });
610
611 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
612 {
613 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
614 .WithOne("RepositorySettings")
615 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
616 .OnDelete(DeleteBehavior.Cascade);
617 });
618
619 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
620 {
621 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
622 .WithMany("ActiveTestMerges")
623 .HasForeignKey("RevisionInformationId")
624 .OnDelete(DeleteBehavior.Cascade);
625
626 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
627 .WithMany("RevisonInformations")
628 .HasForeignKey("TestMergeId")
629 .OnDelete(DeleteBehavior.Cascade);
630 });
631
632 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
633 {
634 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
635 .WithMany("RevisionInformations")
636 .HasForeignKey("InstanceId")
637 .OnDelete(DeleteBehavior.Cascade);
638 });
639
640 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
641 {
642 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
643 .WithMany("TestMerges")
644 .HasForeignKey("MergedById")
645 .OnDelete(DeleteBehavior.Restrict);
646
647 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
648 .WithOne("PrimaryTestMerge")
649 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
650 .OnDelete(DeleteBehavior.Restrict);
651 });
652
653 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
654 {
655 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
656 .WithMany("CreatedUsers")
657 .HasForeignKey("CreatedById");
658 });
659
660 modelBuilder.Entity("Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
661 {
662 b.HasOne("Tgstation.Server.Host.Models.ReattachInformation", "Alpha")
663 .WithMany()
664 .HasForeignKey("AlphaId");
665
666 b.HasOne("Tgstation.Server.Host.Models.ReattachInformation", "Bravo")
667 .WithMany()
668 .HasForeignKey("BravoId");
669
670 b.HasOne("Tgstation.Server.Host.Models.Instance")
671 .WithOne("WatchdogReattachInformation")
672 .HasForeignKey("Tgstation.Server.Host.Models.WatchdogReattachInformation", "InstanceId")
673 .OnDelete(DeleteBehavior.Cascade);
674 });
675#pragma warning restore 612, 618
676 }
677 }
678}