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