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