Advertisement
onzulin

failure in postgresql with asp.net core 2.1

Mar 20th, 2019
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.92 KB | None | 0 0
  1. failure in postgresql with asp.net core 2.1 in this project
  2. Fallo en PostgreSQL con ASP.NET Core 2.1 en el proyecto
  3.  
  4. PM> Update-Database
  5. 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.
  6. Microsoft.EntityFrameworkCore.Infrastructure[10403]
  7. Entity Framework Core 2.1.8-servicing-32085 initialized 'ApplicationDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL' with options: None
  8. Microsoft.EntityFrameworkCore.Database.Command[20101]
  9. Executed DbCommand (52ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  10. SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace WHERE c.relname='__EFMigrationsHistory');
  11. Microsoft.EntityFrameworkCore.Database.Command[20101]
  12. Executed DbCommand (20ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  13. SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace WHERE c.relname='__EFMigrationsHistory');
  14. Microsoft.EntityFrameworkCore.Database.Command[20101]
  15. Executed DbCommand (135ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  16. SELECT "MigrationId", "ProductVersion"
  17. FROM "__EFMigrationsHistory"
  18. ORDER BY "MigrationId";
  19. Microsoft.EntityFrameworkCore.Migrations[20402]
  20. Applying migration '00000000000000_CreateIdentitySchema'.
  21. Applying migration '00000000000000_CreateIdentitySchema'.
  22. Microsoft.EntityFrameworkCore.Database.Command[20101]
  23. Executed DbCommand (918ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  24. CREATE TABLE "AspNetRoles" (
  25. "Id" text NOT NULL,
  26. "Name" varchar(256) NULL,
  27. "NormalizedName" varchar(256) NULL,
  28. "ConcurrencyStamp" text NULL,
  29. CONSTRAINT "PK_AspNetRoles" PRIMARY KEY ("Id")
  30. );
  31. Microsoft.EntityFrameworkCore.Database.Command[20101]
  32. Executed DbCommand (269ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  33. CREATE TABLE "AspNetUsers" (
  34. "Id" text NOT NULL,
  35. "UserName" varchar(256) NULL,
  36. "NormalizedUserName" varchar(256) NULL,
  37. "Email" varchar(256) NULL,
  38. "NormalizedEmail" varchar(256) NULL,
  39. "EmailConfirmed" boolean NOT NULL,
  40. "PasswordHash" text NULL,
  41. "SecurityStamp" text NULL,
  42. "ConcurrencyStamp" text NULL,
  43. "PhoneNumber" text NULL,
  44. "PhoneNumberConfirmed" boolean NOT NULL,
  45. "TwoFactorEnabled" boolean NOT NULL,
  46. "LockoutEnd" timestamp with time zone NULL,
  47. "LockoutEnabled" boolean NOT NULL,
  48. "AccessFailedCount" integer NOT NULL,
  49. CONSTRAINT "PK_AspNetUsers" PRIMARY KEY ("Id")
  50. );
  51. Microsoft.EntityFrameworkCore.Database.Command[20101]
  52. Executed DbCommand (262ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  53. CREATE TABLE "AspNetRoleClaims" (
  54. "Id" integer NOT NULL,
  55. "RoleId" text NOT NULL,
  56. "ClaimType" text NULL,
  57. "ClaimValue" text NULL,
  58. CONSTRAINT "PK_AspNetRoleClaims" PRIMARY KEY ("Id"),
  59. CONSTRAINT "FK_AspNetRoleClaims_AspNetRoles_RoleId" FOREIGN KEY ("RoleId") REFERENCES "AspNetRoles" ("Id") ON DELETE CASCADE
  60. );
  61. Microsoft.EntityFrameworkCore.Database.Command[20101]
  62. Executed DbCommand (105ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  63. CREATE TABLE "AspNetUserClaims" (
  64. "Id" integer NOT NULL,
  65. "UserId" text NOT NULL,
  66. "ClaimType" text NULL,
  67. "ClaimValue" text NULL,
  68. CONSTRAINT "PK_AspNetUserClaims" PRIMARY KEY ("Id"),
  69. CONSTRAINT "FK_AspNetUserClaims_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id") ON DELETE CASCADE
  70. );
  71. Microsoft.EntityFrameworkCore.Database.Command[20101]
  72. Executed DbCommand (121ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  73. CREATE TABLE "AspNetUserLogins" (
  74. "LoginProvider" varchar(128) NOT NULL,
  75. "ProviderKey" varchar(128) NOT NULL,
  76. "ProviderDisplayName" text NULL,
  77. "UserId" text NOT NULL,
  78. CONSTRAINT "PK_AspNetUserLogins" PRIMARY KEY ("LoginProvider", "ProviderKey"),
  79. CONSTRAINT "FK_AspNetUserLogins_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id") ON DELETE CASCADE
  80. );
  81. Microsoft.EntityFrameworkCore.Database.Command[20101]
  82. Executed DbCommand (229ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  83. CREATE TABLE "AspNetUserRoles" (
  84. "UserId" text NOT NULL,
  85. "RoleId" text NOT NULL,
  86. CONSTRAINT "PK_AspNetUserRoles" PRIMARY KEY ("UserId", "RoleId"),
  87. CONSTRAINT "FK_AspNetUserRoles_AspNetRoles_RoleId" FOREIGN KEY ("RoleId") REFERENCES "AspNetRoles" ("Id") ON DELETE CASCADE,
  88. CONSTRAINT "FK_AspNetUserRoles_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id") ON DELETE CASCADE
  89. );
  90. Microsoft.EntityFrameworkCore.Database.Command[20101]
  91. Executed DbCommand (83ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  92. CREATE TABLE "AspNetUserTokens" (
  93. "UserId" text NOT NULL,
  94. "LoginProvider" varchar(128) NOT NULL,
  95. "Name" varchar(128) NOT NULL,
  96. "Value" text NULL,
  97. CONSTRAINT "PK_AspNetUserTokens" PRIMARY KEY ("UserId", "LoginProvider", "Name"),
  98. CONSTRAINT "FK_AspNetUserTokens_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id") ON DELETE CASCADE
  99. );
  100. Microsoft.EntityFrameworkCore.Database.Command[20101]
  101. Executed DbCommand (107ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  102. CREATE INDEX "IX_AspNetRoleClaims_RoleId" ON "AspNetRoleClaims" ("RoleId");
  103. fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
  104. Failed executing DbCommand (147ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  105. CREATE UNIQUE INDEX "RoleNameIndex" ON "AspNetRoles" ("NormalizedName") WHERE [NormalizedName] IS NOT NULL;
  106. Npgsql.PostgresException (0x80004005): 42601: error de sintaxis en o cerca de «[»
  107. at Npgsql.NpgsqlConnector.<>c__DisplayClass161_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
  108. --- End of stack trace from previous location where exception was thrown ---
  109. at Npgsql.NpgsqlConnector.<>c__DisplayClass161_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext() in C:\projects\npgsql\src\Npgsql\NpgsqlConnector.cs:line 1032
  110. --- End of stack trace from previous location where exception was thrown ---
  111. at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming) in C:\projects\npgsql\src\Npgsql\NpgsqlDataReader.cs:line 444
  112. at Npgsql.NpgsqlDataReader.NextResult() in C:\projects\npgsql\src\Npgsql\NpgsqlDataReader.cs:line 332
  113. at Npgsql.NpgsqlCommand.ExecuteDbDataReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) in C:\projects\npgsql\src\Npgsql\NpgsqlCommand.cs:line 1221
  114. at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken) in C:\projects\npgsql\src\Npgsql\NpgsqlCommand.cs:line 1044
  115. at Npgsql.NpgsqlCommand.ExecuteNonQuery() in C:\projects\npgsql\src\Npgsql\NpgsqlCommand.cs:line 1027
  116. at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
  117. Failed executing DbCommand (147ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
  118. CREATE UNIQUE INDEX "RoleNameIndex" ON "AspNetRoles" ("NormalizedName") WHERE [NormalizedName] IS NOT NULL;
  119. Npgsql.PostgresException (0x80004005): 42601: error de sintaxis en o cerca de «[»
  120. at Npgsql.NpgsqlConnector.<>c__DisplayClass161_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
  121. --- End of stack trace from previous location where exception was thrown ---
  122. at Npgsql.NpgsqlConnector.<>c__DisplayClass161_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext() in C:\projects\npgsql\src\Npgsql\NpgsqlConnector.cs:line 1032
  123. --- End of stack trace from previous location where exception was thrown ---
  124. at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming) in C:\projects\npgsql\src\Npgsql\NpgsqlDataReader.cs:line 444
  125. at Npgsql.NpgsqlDataReader.NextResult() in C:\projects\npgsql\src\Npgsql\NpgsqlDataReader.cs:line 332
  126. at Npgsql.NpgsqlCommand.ExecuteDbDataReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken) in C:\projects\npgsql\src\Npgsql\NpgsqlCommand.cs:line 1221
  127. at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken) in C:\projects\npgsql\src\Npgsql\NpgsqlCommand.cs:line 1044
  128. at Npgsql.NpgsqlCommand.ExecuteNonQuery() in C:\projects\npgsql\src\Npgsql\NpgsqlCommand.cs:line 1027
  129. at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
  130. at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
  131. at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
  132. at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
  133. at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
  134. at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
  135. at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
  136. at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
  137. 42601: error de sintaxis en o cerca de «[»
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement