EF Core – Table ‘*.__EFMigrationsHistory’ doesn’t exist

Turning Mark G’s comment into an answer.

Once the __EFMigrationsHistory table has been created, the rest of the update should run.

CREATE TABLE `__EFMigrationsHistory` ( `MigrationId` nvarchar(150) NOT NULL, `ProductVersion` nvarchar(32) NOT NULL, PRIMARY KEY (`MigrationId`) );

Alternatively, generate the script of your migration(s) and apply to the database manually using this command in Package Manager Console:

Script-Migration

If you need to generate All scripts, you can use this command:

Script-Migration -from 0

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)