EF6 migration for C# statements generates incorrect SQL

EF6 migration for C# statements generates incorrect SQL

Postby cubigo » Thu 04 May 2017 12:07

Migration statement:
RenameIndex(table: "ef_maintenance.Requests", name: "IX_RequestTypeId", newName: "IX_TypeId");

Generated SQL statement:
ALTER INDEX ef_maintenance."IX_Requests_RequestTypeId" RENAME TO ef_maintenance."IX_Requests_TypeId"

Should be:
ALTER INDEX ef_maintenance."IX_Requests_RequestTypeId" RENAME TO "IX_Requests_TypeId"

dotConnect for PostgreSQL Professional version: 7.8.862
PostgreSQL server version: 9.4.7

ALTER INDEX documentation: https://www.postgresql.org/docs/9.6/static/sql-alterindex.html (9.4 is identical for this purpose)

"ALTER INDEX [ IF EXISTS ] name RENAME TO new_name"

name
The name (possibly schema-qualified) of an existing index to alter.

new_name
The new name for the index.

new name may not be schema-qualified.
cubigo
 
Posts: 1
Joined: Thu 04 May 2017 12:05

Re: EF6 migration for C# statements generates incorrect SQL

Postby Shalex » Tue 09 May 2017 18:21

Thank you for your report. We have reproduced the issue and will notify you when it is fixed.
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44

Re: EF6 migration for C# statements generates incorrect SQL

Postby Shalex » Fri 26 May 2017 15:10

The bug with renaming index via EF Code-First Migrations is fixed in the new version: http://forums.devart.com/viewtopic.php?f=3&t=35438.
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL