Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database did not sync after migration #5

Open
syifa123456 opened this issue Jan 6, 2023 · 1 comment
Open

Database did not sync after migration #5

syifa123456 opened this issue Jan 6, 2023 · 1 comment

Comments

@syifa123456
Copy link

This is what happen after i enter this command
dotnet ef migrations add CreateScheme
2023-01-06 (1)
and there's only 1 table that was created after i enter this command
dotnet ef database update
2023-01-06 (2)

@muhamaddarulhadi
Copy link
Contributor

muhamaddarulhadi commented Jan 11, 2023

Does you change the IdentityUser class as ApplicationUser exactly as this

or

Does you have other Migrations folder? If you have multiple Migrations folder, delete all Migrations folder and create as the tutorial

Other Solution

  1. Remove the Migrations folder

  2. Drop database by using this command

    dotnet ef database drop  --force
  3. Create the migrations scheme

    dotnet ef migrations add CreateScheme
  4. Update database

    dotnet ef database update

Reference

  1. Part 4, Razor Pages with EF Core migrations in ASP.NET Core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants