tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20180918021228_MSAddMinimumSecurity.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("20180918021228_MSAddMinimumSecurity")]
13 partial class MSAddMinimumSecurity
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
100 b.Property<string>("DmeName");
101
102 b.Property<long?>("JobId");
103
104 b.Property<int>("MinimumSecurityLevel");
105
106 b.Property<string>("Output");
107
108 b.Property<long>("RevisionInformationId");
109
110 b.HasKey("Id");
111
112 b.HasIndex("DirectoryName");
113
114 b.HasIndex("JobId");
115
116 b.HasIndex("RevisionInformationId");
117
118 b.ToTable("CompileJobs");
119 });
120
121 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
122 {
123 b.Property<long>("Id")
124 .ValueGeneratedOnAdd()
125 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
126
127 b.Property<string>("AccessToken");
128
129 b.Property<bool?>("AllowWebClient")
130 .IsRequired();
131
132 b.Property<bool?>("AutoStart")
133 .IsRequired();
134
135 b.Property<long>("InstanceId");
136
137 b.Property<int>("PrimaryPort");
138
139 b.Property<int?>("ProcessId");
140
141 b.Property<int>("SecondaryPort");
142
143 b.Property<int>("SecurityLevel");
144
145 b.Property<bool?>("SoftRestart")
146 .IsRequired();
147
148 b.Property<bool?>("SoftShutdown")
149 .IsRequired();
150
151 b.Property<long>("StartupTimeout");
152
153 b.HasKey("Id");
154
155 b.HasIndex("InstanceId")
156 .IsUnique();
157
158 b.ToTable("DreamDaemonSettings");
159 });
160
161 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
162 {
163 b.Property<long>("Id")
164 .ValueGeneratedOnAdd()
165 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
166
167 b.Property<int>("ApiValidationPort");
168
169 b.Property<int>("ApiValidationSecurityLevel");
170
171 b.Property<long>("InstanceId");
172
173 b.Property<string>("ProjectName");
174
175 b.HasKey("Id");
176
177 b.HasIndex("InstanceId")
178 .IsUnique();
179
180 b.ToTable("DreamMakerSettings");
181 });
182
183 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
184 {
185 b.Property<long>("Id")
186 .ValueGeneratedOnAdd()
187 .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
188
189 b.Property<long>("AutoUpdateInterval");
190
191 b.Property<int>("ConfigurationType");
192
193 b.Property<string>("Name")
194 .IsRequired();
195
196 b.Property<bool?>("Online")
197 .IsRequired();
198
199 b.Property<string>("Path")
200 .IsRequired();
201
202 b.Property<long?>("WatchdogReattachInformationId");
203
204 b.HasKey("Id");
205
206 b.HasIndex("Path")
207 .IsUnique();
208
209 b.HasIndex("WatchdogReattachInformationId");
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
439 b.Property<string>("PullRequestRevision")
440 .IsRequired();
441
442 b.Property<string>("TitleAtMerge")
443 .IsRequired();
444
445 b.Property<string>("Url")
446 .IsRequired();
447
448 b.HasKey("Id");
449
450 b.HasIndex("MergedById");
451
452 b.HasIndex("PrimaryRevisionInformationId")
453 .IsUnique()
454 .HasFilter("[PrimaryRevisionInformationId] IS NOT NULL");
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.HasKey("Id");
514
515 b.HasIndex("AlphaId");
516
517 b.HasIndex("BravoId");
518
519 b.ToTable("WatchdogReattachInformations");
520 });
521
522 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
523 {
524 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
525 .WithMany("ChatSettings")
526 .HasForeignKey("InstanceId")
527 .OnDelete(DeleteBehavior.Cascade);
528 });
529
530 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
531 {
532 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
533 .WithMany("Channels")
534 .HasForeignKey("ChatSettingsId")
535 .OnDelete(DeleteBehavior.Cascade);
536 });
537
538 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
539 {
540 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
541 .WithMany()
542 .HasForeignKey("JobId");
543
544 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
545 .WithMany("CompileJobs")
546 .HasForeignKey("RevisionInformationId")
547 .OnDelete(DeleteBehavior.Cascade);
548 });
549
550 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
551 {
552 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
553 .WithOne("DreamDaemonSettings")
554 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
555 .OnDelete(DeleteBehavior.Cascade);
556 });
557
558 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
559 {
560 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
561 .WithOne("DreamMakerSettings")
562 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
563 .OnDelete(DeleteBehavior.Cascade);
564 });
565
566 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
567 {
568 b.HasOne("Tgstation.Server.Host.Models.WatchdogReattachInformation", "WatchdogReattachInformation")
569 .WithMany()
570 .HasForeignKey("WatchdogReattachInformationId");
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 });
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.SetNull);
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#pragma warning restore 612, 618
670 }
671 }
672}