PM> update-database
Build started...
Build succeeded.
Microsoft.EntityFrameworkCore.Model.Validation[10400]
Sensitive data logging is enabled. Log entries and exception messages may include sensitive application data; this mode should only be enabled during development.
fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
Failed executing DbCommand (134ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE `AspNetRoles` (
`Id` nvarchar(450) NOT NULL,
`Name` nvarchar(256) NULL,
`NormalizedName` nvarchar(256) NULL,
`ConcurrencyStamp` nvarchar(max) NULL,
CONSTRAINT `PK_AspNetRoles` PRIMARY KEY (`Id`)
);
Failed executing DbCommand (134ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE `AspNetRoles` (
`Id` nvarchar(450) NOT NULL,
`Name` nvarchar(256) NULL,
`NormalizedName` nvarchar(256) NULL,
`ConcurrencyStamp` nvarchar(max) NULL,
CONSTRAINT `PK_AspNetRoles` PRIMARY KEY (`Id`)
);
MySqlConnector.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'max) NULL,
CONSTRAINT `PK_AspNetRoles` PRIMARY KEY (`Id`)
)' at line 5
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 135
at MySqlConnector.MySqlDataReader.CreateAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 444
at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList`1 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 266
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, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 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)
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'max) NULL,
CONSTRAINT `PK_AspNetRoles` PRIMARY KEY (`Id`)
)' at line 5.
normal this was for slqserver but I used pomelo for mysql

Saravanan PonnusamyPosted Jun 7, 2021, 5:03 AM
i like to share my experience here...
like 3 years before i worked migrating MSSQL to MYSQL database... no migration tools provided for me ... they told to do manually..
we used ADO.NET ... so first i changed all my MS-SQL querys to MySQL formate usin gthis link reference ... https://www.sqlines.com/sql-server-to-mysql ..
then i downloaded MySQL workbench ... it have a option called "migration wizard" .. that was usefull but too slow migration process ... i took 3 days to migrate just 4 tables.. tables which has above 50k++ rows ..
so i worte one .Net console app ... in that i used two DB connection strings ... selected one table from SQL db and inserted to MySQL db... surprisingly this method is very fast .... i migrated huge table which contains 2 million + rows within a hour ...
i hope this information will help you ....
Salvador CastilloPosted Jun 27, 2021, 1:28 PM
Saravanan PonnusamyPosted Jun 7, 2021, 5:06 AM