refactor(db): migrate career profile aggregate
Transfer the canonical career profile, revision history, and six relational child collections to provider-aware migration ownership. Preserve legacy JSON, ordered child data, indexes, and cascade semantics.
This commit is contained in:
@@ -385,6 +385,8 @@ namespace JobTrackerApi.Data
|
||||
modelBuilder.Entity<CareerProfile>()
|
||||
.HasQueryFilter(x => CurrentUserId != null && x.OwnerUserId == CurrentUserId);
|
||||
|
||||
modelBuilder.Entity<CareerProfile>().Property(x => x.OwnerUserId).HasMaxLength(255);
|
||||
|
||||
modelBuilder.Entity<CareerProfile>()
|
||||
.HasIndex(x => x.OwnerUserId)
|
||||
.IsUnique();
|
||||
@@ -392,6 +394,9 @@ namespace JobTrackerApi.Data
|
||||
modelBuilder.Entity<CareerProfileVersion>()
|
||||
.HasQueryFilter(x => CurrentUserId != null && x.OwnerUserId == CurrentUserId);
|
||||
|
||||
modelBuilder.Entity<CareerProfileVersion>().Property(x => x.OwnerUserId).HasMaxLength(255);
|
||||
modelBuilder.Entity<CareerProfileVersion>().Property(x => x.Source).HasMaxLength(100);
|
||||
|
||||
modelBuilder.Entity<CareerProfileVersion>()
|
||||
.HasIndex(x => new { x.OwnerUserId, x.CareerProfileId, x.Version });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user