IdentityServer4.Admin icon indicating copy to clipboard operation
IdentityServer4.Admin copied to clipboard

can not migration

Open MrWangQin opened this issue 4 years ago • 4 comments

I use update-database command to init my database , but there is error occur: DROP PROCEDURE POMELO_BEFORE_DROP_PRIMARY_KEY; MySqlConnector.MySqlException (0x80004005): Storage engine 'MyISAM' does not support system tables. [mysql.db] at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in //src/MySqlConnector/Core/ResultSet.cs:line 50 at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in //src/MySqlConnector/MySqlDataReader.cs:line 119 at MySqlConnector.MySqlDataReader.CreateAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 444 at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in //src/MySqlConnector/Core/CommandExecutor.cs:line 60 at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in //src/MySqlConnector/MySqlCommand.cs:line 271 at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 101 at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable1 migrationCommands, IRelationalConnection connection) at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration) at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String connectionString, String contextType) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String connectionString, String contextType) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_0.<.ctor>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action) Storage engine 'MyISAM' does not support system tables. [mysql.db]

mysql version is 8.0.25 who can help me ?

MrWangQin avatar Dec 07 '21 13:12 MrWangQin

is it because of a problem with my database version?

MrWangQin avatar Dec 07 '21 13:12 MrWangQin

Not sure, I do not have too much experience with MySQL. :(

skoruba avatar Dec 07 '21 16:12 skoruba

Not sure, I do not have too much experience with MySQL. :(

Thk,I found the cause of the problem , because of can't migration , I update the Pomelo.EntityFrameworkCore.MySql package to the latest version , The root cause is unable to migrate,i guess it's the Pomelo.EntityFrameworkCore.MySql bug , like this issue Value longtext CHARACTER SET utf8mb4(4000) NOT NULL i have no idea how to solve it , so I have to delete old migration,the add new migration

MrWangQin avatar Dec 08 '21 14:12 MrWangQin

Ok, I think it will be related to this PR: https://github.com/skoruba/IdentityServer4.Admin/pull/931

skoruba avatar Dec 09 '21 14:12 skoruba