Projekt

Obecné

Profil

« Předchozí | Další » 

Revize bf6db391

Přidáno uživatelem Milan Hotovec před téměř 4 roky(ů)

Added migration for goals
refs #8555
@testFull

Zobrazit rozdíly:

src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Migrations/20210425144917_InitialGoals.Designer.cs
1
// <auto-generated />
2
using System;
3
using Leuze.Core.Infrastructure.Persistence;
4
using Microsoft.EntityFrameworkCore;
5
using Microsoft.EntityFrameworkCore.Infrastructure;
6
using Microsoft.EntityFrameworkCore.Metadata;
7
using Microsoft.EntityFrameworkCore.Migrations;
8
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
9

  
10
namespace Leuze.Core.Infrastructure.Persistence.Migrations
11
{
12
    [DbContext(typeof(LeuzeDbContext))]
13
    [Migration("20210425144917_InitialGoals")]
14
    partial class InitialGoals
15
    {
16
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
        {
18
#pragma warning disable 612, 618
19
            modelBuilder
20
                .HasAnnotation("Relational:MaxIdentifierLength", 128)
21
                .HasAnnotation("ProductVersion", "5.0.4")
22
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23

  
24
            modelBuilder.Entity("ApplicationPermissionApplicationRole", b =>
25
                {
26
                    b.Property<Guid>("PermissionsId")
27
                        .HasColumnType("uniqueidentifier");
28

  
29
                    b.Property<Guid>("RolesId")
30
                        .HasColumnType("uniqueidentifier");
31

  
32
                    b.HasKey("PermissionsId", "RolesId");
33

  
34
                    b.HasIndex("RolesId");
35

  
36
                    b.ToTable("Leuze_Roles_Assigned_Permissions");
37
                });
38

  
39
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationPermission", b =>
40
                {
41
                    b.Property<Guid>("Id")
42
                        .ValueGeneratedOnAdd()
43
                        .HasColumnType("uniqueidentifier");
44

  
45
                    b.Property<string>("Module")
46
                        .IsRequired()
47
                        .HasMaxLength(512)
48
                        .HasColumnType("nvarchar(512)");
49

  
50
                    b.Property<string>("Name")
51
                        .IsRequired()
52
                        .HasMaxLength(512)
53
                        .HasColumnType("nvarchar(512)");
54

  
55
                    b.Property<string>("Privilege")
56
                        .IsRequired()
57
                        .HasMaxLength(2048)
58
                        .HasColumnType("nvarchar(2048)");
59

  
60
                    b.HasKey("Id");
61

  
62
                    b.ToTable("Leuze_Application_Permissions");
63
                });
64

  
65
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRole", b =>
66
                {
67
                    b.Property<Guid>("Id")
68
                        .ValueGeneratedOnAdd()
69
                        .HasColumnType("uniqueidentifier");
70

  
71
                    b.Property<string>("ConcurrencyStamp")
72
                        .IsConcurrencyToken()
73
                        .HasColumnType("nvarchar(max)");
74

  
75
                    b.Property<string>("Name")
76
                        .HasMaxLength(256)
77
                        .HasColumnType("nvarchar(256)");
78

  
79
                    b.Property<string>("NormalizedName")
80
                        .HasMaxLength(256)
81
                        .HasColumnType("nvarchar(256)");
82

  
83
                    b.HasKey("Id");
84

  
85
                    b.HasIndex("NormalizedName")
86
                        .IsUnique()
87
                        .HasDatabaseName("RoleNameIndex")
88
                        .HasFilter("[NormalizedName] IS NOT NULL");
89

  
90
                    b.ToTable("Leuze_Roles");
91
                });
92

  
93
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRoleClaim", b =>
94
                {
95
                    b.Property<int>("Id")
96
                        .ValueGeneratedOnAdd()
97
                        .HasColumnType("int")
98
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
99

  
100
                    b.Property<string>("ClaimType")
101
                        .HasColumnType("nvarchar(max)");
102

  
103
                    b.Property<string>("ClaimValue")
104
                        .HasColumnType("nvarchar(max)");
105

  
106
                    b.Property<Guid>("RoleId")
107
                        .HasColumnType("uniqueidentifier");
108

  
109
                    b.HasKey("Id");
110

  
111
                    b.HasIndex("RoleId");
112

  
113
                    b.ToTable("AspNetRoleClaims");
114
                });
115

  
116
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUser", b =>
117
                {
118
                    b.Property<Guid>("Id")
119
                        .ValueGeneratedOnAdd()
120
                        .HasColumnType("uniqueidentifier");
121

  
122
                    b.Property<int>("AccessFailedCount")
123
                        .HasColumnType("int");
124

  
125
                    b.Property<string>("ConcurrencyStamp")
126
                        .IsConcurrencyToken()
127
                        .HasColumnType("nvarchar(max)");
128

  
129
                    b.Property<string>("Email")
130
                        .HasMaxLength(256)
131
                        .HasColumnType("nvarchar(256)");
132

  
133
                    b.Property<bool>("EmailConfirmed")
134
                        .HasColumnType("bit");
135

  
136
                    b.Property<bool>("IsAdUser")
137
                        .HasColumnType("bit");
138

  
139
                    b.Property<bool>("LockoutEnabled")
140
                        .HasColumnType("bit");
141

  
142
                    b.Property<DateTimeOffset?>("LockoutEnd")
143
                        .HasColumnType("datetimeoffset");
144

  
145
                    b.Property<string>("NormalizedEmail")
146
                        .HasMaxLength(256)
147
                        .HasColumnType("nvarchar(256)");
148

  
149
                    b.Property<string>("NormalizedUserName")
150
                        .HasMaxLength(256)
151
                        .HasColumnType("nvarchar(256)");
152

  
153
                    b.Property<string>("PasswordHash")
154
                        .HasColumnType("nvarchar(max)");
155

  
156
                    b.Property<string>("PhoneNumber")
157
                        .HasColumnType("nvarchar(max)");
158

  
159
                    b.Property<bool>("PhoneNumberConfirmed")
160
                        .HasColumnType("bit");
161

  
162
                    b.Property<string>("SecurityStamp")
163
                        .HasColumnType("nvarchar(max)");
164

  
165
                    b.Property<bool>("TwoFactorEnabled")
166
                        .HasColumnType("bit");
167

  
168
                    b.Property<string>("UserName")
169
                        .HasMaxLength(256)
170
                        .HasColumnType("nvarchar(256)");
171

  
172
                    b.HasKey("Id");
173

  
174
                    b.HasIndex("NormalizedEmail")
175
                        .HasDatabaseName("EmailIndex");
176

  
177
                    b.HasIndex("NormalizedUserName")
178
                        .IsUnique()
179
                        .HasDatabaseName("UserNameIndex")
180
                        .HasFilter("[NormalizedUserName] IS NOT NULL");
181

  
182
                    b.ToTable("Leuze_Users");
183
                });
184

  
185
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserClaim", b =>
186
                {
187
                    b.Property<int>("Id")
188
                        .ValueGeneratedOnAdd()
189
                        .HasColumnType("int")
190
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
191

  
192
                    b.Property<string>("ClaimType")
193
                        .HasColumnType("nvarchar(max)");
194

  
195
                    b.Property<string>("ClaimValue")
196
                        .HasColumnType("nvarchar(max)");
197

  
198
                    b.Property<Guid>("UserId")
199
                        .HasColumnType("uniqueidentifier");
200

  
201
                    b.HasKey("Id");
202

  
203
                    b.HasIndex("UserId");
204

  
205
                    b.ToTable("AspNetUserClaims");
206
                });
207

  
208
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserLogin", b =>
209
                {
210
                    b.Property<string>("LoginProvider")
211
                        .HasColumnType("nvarchar(450)");
212

  
213
                    b.Property<string>("ProviderKey")
214
                        .HasColumnType("nvarchar(450)");
215

  
216
                    b.Property<string>("ProviderDisplayName")
217
                        .HasColumnType("nvarchar(max)");
218

  
219
                    b.Property<Guid>("UserId")
220
                        .HasColumnType("uniqueidentifier");
221

  
222
                    b.HasKey("LoginProvider", "ProviderKey");
223

  
224
                    b.HasIndex("UserId");
225

  
226
                    b.ToTable("AspNetUserLogins");
227
                });
228

  
229
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserRole", b =>
230
                {
231
                    b.Property<Guid>("UserId")
232
                        .HasColumnType("uniqueidentifier");
233

  
234
                    b.Property<Guid>("RoleId")
235
                        .HasColumnType("uniqueidentifier");
236

  
237
                    b.HasKey("UserId", "RoleId");
238

  
239
                    b.HasIndex("RoleId");
240

  
241
                    b.ToTable("AspNetUserRoles");
242
                });
243

  
244
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserToken", b =>
245
                {
246
                    b.Property<Guid>("UserId")
247
                        .HasColumnType("uniqueidentifier");
248

  
249
                    b.Property<string>("LoginProvider")
250
                        .HasColumnType("nvarchar(450)");
251

  
252
                    b.Property<string>("Name")
253
                        .HasColumnType("nvarchar(450)");
254

  
255
                    b.Property<string>("Value")
256
                        .HasColumnType("nvarchar(max)");
257

  
258
                    b.HasKey("UserId", "LoginProvider", "Name");
259

  
260
                    b.ToTable("AspNetUserTokens");
261
                });
262

  
263
            modelBuilder.Entity("Leuze.Core.Domain.Domains.Users.DomainUser", b =>
264
                {
265
                    b.Property<Guid>("UserId")
266
                        .HasColumnType("uniqueidentifier");
267

  
268
                    b.HasKey("UserId");
269

  
270
                    b.ToTable("Leuze_Domain_Users");
271
                });
272

  
273
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Comment", b =>
274
                {
275
                    b.Property<Guid>("Id")
276
                        .ValueGeneratedOnAdd()
277
                        .HasColumnType("uniqueidentifier");
278

  
279
                    b.Property<Guid>("CreatorId")
280
                        .HasColumnType("uniqueidentifier");
281

  
282
                    b.Property<Guid>("GoalId")
283
                        .HasColumnType("uniqueidentifier");
284

  
285
                    b.Property<bool>("IsChanged")
286
                        .HasColumnType("bit");
287

  
288
                    b.Property<bool>("IsPrivate")
289
                        .HasColumnType("bit");
290

  
291
                    b.Property<string>("Text")
292
                        .IsRequired()
293
                        .HasColumnType("nvarchar(max)");
294

  
295
                    b.HasKey("Id");
296

  
297
                    b.HasIndex("CreatorId");
298

  
299
                    b.HasIndex("GoalId");
300

  
301
                    b.ToTable("Leuze_Modules_Goal_Domain_Comments");
302
                });
303

  
304
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", b =>
305
                {
306
                    b.Property<Guid>("Id")
307
                        .ValueGeneratedOnAdd()
308
                        .HasColumnType("uniqueidentifier");
309

  
310
                    b.Property<Guid>("CreatorId")
311
                        .HasColumnType("uniqueidentifier");
312

  
313
                    b.Property<DateTime>("From")
314
                        .HasColumnType("datetime2");
315

  
316
                    b.Property<string>("Name")
317
                        .IsRequired()
318
                        .HasMaxLength(255)
319
                        .HasColumnType("nvarchar(255)");
320

  
321
                    b.Property<Guid>("OwnerId")
322
                        .HasColumnType("uniqueidentifier");
323

  
324
                    b.Property<DateTime>("To")
325
                        .HasColumnType("datetime2");
326

  
327
                    b.Property<decimal?>("Vari")
328
                        .HasColumnType("decimal(18,2)");
329

  
330
                    b.HasKey("Id");
331

  
332
                    b.HasIndex("CreatorId");
333

  
334
                    b.HasIndex("OwnerId");
335

  
336
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalDefinitions");
337
                });
338

  
339
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalItem", b =>
340
                {
341
                    b.Property<Guid>("Id")
342
                        .ValueGeneratedOnAdd()
343
                        .HasColumnType("uniqueidentifier");
344

  
345
                    b.Property<Guid>("CreatorId")
346
                        .HasColumnType("uniqueidentifier");
347

  
348
                    b.Property<string>("Description")
349
                        .IsRequired()
350
                        .HasColumnType("nvarchar(max)");
351

  
352
                    b.Property<Guid>("GoalDefinitionId")
353
                        .HasColumnType("uniqueidentifier");
354

  
355
                    b.Property<string>("Name")
356
                        .IsRequired()
357
                        .HasMaxLength(255)
358
                        .HasColumnType("nvarchar(255)");
359

  
360
                    b.Property<int>("PercentileFinal")
361
                        .HasColumnType("int");
362

  
363
                    b.Property<int>("PercentileUser")
364
                        .HasColumnType("int");
365

  
366
                    b.HasKey("Id");
367

  
368
                    b.HasIndex("CreatorId");
369

  
370
                    b.HasIndex("GoalDefinitionId");
371

  
372
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalItems");
373
                });
374

  
375
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalUpdate", b =>
376
                {
377
                    b.Property<Guid>("Id")
378
                        .ValueGeneratedOnAdd()
379
                        .HasColumnType("uniqueidentifier");
380

  
381
                    b.Property<Guid>("CreatorId")
382
                        .HasColumnType("uniqueidentifier");
383

  
384
                    b.Property<Guid>("GoalId")
385
                        .HasColumnType("uniqueidentifier");
386

  
387
                    b.Property<string>("NewValue")
388
                        .IsRequired()
389
                        .HasColumnType("nvarchar(max)");
390

  
391
                    b.Property<string>("OldValue")
392
                        .IsRequired()
393
                        .HasColumnType("nvarchar(max)");
394

  
395
                    b.Property<int>("UpdatedType")
396
                        .HasColumnType("int");
397

  
398
                    b.HasKey("Id");
399

  
400
                    b.HasIndex("CreatorId");
401

  
402
                    b.HasIndex("GoalId");
403

  
404
                    b.ToTable("Leuze_Modules_Goal_Domain_GoalUpdates");
405
                });
406

  
407
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Review", b =>
408
                {
409
                    b.Property<Guid>("Id")
410
                        .ValueGeneratedOnAdd()
411
                        .HasColumnType("uniqueidentifier");
412

  
413
                    b.Property<string>("CommentCreator")
414
                        .IsRequired()
415
                        .HasColumnType("nvarchar(max)");
416

  
417
                    b.Property<string>("CommentOwner")
418
                        .IsRequired()
419
                        .HasColumnType("nvarchar(max)");
420

  
421
                    b.Property<Guid>("CreatorId")
422
                        .HasColumnType("uniqueidentifier");
423

  
424
                    b.Property<Guid>("GoalId")
425
                        .HasColumnType("uniqueidentifier");
426

  
427
                    b.Property<bool>("IsFinal")
428
                        .HasColumnType("bit");
429

  
430
                    b.HasKey("Id");
431

  
432
                    b.HasIndex("CreatorId");
433

  
434
                    b.HasIndex("GoalId");
435

  
436
                    b.ToTable("Leuze_Modules_Goal_Domain_Reviews");
437
                });
438

  
439
            modelBuilder.Entity("ApplicationPermissionApplicationRole", b =>
440
                {
441
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationPermission", null)
442
                        .WithMany()
443
                        .HasForeignKey("PermissionsId")
444
                        .OnDelete(DeleteBehavior.Cascade)
445
                        .IsRequired();
446

  
447
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationRole", null)
448
                        .WithMany()
449
                        .HasForeignKey("RolesId")
450
                        .OnDelete(DeleteBehavior.Cascade)
451
                        .IsRequired();
452
                });
453

  
454
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRoleClaim", b =>
455
                {
456
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationRole", null)
457
                        .WithMany()
458
                        .HasForeignKey("RoleId")
459
                        .OnDelete(DeleteBehavior.Cascade)
460
                        .IsRequired();
461
                });
462

  
463
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserClaim", b =>
464
                {
465
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", null)
466
                        .WithMany()
467
                        .HasForeignKey("UserId")
468
                        .OnDelete(DeleteBehavior.Cascade)
469
                        .IsRequired();
470
                });
471

  
472
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserLogin", b =>
473
                {
474
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", null)
475
                        .WithMany()
476
                        .HasForeignKey("UserId")
477
                        .OnDelete(DeleteBehavior.Cascade)
478
                        .IsRequired();
479
                });
480

  
481
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserRole", b =>
482
                {
483
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationRole", "Role")
484
                        .WithMany()
485
                        .HasForeignKey("RoleId")
486
                        .OnDelete(DeleteBehavior.Cascade)
487
                        .IsRequired();
488

  
489
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", "User")
490
                        .WithMany()
491
                        .HasForeignKey("UserId")
492
                        .OnDelete(DeleteBehavior.Cascade)
493
                        .IsRequired();
494

  
495
                    b.Navigation("Role");
496

  
497
                    b.Navigation("User");
498
                });
499

  
500
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserToken", b =>
501
                {
502
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", null)
503
                        .WithMany()
504
                        .HasForeignKey("UserId")
505
                        .OnDelete(DeleteBehavior.Cascade)
506
                        .IsRequired();
507
                });
508

  
509
            modelBuilder.Entity("Leuze.Core.Domain.Domains.Users.DomainUser", b =>
510
                {
511
                    b.HasOne("Leuze.Core.Application.Identity.ApplicationUser", "User")
512
                        .WithOne()
513
                        .HasForeignKey("Leuze.Core.Domain.Domains.Users.DomainUser", "UserId")
514
                        .OnDelete(DeleteBehavior.Cascade)
515
                        .IsRequired();
516

  
517
                    b.OwnsOne("Leuze.Core.Domain.Domains.Shared.ValueObjects.EmailAddress", "EmailAddress", b1 =>
518
                        {
519
                            b1.Property<Guid>("DomainUserUserId")
520
                                .HasColumnType("uniqueidentifier");
521

  
522
                            b1.Property<string>("Email")
523
                                .IsRequired()
524
                                .HasMaxLength(512)
525
                                .HasColumnType("nvarchar(512)");
526

  
527
                            b1.HasKey("DomainUserUserId");
528

  
529
                            b1.ToTable("Leuze_Domain_Users");
530

  
531
                            b1.WithOwner()
532
                                .HasForeignKey("DomainUserUserId");
533
                        });
534

  
535
                    b.OwnsOne("Leuze.Core.Domain.Domains.Shared.ValueObjects.PersonFullName", "Name", b1 =>
536
                        {
537
                            b1.Property<Guid>("DomainUserUserId")
538
                                .HasColumnType("uniqueidentifier");
539

  
540
                            b1.Property<string>("FullName")
541
                                .IsRequired()
542
                                .HasMaxLength(256)
543
                                .HasColumnType("nvarchar(256)");
544

  
545
                            b1.HasKey("DomainUserUserId");
546

  
547
                            b1.ToTable("Leuze_Domain_Users");
548

  
549
                            b1.WithOwner()
550
                                .HasForeignKey("DomainUserUserId");
551
                        });
552

  
553
                    b.Navigation("EmailAddress")
554
                        .IsRequired();
555

  
556
                    b.Navigation("Name")
557
                        .IsRequired();
558

  
559
                    b.Navigation("User");
560
                });
561

  
562
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Comment", b =>
563
                {
564
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
565
                        .WithMany()
566
                        .HasForeignKey("CreatorId")
567
                        .OnDelete(DeleteBehavior.Cascade)
568
                        .IsRequired();
569

  
570
                    b.HasOne("Leuze.Modules.Goal.Domain.Domains.GoalItem", "Goal")
571
                        .WithMany("Comments")
572
                        .HasForeignKey("GoalId")
573
                        .OnDelete(DeleteBehavior.Cascade)
574
                        .IsRequired();
575

  
576
                    b.Navigation("Creator");
577

  
578
                    b.Navigation("Goal");
579
                });
580

  
581
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", b =>
582
                {
583
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
584
                        .WithMany()
585
                        .HasForeignKey("CreatorId")
586
                        .OnDelete(DeleteBehavior.Cascade)
587
                        .IsRequired();
588

  
589
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Owner")
590
                        .WithMany()
591
                        .HasForeignKey("OwnerId")
592
                        .OnDelete(DeleteBehavior.Cascade)
593
                        .IsRequired();
594

  
595
                    b.Navigation("Creator");
596

  
597
                    b.Navigation("Owner");
598
                });
599

  
600
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalItem", b =>
601
                {
602
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
603
                        .WithMany()
604
                        .HasForeignKey("CreatorId")
605
                        .OnDelete(DeleteBehavior.Cascade)
606
                        .IsRequired();
607

  
608
                    b.HasOne("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", "GoalDefinition")
609
                        .WithMany("Goals")
610
                        .HasForeignKey("GoalDefinitionId")
611
                        .OnDelete(DeleteBehavior.Cascade)
612
                        .IsRequired();
613

  
614
                    b.Navigation("Creator");
615

  
616
                    b.Navigation("GoalDefinition");
617
                });
618

  
619
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalUpdate", b =>
620
                {
621
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
622
                        .WithMany()
623
                        .HasForeignKey("CreatorId")
624
                        .OnDelete(DeleteBehavior.Cascade)
625
                        .IsRequired();
626

  
627
                    b.HasOne("Leuze.Modules.Goal.Domain.Domains.GoalItem", "Goal")
628
                        .WithMany("Updates")
629
                        .HasForeignKey("GoalId")
630
                        .OnDelete(DeleteBehavior.Cascade)
631
                        .IsRequired();
632

  
633
                    b.Navigation("Creator");
634

  
635
                    b.Navigation("Goal");
636
                });
637

  
638
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Review", b =>
639
                {
640
                    b.HasOne("Leuze.Core.Domain.Domains.Users.DomainUser", "Creator")
641
                        .WithMany()
642
                        .HasForeignKey("CreatorId")
643
                        .OnDelete(DeleteBehavior.Cascade)
644
                        .IsRequired();
645

  
646
                    b.HasOne("Leuze.Modules.Goal.Domain.Domains.GoalItem", "Goal")
647
                        .WithMany("Reviews")
648
                        .HasForeignKey("GoalId")
649
                        .OnDelete(DeleteBehavior.Cascade)
650
                        .IsRequired();
651

  
652
                    b.Navigation("Creator");
653

  
654
                    b.Navigation("Goal");
655
                });
656

  
657
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", b =>
658
                {
659
                    b.Navigation("Goals");
660
                });
661

  
662
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalItem", b =>
663
                {
664
                    b.Navigation("Comments");
665

  
666
                    b.Navigation("Reviews");
667

  
668
                    b.Navigation("Updates");
669
                });
670
#pragma warning restore 612, 618
671
        }
672
    }
673
}
src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Migrations/20210425144917_InitialGoals.cs
1
using System;
2
using Microsoft.EntityFrameworkCore.Migrations;
3

  
4
namespace Leuze.Core.Infrastructure.Persistence.Migrations
5
{
6
    public partial class InitialGoals : Migration
7
    {
8
        protected override void Up(MigrationBuilder migrationBuilder)
9
        {
10
            migrationBuilder.CreateTable(
11
                name: "Leuze_Application_Permissions",
12
                columns: table => new
13
                {
14
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
15
                    Name = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
16
                    Module = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
17
                    Privilege = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: false)
18
                },
19
                constraints: table =>
20
                {
21
                    table.PrimaryKey("PK_Leuze_Application_Permissions", x => x.Id);
22
                });
23

  
24
            migrationBuilder.CreateTable(
25
                name: "Leuze_Roles",
26
                columns: table => new
27
                {
28
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
29
                    Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
30
                    NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
31
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true)
32
                },
33
                constraints: table =>
34
                {
35
                    table.PrimaryKey("PK_Leuze_Roles", x => x.Id);
36
                });
37

  
38
            migrationBuilder.CreateTable(
39
                name: "Leuze_Users",
40
                columns: table => new
41
                {
42
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
43
                    IsAdUser = table.Column<bool>(type: "bit", nullable: false),
44
                    UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
45
                    NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
46
                    Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
47
                    NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
48
                    EmailConfirmed = table.Column<bool>(type: "bit", nullable: false),
49
                    PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true),
50
                    SecurityStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
51
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
52
                    PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
53
                    PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false),
54
                    TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false),
55
                    LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
56
                    LockoutEnabled = table.Column<bool>(type: "bit", nullable: false),
57
                    AccessFailedCount = table.Column<int>(type: "int", nullable: false)
58
                },
59
                constraints: table =>
60
                {
61
                    table.PrimaryKey("PK_Leuze_Users", x => x.Id);
62
                });
63

  
64
            migrationBuilder.CreateTable(
65
                name: "AspNetRoleClaims",
66
                columns: table => new
67
                {
68
                    Id = table.Column<int>(type: "int", nullable: false)
69
                        .Annotation("SqlServer:Identity", "1, 1"),
70
                    RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
71
                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
72
                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
73
                },
74
                constraints: table =>
75
                {
76
                    table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
77
                    table.ForeignKey(
78
                        name: "FK_AspNetRoleClaims_Leuze_Roles_RoleId",
79
                        column: x => x.RoleId,
80
                        principalTable: "Leuze_Roles",
81
                        principalColumn: "Id",
82
                        onDelete: ReferentialAction.Cascade);
83
                });
84

  
85
            migrationBuilder.CreateTable(
86
                name: "Leuze_Roles_Assigned_Permissions",
87
                columns: table => new
88
                {
89
                    PermissionsId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
90
                    RolesId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
91
                },
92
                constraints: table =>
93
                {
94
                    table.PrimaryKey("PK_Leuze_Roles_Assigned_Permissions", x => new { x.PermissionsId, x.RolesId });
95
                    table.ForeignKey(
96
                        name: "FK_Leuze_Roles_Assigned_Permissions_Leuze_Application_Permissions_PermissionsId",
97
                        column: x => x.PermissionsId,
98
                        principalTable: "Leuze_Application_Permissions",
99
                        principalColumn: "Id",
100
                        onDelete: ReferentialAction.Cascade);
101
                    table.ForeignKey(
102
                        name: "FK_Leuze_Roles_Assigned_Permissions_Leuze_Roles_RolesId",
103
                        column: x => x.RolesId,
104
                        principalTable: "Leuze_Roles",
105
                        principalColumn: "Id",
106
                        onDelete: ReferentialAction.Cascade);
107
                });
108

  
109
            migrationBuilder.CreateTable(
110
                name: "AspNetUserClaims",
111
                columns: table => new
112
                {
113
                    Id = table.Column<int>(type: "int", nullable: false)
114
                        .Annotation("SqlServer:Identity", "1, 1"),
115
                    UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
116
                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
117
                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
118
                },
119
                constraints: table =>
120
                {
121
                    table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
122
                    table.ForeignKey(
123
                        name: "FK_AspNetUserClaims_Leuze_Users_UserId",
124
                        column: x => x.UserId,
125
                        principalTable: "Leuze_Users",
126
                        principalColumn: "Id",
127
                        onDelete: ReferentialAction.Cascade);
128
                });
129

  
130
            migrationBuilder.CreateTable(
131
                name: "AspNetUserLogins",
132
                columns: table => new
133
                {
134
                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
135
                    ProviderKey = table.Column<string>(type: "nvarchar(450)", nullable: false),
136
                    ProviderDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
137
                    UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
138
                },
139
                constraints: table =>
140
                {
141
                    table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
142
                    table.ForeignKey(
143
                        name: "FK_AspNetUserLogins_Leuze_Users_UserId",
144
                        column: x => x.UserId,
145
                        principalTable: "Leuze_Users",
146
                        principalColumn: "Id",
147
                        onDelete: ReferentialAction.Cascade);
148
                });
149

  
150
            migrationBuilder.CreateTable(
151
                name: "AspNetUserRoles",
152
                columns: table => new
153
                {
154
                    UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
155
                    RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
156
                },
157
                constraints: table =>
158
                {
159
                    table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
160
                    table.ForeignKey(
161
                        name: "FK_AspNetUserRoles_Leuze_Roles_RoleId",
162
                        column: x => x.RoleId,
163
                        principalTable: "Leuze_Roles",
164
                        principalColumn: "Id",
165
                        onDelete: ReferentialAction.Cascade);
166
                    table.ForeignKey(
167
                        name: "FK_AspNetUserRoles_Leuze_Users_UserId",
168
                        column: x => x.UserId,
169
                        principalTable: "Leuze_Users",
170
                        principalColumn: "Id",
171
                        onDelete: ReferentialAction.Cascade);
172
                });
173

  
174
            migrationBuilder.CreateTable(
175
                name: "AspNetUserTokens",
176
                columns: table => new
177
                {
178
                    UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
179
                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
180
                    Name = table.Column<string>(type: "nvarchar(450)", nullable: false),
181
                    Value = table.Column<string>(type: "nvarchar(max)", nullable: true)
182
                },
183
                constraints: table =>
184
                {
185
                    table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
186
                    table.ForeignKey(
187
                        name: "FK_AspNetUserTokens_Leuze_Users_UserId",
188
                        column: x => x.UserId,
189
                        principalTable: "Leuze_Users",
190
                        principalColumn: "Id",
191
                        onDelete: ReferentialAction.Cascade);
192
                });
193

  
194
            migrationBuilder.CreateTable(
195
                name: "Leuze_Domain_Users",
196
                columns: table => new
197
                {
198
                    UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
199
                    Name_FullName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
200
                    EmailAddress_Email = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false)
201
                },
202
                constraints: table =>
203
                {
204
                    table.PrimaryKey("PK_Leuze_Domain_Users", x => x.UserId);
205
                    table.ForeignKey(
206
                        name: "FK_Leuze_Domain_Users_Leuze_Users_UserId",
207
                        column: x => x.UserId,
208
                        principalTable: "Leuze_Users",
209
                        principalColumn: "Id",
210
                        onDelete: ReferentialAction.Cascade);
211
                });
212

  
213
            migrationBuilder.CreateTable(
214
                name: "Leuze_Modules_Goal_Domain_GoalDefinitions",
215
                columns: table => new
216
                {
217
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
218
                    OwnerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
219
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
220
                    Name = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false),
221
                    From = table.Column<DateTime>(type: "datetime2", nullable: false),
222
                    To = table.Column<DateTime>(type: "datetime2", nullable: false),
223
                    Vari = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
224
                },
225
                constraints: table =>
226
                {
227
                    table.PrimaryKey("PK_Leuze_Modules_Goal_Domain_GoalDefinitions", x => x.Id);
228
                    table.ForeignKey(
229
                        name: "FK_Leuze_Modules_Goal_Domain_GoalDefinitions_Leuze_Domain_Users_CreatorId",
230
                        column: x => x.CreatorId,
231
                        principalTable: "Leuze_Domain_Users",
232
                        principalColumn: "UserId",
233
                        onDelete: ReferentialAction.Cascade);
234
                    table.ForeignKey(
235
                        name: "FK_Leuze_Modules_Goal_Domain_GoalDefinitions_Leuze_Domain_Users_OwnerId",
236
                        column: x => x.OwnerId,
237
                        principalTable: "Leuze_Domain_Users",
238
                        principalColumn: "UserId",
239
                        onDelete: ReferentialAction.Cascade);
240
                });
241

  
242
            migrationBuilder.CreateTable(
243
                name: "Leuze_Modules_Goal_Domain_GoalItems",
244
                columns: table => new
245
                {
246
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
247
                    GoalDefinitionId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
248
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
249
                    Name = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false),
250
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
251
                    PercentileUser = table.Column<int>(type: "int", nullable: false),
252
                    PercentileFinal = table.Column<int>(type: "int", nullable: false)
253
                },
254
                constraints: table =>
255
                {
256
                    table.PrimaryKey("PK_Leuze_Modules_Goal_Domain_GoalItems", x => x.Id);
257
                    table.ForeignKey(
258
                        name: "FK_Leuze_Modules_Goal_Domain_GoalItems_Leuze_Domain_Users_CreatorId",
259
                        column: x => x.CreatorId,
260
                        principalTable: "Leuze_Domain_Users",
261
                        principalColumn: "UserId",
262
                        onDelete: ReferentialAction.Cascade);
263
                    table.ForeignKey(
264
                        name: "FK_Leuze_Modules_Goal_Domain_GoalItems_Leuze_Modules_Goal_Domain_GoalDefinitions_GoalDefinitionId",
265
                        column: x => x.GoalDefinitionId,
266
                        principalTable: "Leuze_Modules_Goal_Domain_GoalDefinitions",
267
                        principalColumn: "Id",
268
                        onDelete: ReferentialAction.Cascade);
269
                });
270

  
271
            migrationBuilder.CreateTable(
272
                name: "Leuze_Modules_Goal_Domain_Comments",
273
                columns: table => new
274
                {
275
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
276
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
277
                    GoalId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
278
                    Text = table.Column<string>(type: "nvarchar(max)", nullable: false),
279
                    IsPrivate = table.Column<bool>(type: "bit", nullable: false),
280
                    IsChanged = table.Column<bool>(type: "bit", nullable: false)
281
                },
282
                constraints: table =>
283
                {
284
                    table.PrimaryKey("PK_Leuze_Modules_Goal_Domain_Comments", x => x.Id);
285
                    table.ForeignKey(
286
                        name: "FK_Leuze_Modules_Goal_Domain_Comments_Leuze_Domain_Users_CreatorId",
287
                        column: x => x.CreatorId,
288
                        principalTable: "Leuze_Domain_Users",
289
                        principalColumn: "UserId",
290
                        onDelete: ReferentialAction.Cascade);
291
                    table.ForeignKey(
292
                        name: "FK_Leuze_Modules_Goal_Domain_Comments_Leuze_Modules_Goal_Domain_GoalItems_GoalId",
293
                        column: x => x.GoalId,
294
                        principalTable: "Leuze_Modules_Goal_Domain_GoalItems",
295
                        principalColumn: "Id",
296
                        onDelete: ReferentialAction.Cascade);
297
                });
298

  
299
            migrationBuilder.CreateTable(
300
                name: "Leuze_Modules_Goal_Domain_GoalUpdates",
301
                columns: table => new
302
                {
303
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
304
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
305
                    GoalId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
306
                    UpdatedType = table.Column<int>(type: "int", nullable: false),
307
                    OldValue = table.Column<string>(type: "nvarchar(max)", nullable: false),
308
                    NewValue = table.Column<string>(type: "nvarchar(max)", nullable: false)
309
                },
310
                constraints: table =>
311
                {
312
                    table.PrimaryKey("PK_Leuze_Modules_Goal_Domain_GoalUpdates", x => x.Id);
313
                    table.ForeignKey(
314
                        name: "FK_Leuze_Modules_Goal_Domain_GoalUpdates_Leuze_Domain_Users_CreatorId",
315
                        column: x => x.CreatorId,
316
                        principalTable: "Leuze_Domain_Users",
317
                        principalColumn: "UserId",
318
                        onDelete: ReferentialAction.Cascade);
319
                    table.ForeignKey(
320
                        name: "FK_Leuze_Modules_Goal_Domain_GoalUpdates_Leuze_Modules_Goal_Domain_GoalItems_GoalId",
321
                        column: x => x.GoalId,
322
                        principalTable: "Leuze_Modules_Goal_Domain_GoalItems",
323
                        principalColumn: "Id",
324
                        onDelete: ReferentialAction.Cascade);
325
                });
326

  
327
            migrationBuilder.CreateTable(
328
                name: "Leuze_Modules_Goal_Domain_Reviews",
329
                columns: table => new
330
                {
331
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
332
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
333
                    GoalId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
334
                    CommentOwner = table.Column<string>(type: "nvarchar(max)", nullable: false),
335
                    CommentCreator = table.Column<string>(type: "nvarchar(max)", nullable: false),
336
                    IsFinal = table.Column<bool>(type: "bit", nullable: false)
337
                },
338
                constraints: table =>
339
                {
340
                    table.PrimaryKey("PK_Leuze_Modules_Goal_Domain_Reviews", x => x.Id);
341
                    table.ForeignKey(
342
                        name: "FK_Leuze_Modules_Goal_Domain_Reviews_Leuze_Domain_Users_CreatorId",
343
                        column: x => x.CreatorId,
344
                        principalTable: "Leuze_Domain_Users",
345
                        principalColumn: "UserId",
346
                        onDelete: ReferentialAction.Cascade);
347
                    table.ForeignKey(
348
                        name: "FK_Leuze_Modules_Goal_Domain_Reviews_Leuze_Modules_Goal_Domain_GoalItems_GoalId",
349
                        column: x => x.GoalId,
350
                        principalTable: "Leuze_Modules_Goal_Domain_GoalItems",
351
                        principalColumn: "Id",
352
                        onDelete: ReferentialAction.Cascade);
353
                });
354

  
355
            migrationBuilder.CreateIndex(
356
                name: "IX_AspNetRoleClaims_RoleId",
357
                table: "AspNetRoleClaims",
358
                column: "RoleId");
359

  
360
            migrationBuilder.CreateIndex(
361
                name: "IX_AspNetUserClaims_UserId",
362
                table: "AspNetUserClaims",
363
                column: "UserId");
364

  
365
            migrationBuilder.CreateIndex(
366
                name: "IX_AspNetUserLogins_UserId",
367
                table: "AspNetUserLogins",
368
                column: "UserId");
369

  
370
            migrationBuilder.CreateIndex(
371
                name: "IX_AspNetUserRoles_RoleId",
372
                table: "AspNetUserRoles",
373
                column: "RoleId");
374

  
375
            migrationBuilder.CreateIndex(
376
                name: "IX_Leuze_Modules_Goal_Domain_Comments_CreatorId",
377
                table: "Leuze_Modules_Goal_Domain_Comments",
378
                column: "CreatorId");
379

  
380
            migrationBuilder.CreateIndex(
381
                name: "IX_Leuze_Modules_Goal_Domain_Comments_GoalId",
382
                table: "Leuze_Modules_Goal_Domain_Comments",
383
                column: "GoalId");
384

  
385
            migrationBuilder.CreateIndex(
386
                name: "IX_Leuze_Modules_Goal_Domain_GoalDefinitions_CreatorId",
387
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
388
                column: "CreatorId");
389

  
390
            migrationBuilder.CreateIndex(
391
                name: "IX_Leuze_Modules_Goal_Domain_GoalDefinitions_OwnerId",
392
                table: "Leuze_Modules_Goal_Domain_GoalDefinitions",
393
                column: "OwnerId");
394

  
395
            migrationBuilder.CreateIndex(
396
                name: "IX_Leuze_Modules_Goal_Domain_GoalItems_CreatorId",
397
                table: "Leuze_Modules_Goal_Domain_GoalItems",
398
                column: "CreatorId");
399

  
400
            migrationBuilder.CreateIndex(
401
                name: "IX_Leuze_Modules_Goal_Domain_GoalItems_GoalDefinitionId",
402
                table: "Leuze_Modules_Goal_Domain_GoalItems",
403
                column: "GoalDefinitionId");
404

  
405
            migrationBuilder.CreateIndex(
406
                name: "IX_Leuze_Modules_Goal_Domain_GoalUpdates_CreatorId",
407
                table: "Leuze_Modules_Goal_Domain_GoalUpdates",
408
                column: "CreatorId");
409

  
410
            migrationBuilder.CreateIndex(
411
                name: "IX_Leuze_Modules_Goal_Domain_GoalUpdates_GoalId",
412
                table: "Leuze_Modules_Goal_Domain_GoalUpdates",
413
                column: "GoalId");
414

  
415
            migrationBuilder.CreateIndex(
416
                name: "IX_Leuze_Modules_Goal_Domain_Reviews_CreatorId",
417
                table: "Leuze_Modules_Goal_Domain_Reviews",
418
                column: "CreatorId");
419

  
420
            migrationBuilder.CreateIndex(
421
                name: "IX_Leuze_Modules_Goal_Domain_Reviews_GoalId",
422
                table: "Leuze_Modules_Goal_Domain_Reviews",
423
                column: "GoalId");
424

  
425
            migrationBuilder.CreateIndex(
426
                name: "RoleNameIndex",
427
                table: "Leuze_Roles",
428
                column: "NormalizedName",
429
                unique: true,
430
                filter: "[NormalizedName] IS NOT NULL");
431

  
432
            migrationBuilder.CreateIndex(
433
                name: "IX_Leuze_Roles_Assigned_Permissions_RolesId",
434
                table: "Leuze_Roles_Assigned_Permissions",
435
                column: "RolesId");
436

  
437
            migrationBuilder.CreateIndex(
438
                name: "EmailIndex",
439
                table: "Leuze_Users",
440
                column: "NormalizedEmail");
441

  
442
            migrationBuilder.CreateIndex(
443
                name: "UserNameIndex",
444
                table: "Leuze_Users",
445
                column: "NormalizedUserName",
446
                unique: true,
447
                filter: "[NormalizedUserName] IS NOT NULL");
448
        }
449

  
450
        protected override void Down(MigrationBuilder migrationBuilder)
451
        {
452
            migrationBuilder.DropTable(
453
                name: "AspNetRoleClaims");
454

  
455
            migrationBuilder.DropTable(
456
                name: "AspNetUserClaims");
457

  
458
            migrationBuilder.DropTable(
459
                name: "AspNetUserLogins");
460

  
461
            migrationBuilder.DropTable(
462
                name: "AspNetUserRoles");
463

  
464
            migrationBuilder.DropTable(
465
                name: "AspNetUserTokens");
466

  
467
            migrationBuilder.DropTable(
468
                name: "Leuze_Modules_Goal_Domain_Comments");
469

  
470
            migrationBuilder.DropTable(
471
                name: "Leuze_Modules_Goal_Domain_GoalUpdates");
472

  
473
            migrationBuilder.DropTable(
474
                name: "Leuze_Modules_Goal_Domain_Reviews");
475

  
476
            migrationBuilder.DropTable(
477
                name: "Leuze_Roles_Assigned_Permissions");
478

  
479
            migrationBuilder.DropTable(
480
                name: "Leuze_Modules_Goal_Domain_GoalItems");
481

  
482
            migrationBuilder.DropTable(
483
                name: "Leuze_Application_Permissions");
484

  
485
            migrationBuilder.DropTable(
486
                name: "Leuze_Roles");
487

  
488
            migrationBuilder.DropTable(
489
                name: "Leuze_Modules_Goal_Domain_GoalDefinitions");
490

  
491
            migrationBuilder.DropTable(
492
                name: "Leuze_Domain_Users");
493

  
494
            migrationBuilder.DropTable(
495
                name: "Leuze_Users");
496
        }
497
    }
498
}
src/Core/Infrastructure/Leuze.Core.Infrastructure.Persistence/Migrations/20210425145836_GoalLocksAdded.Designer.cs
1
// <auto-generated />
2
using System;
3
using Leuze.Core.Infrastructure.Persistence;
4
using Microsoft.EntityFrameworkCore;
5
using Microsoft.EntityFrameworkCore.Infrastructure;
6
using Microsoft.EntityFrameworkCore.Metadata;
7
using Microsoft.EntityFrameworkCore.Migrations;
8
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
9

  
10
namespace Leuze.Core.Infrastructure.Persistence.Migrations
11
{
12
    [DbContext(typeof(LeuzeDbContext))]
13
    [Migration("20210425145836_GoalLocksAdded")]
14
    partial class GoalLocksAdded
15
    {
16
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
        {
18
#pragma warning disable 612, 618
19
            modelBuilder
20
                .HasAnnotation("Relational:MaxIdentifierLength", 128)
21
                .HasAnnotation("ProductVersion", "5.0.4")
22
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23

  
24
            modelBuilder.Entity("ApplicationPermissionApplicationRole", b =>
25
                {
26
                    b.Property<Guid>("PermissionsId")
27
                        .HasColumnType("uniqueidentifier");
28

  
29
                    b.Property<Guid>("RolesId")
30
                        .HasColumnType("uniqueidentifier");
31

  
32
                    b.HasKey("PermissionsId", "RolesId");
33

  
34
                    b.HasIndex("RolesId");
35

  
36
                    b.ToTable("Leuze_Roles_Assigned_Permissions");
37
                });
38

  
39
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationPermission", b =>
40
                {
41
                    b.Property<Guid>("Id")
42
                        .ValueGeneratedOnAdd()
43
                        .HasColumnType("uniqueidentifier");
44

  
45
                    b.Property<string>("Module")
46
                        .IsRequired()
47
                        .HasMaxLength(512)
48
                        .HasColumnType("nvarchar(512)");
49

  
50
                    b.Property<string>("Name")
51
                        .IsRequired()
52
                        .HasMaxLength(512)
53
                        .HasColumnType("nvarchar(512)");
54

  
55
                    b.Property<string>("Privilege")
56
                        .IsRequired()
57
                        .HasMaxLength(2048)
58
                        .HasColumnType("nvarchar(2048)");
59

  
60
                    b.HasKey("Id");
61

  
62
                    b.ToTable("Leuze_Application_Permissions");
63
                });
64

  
65
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRole", b =>
66
                {
67
                    b.Property<Guid>("Id")
68
                        .ValueGeneratedOnAdd()
69
                        .HasColumnType("uniqueidentifier");
70

  
71
                    b.Property<string>("ConcurrencyStamp")
72
                        .IsConcurrencyToken()
73
                        .HasColumnType("nvarchar(max)");
74

  
75
                    b.Property<string>("Name")
76
                        .HasMaxLength(256)
77
                        .HasColumnType("nvarchar(256)");
78

  
79
                    b.Property<string>("NormalizedName")
80
                        .HasMaxLength(256)
81
                        .HasColumnType("nvarchar(256)");
82

  
83
                    b.HasKey("Id");
84

  
85
                    b.HasIndex("NormalizedName")
86
                        .IsUnique()
87
                        .HasDatabaseName("RoleNameIndex")
88
                        .HasFilter("[NormalizedName] IS NOT NULL");
89

  
90
                    b.ToTable("Leuze_Roles");
91
                });
92

  
93
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationRoleClaim", b =>
94
                {
95
                    b.Property<int>("Id")
96
                        .ValueGeneratedOnAdd()
97
                        .HasColumnType("int")
98
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
99

  
100
                    b.Property<string>("ClaimType")
101
                        .HasColumnType("nvarchar(max)");
102

  
103
                    b.Property<string>("ClaimValue")
104
                        .HasColumnType("nvarchar(max)");
105

  
106
                    b.Property<Guid>("RoleId")
107
                        .HasColumnType("uniqueidentifier");
108

  
109
                    b.HasKey("Id");
110

  
111
                    b.HasIndex("RoleId");
112

  
113
                    b.ToTable("AspNetRoleClaims");
114
                });
115

  
116
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUser", b =>
117
                {
118
                    b.Property<Guid>("Id")
119
                        .ValueGeneratedOnAdd()
120
                        .HasColumnType("uniqueidentifier");
121

  
122
                    b.Property<int>("AccessFailedCount")
123
                        .HasColumnType("int");
124

  
125
                    b.Property<string>("ConcurrencyStamp")
126
                        .IsConcurrencyToken()
127
                        .HasColumnType("nvarchar(max)");
128

  
129
                    b.Property<string>("Email")
130
                        .HasMaxLength(256)
131
                        .HasColumnType("nvarchar(256)");
132

  
133
                    b.Property<bool>("EmailConfirmed")
134
                        .HasColumnType("bit");
135

  
136
                    b.Property<bool>("IsAdUser")
137
                        .HasColumnType("bit");
138

  
139
                    b.Property<bool>("LockoutEnabled")
140
                        .HasColumnType("bit");
141

  
142
                    b.Property<DateTimeOffset?>("LockoutEnd")
143
                        .HasColumnType("datetimeoffset");
144

  
145
                    b.Property<string>("NormalizedEmail")
146
                        .HasMaxLength(256)
147
                        .HasColumnType("nvarchar(256)");
148

  
149
                    b.Property<string>("NormalizedUserName")
150
                        .HasMaxLength(256)
151
                        .HasColumnType("nvarchar(256)");
152

  
153
                    b.Property<string>("PasswordHash")
154
                        .HasColumnType("nvarchar(max)");
155

  
156
                    b.Property<string>("PhoneNumber")
157
                        .HasColumnType("nvarchar(max)");
158

  
159
                    b.Property<bool>("PhoneNumberConfirmed")
160
                        .HasColumnType("bit");
161

  
162
                    b.Property<string>("SecurityStamp")
163
                        .HasColumnType("nvarchar(max)");
164

  
165
                    b.Property<bool>("TwoFactorEnabled")
166
                        .HasColumnType("bit");
167

  
168
                    b.Property<string>("UserName")
169
                        .HasMaxLength(256)
170
                        .HasColumnType("nvarchar(256)");
171

  
172
                    b.HasKey("Id");
173

  
174
                    b.HasIndex("NormalizedEmail")
175
                        .HasDatabaseName("EmailIndex");
176

  
177
                    b.HasIndex("NormalizedUserName")
178
                        .IsUnique()
179
                        .HasDatabaseName("UserNameIndex")
180
                        .HasFilter("[NormalizedUserName] IS NOT NULL");
181

  
182
                    b.ToTable("Leuze_Users");
183
                });
184

  
185
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserClaim", b =>
186
                {
187
                    b.Property<int>("Id")
188
                        .ValueGeneratedOnAdd()
189
                        .HasColumnType("int")
190
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
191

  
192
                    b.Property<string>("ClaimType")
193
                        .HasColumnType("nvarchar(max)");
194

  
195
                    b.Property<string>("ClaimValue")
196
                        .HasColumnType("nvarchar(max)");
197

  
198
                    b.Property<Guid>("UserId")
199
                        .HasColumnType("uniqueidentifier");
200

  
201
                    b.HasKey("Id");
202

  
203
                    b.HasIndex("UserId");
204

  
205
                    b.ToTable("AspNetUserClaims");
206
                });
207

  
208
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserLogin", b =>
209
                {
210
                    b.Property<string>("LoginProvider")
211
                        .HasColumnType("nvarchar(450)");
212

  
213
                    b.Property<string>("ProviderKey")
214
                        .HasColumnType("nvarchar(450)");
215

  
216
                    b.Property<string>("ProviderDisplayName")
217
                        .HasColumnType("nvarchar(max)");
218

  
219
                    b.Property<Guid>("UserId")
220
                        .HasColumnType("uniqueidentifier");
221

  
222
                    b.HasKey("LoginProvider", "ProviderKey");
223

  
224
                    b.HasIndex("UserId");
225

  
226
                    b.ToTable("AspNetUserLogins");
227
                });
228

  
229
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserRole", b =>
230
                {
231
                    b.Property<Guid>("UserId")
232
                        .HasColumnType("uniqueidentifier");
233

  
234
                    b.Property<Guid>("RoleId")
235
                        .HasColumnType("uniqueidentifier");
236

  
237
                    b.HasKey("UserId", "RoleId");
238

  
239
                    b.HasIndex("RoleId");
240

  
241
                    b.ToTable("AspNetUserRoles");
242
                });
243

  
244
            modelBuilder.Entity("Leuze.Core.Application.Identity.ApplicationUserToken", b =>
245
                {
246
                    b.Property<Guid>("UserId")
247
                        .HasColumnType("uniqueidentifier");
248

  
249
                    b.Property<string>("LoginProvider")
250
                        .HasColumnType("nvarchar(450)");
251

  
252
                    b.Property<string>("Name")
253
                        .HasColumnType("nvarchar(450)");
254

  
255
                    b.Property<string>("Value")
256
                        .HasColumnType("nvarchar(max)");
257

  
258
                    b.HasKey("UserId", "LoginProvider", "Name");
259

  
260
                    b.ToTable("AspNetUserTokens");
261
                });
262

  
263
            modelBuilder.Entity("Leuze.Core.Domain.Domains.Users.DomainUser", b =>
264
                {
265
                    b.Property<Guid>("UserId")
266
                        .HasColumnType("uniqueidentifier");
267

  
268
                    b.HasKey("UserId");
269

  
270
                    b.ToTable("Leuze_Domain_Users");
271
                });
272

  
273
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.Comment", b =>
274
                {
275
                    b.Property<Guid>("Id")
276
                        .ValueGeneratedOnAdd()
277
                        .HasColumnType("uniqueidentifier");
278

  
279
                    b.Property<Guid>("CreatorId")
280
                        .HasColumnType("uniqueidentifier");
281

  
282
                    b.Property<Guid>("GoalId")
283
                        .HasColumnType("uniqueidentifier");
284

  
285
                    b.Property<bool>("IsChanged")
286
                        .HasColumnType("bit");
287

  
288
                    b.Property<bool>("IsPrivate")
289
                        .HasColumnType("bit");
290

  
291
                    b.Property<string>("Text")
292
                        .IsRequired()
293
                        .HasColumnType("nvarchar(max)");
294

  
295
                    b.HasKey("Id");
296

  
297
                    b.HasIndex("CreatorId");
298

  
299
                    b.HasIndex("GoalId");
300

  
301
                    b.ToTable("Leuze_Modules_Goal_Domain_Comments");
302
                });
303

  
304
            modelBuilder.Entity("Leuze.Modules.Goal.Domain.Domains.GoalDefinition", b =>
... Rozdílový soubor je zkrácen, protože jeho délka přesahuje max. limit.

Také k dispozici: Unified diff