首页 新闻 会员 周边 捐助

EntityFramework 数据迁移重新出现 AlterTableOperation 错误提示.

0
悬赏园豆:20 [已解决问题] 解决于 2018-07-31 15:06

执行update-database 都出现以下异常,重新删除数据库可以正常运行

Applying explicit migrations: [201603281038542_DeleteColumn]. Applying explicit migration: 201603281038542_DeleteColumn. System.NotImplementedException: AlterTableOperation at MySql.Data.Entity.MySqlMigrationSqlGenerator.Generate(IEnumerable`1 migrationOperations, String providerManifestToken) at System.Data.Entity.Migrations.DbMigrator.GenerateStatements(IList`1 operations, String migrationId) at System.Data.Entity.Migrations.Infrastructure.MigratorBase.GenerateStatements(IList`1 operations, String migrationId) at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, VersionedModel targetModel, IEnumerable`1 operations, IEnumerable`1 systemOperations, Boolean downgrading, Boolean auto) at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ApplyMigration(DbMigration migration, DbMigration lastMigration) at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId) at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration) at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClassc.b__b() at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) at System.Data.Entity.Migrations.Infrastructure.MigratorBase.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) at System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update(String targetMigration) at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.Run() at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner) at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force) at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.b__0() at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command) AlterTableOperation

OneWork的主页 OneWork | 初学一级 | 园豆:5
提问于:2016-03-28 18:50
< >
分享
最佳答案
0

这个版本的ef在mysql中数据库迁移操作不支持表变更,别用就是了.

我后来都把数据库换城sqlserver的了.

收获园豆:20
吴瑞祥 | 高人七级 |园豆:29449 | 2016-03-29 14:25
其他回答(1)
0

 

提示你方法未实现,赶紧去你的代码里找找。

Launcher | 园豆:45050 (高人七级) | 2016-03-29 09:44
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册