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