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