Advertisement
onzulin

Failure MySQL on ASP.NET Core

Mar 20th, 2019
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. PM> Update-Database
  2. The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.1.8-servicing-32085'. Update the tools for the latest features and bug fixes.
  3. Microsoft.EntityFrameworkCore.Infrastructure[10403]
  4. Entity Framework Core 2.1.8-servicing-32085 initialized 'ApplicationDbContext' using provider 'MySql.Data.EntityFrameworkCore' with options: None
  5. Microsoft.EntityFrameworkCore.Database.Command[20101]
  6. Executed DbCommand (11ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  7. SELECT 1 FROM information_schema.tables
  8. WHERE table_name = '
  9. __EFMigrationsHistory' AND table_schema = DATABASE()
  10. Microsoft.EntityFrameworkCore.Database.Command[20101]
  11. Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  12. SELECT 1 FROM information_schema.tables
  13. WHERE table_name = '
  14. __EFMigrationsHistory' AND table_schema = DATABASE()
  15. Microsoft.EntityFrameworkCore.Database.Command[20101]
  16. Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  17. SELECT `MigrationId`, `ProductVersion`
  18. FROM `__EFMigrationsHistory`
  19. ORDER BY `MigrationId`;
  20. Microsoft.EntityFrameworkCore.Migrations[20402]
  21. Applying migration '00000000000000_CreateIdentitySchema'.
  22. Applying migration '00000000000000_CreateIdentitySchema'.
  23. fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
  24. Failed executing DbCommand (48ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  25. CREATE TABLE `AspNetRoles` (
  26. `Id` varchar(767) NOT NULL,
  27. `Name` varchar(256) NULL,
  28. `NormalizedName` varchar(256) NULL,
  29. `ConcurrencyStamp` text NULL,
  30. PRIMARY KEY (`Id`)
  31. );
  32. MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'aspnetroles' already exists
  33. at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
  34. at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
  35. at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
  36. at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
  37. at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  38. at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
  39. at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
  40. Failed executing DbCommand (48ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  41. CREATE TABLE `AspNetRoles` (
  42. `Id` varchar(767) NOT NULL,
  43. `Name` varchar(256) NULL,
  44. `NormalizedName` varchar(256) NULL,
  45. `ConcurrencyStamp` text NULL,
  46. PRIMARY KEY (`Id`)
  47. );
  48. MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'aspnetroles' already exists
  49. at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
  50. at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
  51. at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
  52. at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
  53. at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  54. at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
  55. at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
  56. at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
  57. at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
  58. at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
  59. at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
  60. at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
  61. at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
  62. at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
  63. Table 'aspnetroles' already exists
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement