Strange behaver in migration #673
T-Alkathiri
started this conversation in
General
Replies: 1 comment 4 replies
-
It's not you... these are some of the latest changes that have been done in the code, and apparently the initial migrations haven't been re-created yet to accommodate those changes. I just created this issue (#674) to make this automatic and part of the build process (hopefully). |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I am trying to add my own table to the project with the following steps :
1- I created a class named Item as shown
public class Item : AuditableEntity, IAggregateRoot
{
public int ItemId { get; set; }
public string? ItemCode { get; set; }
public string? ItemName { get; set; }
}
2- I added the dbset to the ApplicationDbContext
public DbSet Items => Set();
3- I added the following steps to the Catalog.cs
public class ItemConfig : IEntityTypeConfiguration
{
public void Configure(EntityTypeBuilder builder)
{
builder.IsMultiTenant();
4- I added migration to the ApplicationDbContext
Add-Migration ItemAdded -context ApplicationDbContext
And every things goes good and smoothly, But in the generated migration I found some thing strange when created :
protected override void Up(MigrationBuilder migrationBuilder)
{
**migrationBuilder.DropColumn(
name: "Description",
schema: "Identity",
table: "RoleClaims");
it drops the Description,Group,LastModifiedBy and LastModifiedOn columns from the RoleClaims table and then create my Items table.
Knowing that I did not touch the Identities tables, and I have clone the updated FSH.WebApi as date of 17/05/2022
Is this normal or did I messed something, Please can some one help in this issue.
Thanks a lot for all community members.
Beta Was this translation helpful? Give feedback.
All reactions