Request: Better migration exception messages
Posted by: Neil Scales
Date: October 16, 2024 09:57AM

I've just swapped my project from Pomelo to MySql.EntityFrameworkCore 8.0.5, and created a brand new migration.

When running the migration I get this exception:

MySql.Data.MySqlClient.MySqlException : BLOB, TEXT, GEOMETRY or JSON column 'name' can't have a default value
MySqlStream.ReadPacketAsync(Boolean execAsync)
NativeDriver.GetResultAsync(Int32 affectedRow, Int64 insertedId, Boolean execAsync)
Driver.GetResultAsync(Int32 statementId, Int32 affectedRows, Int64 insertedId, Boolean execAsync)
Driver.NextResultAsync(Int32 statementId, Boolean force, Boolean execAsync)
MySqlDataReader.NextResultAsync(Boolean execAsync, CancellationToken cancellationToken)
MySqlDataReader.NextResultAsync(Boolean execAsync, CancellationToken cancellationToken)
MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean execAsync, CancellationToken cancellationToken)
MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean execAsync, CancellationToken cancellationToken)
MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean execAsync, CancellationToken cancellationToken)
MySqlCommand.ExecuteNonQueryAsync(Boolean execAsync, CancellationToken cancellationToken)
MySqlCommand.ExecuteNonQuery()
RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject)
MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
Migrator.Migrate(String targetMigration)
RelationalDatabaseFacadeExtensions.Migrate(DatabaseFacade databaseFacade)

I have 300 tables, so which table with a column "name" has failed?

Also, all these tables previously had default values, so why doesn't the net8 driver allow it?

Options: ReplyQuote


Subject
Written By
Posted
Request: Better migration exception messages
October 16, 2024 09:57AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.