Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Error a la hora de crear las migraciones
- PM> Add-Migration [M1]
- Microsoft.EntityFrameworkCore.Infrastructure[10403]
- Entity Framework Core 2.2.3-servicing-35854 initialized 'ApplicationDbContext' using provider 'MySql.Data.EntityFrameworkCore' with options: None
- An operation was scaffolded that may result in the loss of data. Please review the migration for accuracy.
- To undo this action, use Remove-Migration.
- PM> Update-Database
- Microsoft.EntityFrameworkCore.Infrastructure[10403]
- Entity Framework Core 2.2.3-servicing-35854 initialized 'ApplicationDbContext' using provider 'MySql.Data.EntityFrameworkCore' with options: None
- Microsoft.EntityFrameworkCore.Database.Command[20101]
- Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- SELECT 1 FROM information_schema.tables
- WHERE table_name = '
- __EFMigrationsHistory' AND table_schema = DATABASE()
- Microsoft.EntityFrameworkCore.Database.Command[20101]
- Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- SELECT 1 FROM information_schema.tables
- WHERE table_name = '
- __EFMigrationsHistory' AND table_schema = DATABASE()
- Microsoft.EntityFrameworkCore.Database.Command[20101]
- Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- SELECT `MigrationId`, `ProductVersion`
- FROM `__EFMigrationsHistory`
- ORDER BY `MigrationId`;
- Microsoft.EntityFrameworkCore.Migrations[20402]
- Applying migration '00000000000000_CreateIdentitySchema'.
- Applying migration '00000000000000_CreateIdentitySchema'.
- Microsoft.EntityFrameworkCore.Database.Command[20101]
- Executed DbCommand (529ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- CREATE TABLE `AspNetRoles` (
- `Id` varchar(767) NOT NULL,
- `Name` varchar(256) NULL,
- `NormalizedName` varchar(256) NULL,
- `ConcurrencyStamp` text NULL,
- PRIMARY KEY (`Id`)
- );
- Microsoft.EntityFrameworkCore.Database.Command[20101]
- Executed DbCommand (530ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- CREATE TABLE `AspNetUsers` (
- `Id` varchar(767) NOT NULL,
- `UserName` varchar(256) NULL,
- `NormalizedUserName` varchar(256) NULL,
- `Email` varchar(256) NULL,
- `NormalizedEmail` varchar(256) NULL,
- `EmailConfirmed` bit NOT NULL,
- `PasswordHash` text NULL,
- `SecurityStamp` text NULL,
- `ConcurrencyStamp` text NULL,
- `PhoneNumber` text NULL,
- `PhoneNumberConfirmed` bit NOT NULL,
- `TwoFactorEnabled` bit NOT NULL,
- `LockoutEnd` timestamp NULL,
- `LockoutEnabled` bit NOT NULL,
- `AccessFailedCount` int NOT NULL,
- PRIMARY KEY (`Id`)
- );
- Microsoft.EntityFrameworkCore.Database.Command[20101]
- Executed DbCommand (526ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- CREATE TABLE `AspNetRoleClaims` (
- `Id` int NOT NULL,
- `RoleId` varchar(767) NOT NULL,
- `ClaimType` text NULL,
- `ClaimValue` text NULL,
- PRIMARY KEY (`Id`),
- CONSTRAINT `FK_AspNetRoleClaims_AspNetRoles_RoleId` FOREIGN KEY (`RoleId`) REFERENCES `AspNetRoles` (`Id`) ON DELETE CASCADE
- );
- Microsoft.EntityFrameworkCore.Database.Command[20101]
- Executed DbCommand (360ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- CREATE TABLE `AspNetUserClaims` (
- `Id` int NOT NULL,
- `UserId` varchar(767) NOT NULL,
- `ClaimType` text NULL,
- `ClaimValue` text NULL,
- PRIMARY KEY (`Id`),
- CONSTRAINT `FK_AspNetUserClaims_AspNetUsers_UserId` FOREIGN KEY (`UserId`) REFERENCES `AspNetUsers` (`Id`) ON DELETE CASCADE
- );
- Microsoft.EntityFrameworkCore.Database.Command[20101]
- Executed DbCommand (717ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- CREATE TABLE `AspNetUserLogins` (
- `LoginProvider` varchar(128) NOT NULL,
- `ProviderKey` varchar(128) NOT NULL,
- `ProviderDisplayName` text NULL,
- `UserId` varchar(767) NOT NULL,
- PRIMARY KEY (`LoginProvider`, `ProviderKey`),
- CONSTRAINT `FK_AspNetUserLogins_AspNetUsers_UserId` FOREIGN KEY (`UserId`) REFERENCES `AspNetUsers` (`Id`) ON DELETE CASCADE
- );
- fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
- Failed executing DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- CREATE TABLE `AspNetUserRoles` (
- `UserId` varchar(767) NOT NULL,
- `RoleId` varchar(767) NOT NULL,
- PRIMARY KEY (`UserId`, `RoleId`),
- CONSTRAINT `FK_AspNetUserRoles_AspNetRoles_RoleId` FOREIGN KEY (`RoleId`) REFERENCES `AspNetRoles` (`Id`) ON DELETE CASCADE,
- CONSTRAINT `FK_AspNetUserRoles_AspNetUsers_UserId` FOREIGN KEY (`UserId`) REFERENCES `AspNetUsers` (`Id`) ON DELETE CASCADE
- );
- MySql.Data.MySqlClient.MySqlException (0x80004005): Specified key was too long; max key length is 3072 bytes
- at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
- at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
- at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
- at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
- at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
- at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
- at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
- Failed executing DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
- CREATE TABLE `AspNetUserRoles` (
- `UserId` varchar(767) NOT NULL,
- `RoleId` varchar(767) NOT NULL,
- PRIMARY KEY (`UserId`, `RoleId`),
- CONSTRAINT `FK_AspNetUserRoles_AspNetRoles_RoleId` FOREIGN KEY (`RoleId`) REFERENCES `AspNetRoles` (`Id`) ON DELETE CASCADE,
- CONSTRAINT `FK_AspNetUserRoles_AspNetUsers_UserId` FOREIGN KEY (`UserId`) REFERENCES `AspNetUsers` (`Id`) ON DELETE CASCADE
- );
- MySql.Data.MySqlClient.MySqlException (0x80004005): Specified key was too long; max key length is 3072 bytes
- at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
- at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
- at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
- at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
- at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
- at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
- at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
- at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
- 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 contextType)
- at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
- at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
- Specified key was too long; max key length is 3072 bytes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement