1

I am using Code First, and I want to migrate it to ORACLE database, after multiple migrations process, I am getting this error,

The best overloaded method match for Oracle.ManagedDataAccess.EntityFramework.OracleMigrationSqlGenerator.Generate(System.Data.Entity.Migrations.Model.CreateTableOperation) has some invalid arguments

CodeNotFound
  • 22,153
  • 10
  • 68
  • 69
  • 2
    Im facing the same problem when a migration involves a RenameIndex operation, seems like the Generate overload for RenameIndexOperation is not implemented in OracleMigrationSqlGenerator – oskr Jan 05 '18 at 18:04
  • @oskr Remove migration history not right solution. Because when database on production and need to apply some migration at time what we need to ? Because if we delete MigrationHistory so we again need to setup entire db. I am looking some good solution. Please let me know if any good solution to prevent this error when apply migration on existing Oracle DB. – Vipul Odhavani Mar 26 '21 at 06:30

2 Answers2

1

I'm facing the same problem finally I solve it by opening the database and delete the migration_history table manually and run the command again. see at EF5 Code First - Changing A Column Type With Migrations

mrduab
  • 11
  • 1
  • 3
0

in each migration you will save a record in __MigrationHistory, so in case there is no sync between the code and the migration do the following:

  1. delete the migration history table in the database.
  2. migrate it again by create new migration 'in package manager console' add-migration data.

  3. update the migration to database update-database

CodeNotFound
  • 22,153
  • 10
  • 68
  • 69