tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
20190219042440_MYFixRevInfoIndex.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("20190219042440_MYFixRevInfoIndex")]
11 partial class MYFixRevInfoIndex
12 {
14 protected override void BuildTargetModel(ModelBuilder modelBuilder)
15 {
16#pragma warning disable 612, 618
17 modelBuilder
18 .HasAnnotation("ProductVersion", "2.1.4-rtm-31024")
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 .IsRequired();
91
92 b.Property<string>("DmeName")
93 .IsRequired();
94
95 b.Property<long>("JobId");
96
97 b.Property<int>("MinimumSecurityLevel");
98
99 b.Property<string>("Output")
100 .IsRequired();
101
102 b.Property<long>("RevisionInformationId");
103
104 b.HasKey("Id");
105
106 b.HasIndex("DirectoryName");
107
108 b.HasIndex("JobId")
109 .IsUnique();
110
111 b.HasIndex("RevisionInformationId");
112
113 b.ToTable("CompileJobs");
114 });
115
116 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
117 {
118 b.Property<long>("Id")
119 .ValueGeneratedOnAdd();
120
121 b.Property<string>("AccessToken");
122
123 b.Property<bool?>("AllowWebClient")
124 .IsRequired();
125
126 b.Property<bool?>("AutoStart")
127 .IsRequired();
128
129 b.Property<long>("InstanceId");
130
131 b.Property<ushort?>("PrimaryPort")
132 .IsRequired();
133
134 b.Property<int?>("ProcessId");
135
136 b.Property<ushort?>("SecondaryPort")
137 .IsRequired();
138
139 b.Property<int>("SecurityLevel");
140
141 b.Property<bool?>("SoftRestart")
142 .IsRequired();
143
144 b.Property<bool?>("SoftShutdown")
145 .IsRequired();
146
147 b.Property<uint?>("StartupTimeout")
148 .IsRequired();
149
150 b.HasKey("Id");
151
152 b.HasIndex("InstanceId")
153 .IsUnique();
154
155 b.ToTable("DreamDaemonSettings");
156 });
157
158 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
159 {
160 b.Property<long>("Id")
161 .ValueGeneratedOnAdd();
162
163 b.Property<ushort?>("ApiValidationPort")
164 .IsRequired();
165
166 b.Property<int>("ApiValidationSecurityLevel");
167
168 b.Property<long>("InstanceId");
169
170 b.Property<string>("ProjectName");
171
172 b.HasKey("Id");
173
174 b.HasIndex("InstanceId")
175 .IsUnique();
176
177 b.ToTable("DreamMakerSettings");
178 });
179
180 modelBuilder.Entity("Tgstation.Server.Host.Models.Instance", b =>
181 {
182 b.Property<long>("Id")
183 .ValueGeneratedOnAdd();
184
185 b.Property<uint?>("AutoUpdateInterval")
186 .IsRequired();
187
188 b.Property<int>("ConfigurationType");
189
190 b.Property<string>("Name")
191 .IsRequired();
192
193 b.Property<bool?>("Online")
194 .IsRequired();
195
196 b.Property<string>("Path")
197 .IsRequired();
198
199 b.HasKey("Id");
200
201 b.HasIndex("Path")
202 .IsUnique();
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?>("PostTestMergeComment")
338 .IsRequired();
339
340 b.Property<bool?>("PushTestMergeCommits")
341 .IsRequired();
342
343 b.Property<bool?>("ShowTestMergeCommitters")
344 .IsRequired();
345
346 b.HasKey("Id");
347
348 b.HasIndex("InstanceId")
349 .IsUnique();
350
351 b.ToTable("RepositorySettings");
352 });
353
354 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
355 {
356 b.Property<long>("Id")
357 .ValueGeneratedOnAdd();
358
359 b.Property<long>("RevisionInformationId");
360
361 b.Property<long>("TestMergeId");
362
363 b.HasKey("Id");
364
365 b.HasIndex("RevisionInformationId");
366
367 b.HasIndex("TestMergeId");
368
369 b.ToTable("RevInfoTestMerges");
370 });
371
372 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
373 {
374 b.Property<long>("Id")
375 .ValueGeneratedOnAdd();
376
377 b.Property<string>("CommitSha")
378 .IsRequired()
379 .HasMaxLength(40);
380
381 b.Property<long>("InstanceId");
382
383 b.Property<string>("OriginCommitSha")
384 .IsRequired()
385 .HasMaxLength(40);
386
387 b.HasKey("Id");
388
389 b.HasIndex("InstanceId", "CommitSha")
390 .IsUnique();
391
392 b.ToTable("RevisionInformations");
393 });
394
395 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
396 {
397 b.Property<long>("Id")
398 .ValueGeneratedOnAdd();
399
400 b.Property<string>("Author")
401 .IsRequired();
402
403 b.Property<string>("BodyAtMerge")
404 .IsRequired();
405
406 b.Property<string>("Comment");
407
408 b.Property<DateTimeOffset>("MergedAt");
409
410 b.Property<long>("MergedById");
411
412 b.Property<int?>("Number")
413 .IsRequired();
414
415 b.Property<long?>("PrimaryRevisionInformationId")
416 .IsRequired();
417
418 b.Property<string>("PullRequestRevision")
419 .IsRequired();
420
421 b.Property<string>("TitleAtMerge")
422 .IsRequired();
423
424 b.Property<string>("Url")
425 .IsRequired();
426
427 b.HasKey("Id");
428
429 b.HasIndex("MergedById");
430
431 b.HasIndex("PrimaryRevisionInformationId")
432 .IsUnique();
433
434 b.ToTable("TestMerges");
435 });
436
437 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
438 {
439 b.Property<long>("Id")
440 .ValueGeneratedOnAdd();
441
442 b.Property<ulong>("AdministrationRights");
443
444 b.Property<string>("CanonicalName")
445 .IsRequired();
446
447 b.Property<DateTimeOffset?>("CreatedAt")
448 .IsRequired();
449
450 b.Property<long?>("CreatedById");
451
452 b.Property<bool?>("Enabled")
453 .IsRequired();
454
455 b.Property<ulong>("InstanceManagerRights");
456
457 b.Property<DateTimeOffset?>("LastPasswordUpdate");
458
459 b.Property<string>("Name")
460 .IsRequired();
461
462 b.Property<string>("PasswordHash");
463
464 b.Property<string>("SystemIdentifier");
465
466 b.HasKey("Id");
467
468 b.HasIndex("CanonicalName")
469 .IsUnique();
470
471 b.HasIndex("CreatedById");
472
473 b.ToTable("Users");
474 });
475
476 modelBuilder.Entity("Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
477 {
478 b.Property<long>("Id")
479 .ValueGeneratedOnAdd();
480
481 b.Property<long?>("AlphaId");
482
483 b.Property<bool>("AlphaIsActive");
484
485 b.Property<long?>("BravoId");
486
487 b.Property<long>("InstanceId");
488
489 b.HasKey("Id");
490
491 b.HasIndex("AlphaId");
492
493 b.HasIndex("BravoId");
494
495 b.HasIndex("InstanceId")
496 .IsUnique();
497
498 b.ToTable("WatchdogReattachInformations");
499 });
500
501 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
502 {
503 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
504 .WithMany("ChatSettings")
505 .HasForeignKey("InstanceId")
506 .OnDelete(DeleteBehavior.Cascade);
507 });
508
509 modelBuilder.Entity("Tgstation.Server.Host.Models.ChatChannel", b =>
510 {
511 b.HasOne("Tgstation.Server.Host.Models.ChatBot", "ChatSettings")
512 .WithMany("Channels")
513 .HasForeignKey("ChatSettingsId")
514 .OnDelete(DeleteBehavior.Cascade);
515 });
516
517 modelBuilder.Entity("Tgstation.Server.Host.Models.CompileJob", b =>
518 {
519 b.HasOne("Tgstation.Server.Host.Models.Job", "Job")
520 .WithOne()
521 .HasForeignKey("Tgstation.Server.Host.Models.CompileJob", "JobId")
522 .OnDelete(DeleteBehavior.Restrict);
523
524 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
525 .WithMany("CompileJobs")
526 .HasForeignKey("RevisionInformationId")
527 .OnDelete(DeleteBehavior.Cascade);
528 });
529
530 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamDaemonSettings", b =>
531 {
532 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
533 .WithOne("DreamDaemonSettings")
534 .HasForeignKey("Tgstation.Server.Host.Models.DreamDaemonSettings", "InstanceId")
535 .OnDelete(DeleteBehavior.Cascade);
536 });
537
538 modelBuilder.Entity("Tgstation.Server.Host.Models.DreamMakerSettings", b =>
539 {
540 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
541 .WithOne("DreamMakerSettings")
542 .HasForeignKey("Tgstation.Server.Host.Models.DreamMakerSettings", "InstanceId")
543 .OnDelete(DeleteBehavior.Cascade);
544 });
545
546 modelBuilder.Entity("Tgstation.Server.Host.Models.InstanceUser", b =>
547 {
548 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
549 .WithMany("InstanceUsers")
550 .HasForeignKey("InstanceId")
551 .OnDelete(DeleteBehavior.Cascade);
552
553 b.HasOne("Tgstation.Server.Host.Models.User")
554 .WithMany("InstanceUsers")
555 .HasForeignKey("UserId")
556 .OnDelete(DeleteBehavior.Cascade);
557 });
558
559 modelBuilder.Entity("Tgstation.Server.Host.Models.Job", b =>
560 {
561 b.HasOne("Tgstation.Server.Host.Models.User", "CancelledBy")
562 .WithMany()
563 .HasForeignKey("CancelledById");
564
565 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
566 .WithMany("Jobs")
567 .HasForeignKey("InstanceId")
568 .OnDelete(DeleteBehavior.Cascade);
569
570 b.HasOne("Tgstation.Server.Host.Models.User", "StartedBy")
571 .WithMany()
572 .HasForeignKey("StartedById")
573 .OnDelete(DeleteBehavior.Cascade);
574 });
575
576 modelBuilder.Entity("Tgstation.Server.Host.Models.ReattachInformation", b =>
577 {
578 b.HasOne("Tgstation.Server.Host.Models.CompileJob", "CompileJob")
579 .WithMany()
580 .HasForeignKey("CompileJobId")
581 .OnDelete(DeleteBehavior.Cascade);
582 });
583
584 modelBuilder.Entity("Tgstation.Server.Host.Models.RepositorySettings", b =>
585 {
586 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
587 .WithOne("RepositorySettings")
588 .HasForeignKey("Tgstation.Server.Host.Models.RepositorySettings", "InstanceId")
589 .OnDelete(DeleteBehavior.Cascade);
590 });
591
592 modelBuilder.Entity("Tgstation.Server.Host.Models.RevInfoTestMerge", b =>
593 {
594 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "RevisionInformation")
595 .WithMany("ActiveTestMerges")
596 .HasForeignKey("RevisionInformationId")
597 .OnDelete(DeleteBehavior.Cascade);
598
599 b.HasOne("Tgstation.Server.Host.Models.TestMerge", "TestMerge")
600 .WithMany("RevisonInformations")
601 .HasForeignKey("TestMergeId")
602 .OnDelete(DeleteBehavior.Cascade);
603 });
604
605 modelBuilder.Entity("Tgstation.Server.Host.Models.RevisionInformation", b =>
606 {
607 b.HasOne("Tgstation.Server.Host.Models.Instance", "Instance")
608 .WithMany("RevisionInformations")
609 .HasForeignKey("InstanceId")
610 .OnDelete(DeleteBehavior.Cascade);
611 });
612
613 modelBuilder.Entity("Tgstation.Server.Host.Models.TestMerge", b =>
614 {
615 b.HasOne("Tgstation.Server.Host.Models.User", "MergedBy")
616 .WithMany("TestMerges")
617 .HasForeignKey("MergedById")
618 .OnDelete(DeleteBehavior.Restrict);
619
620 b.HasOne("Tgstation.Server.Host.Models.RevisionInformation", "PrimaryRevisionInformation")
621 .WithOne("PrimaryTestMerge")
622 .HasForeignKey("Tgstation.Server.Host.Models.TestMerge", "PrimaryRevisionInformationId")
623 .OnDelete(DeleteBehavior.Restrict);
624 });
625
626 modelBuilder.Entity("Tgstation.Server.Host.Models.User", b =>
627 {
628 b.HasOne("Tgstation.Server.Host.Models.User", "CreatedBy")
629 .WithMany("CreatedUsers")
630 .HasForeignKey("CreatedById");
631 });
632
633 modelBuilder.Entity("Tgstation.Server.Host.Models.WatchdogReattachInformation", b =>
634 {
635 b.HasOne("Tgstation.Server.Host.Models.ReattachInformation", "Alpha")
636 .WithMany()
637 .HasForeignKey("AlphaId");
638
639 b.HasOne("Tgstation.Server.Host.Models.ReattachInformation", "Bravo")
640 .WithMany()
641 .HasForeignKey("BravoId");
642
643 b.HasOne("Tgstation.Server.Host.Models.Instance")
644 .WithOne("WatchdogReattachInformation")
645 .HasForeignKey("Tgstation.Server.Host.Models.WatchdogReattachInformation", "InstanceId")
646 .OnDelete(DeleteBehavior.Cascade);
647 });
648#pragma warning restore 612, 618
649 }
650 }
651}