Bug Creating Indexes Code-First EF5 to PostGreSQL

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
aarondrabeck
Posts: 1
Joined: Fri 09 Nov 2012 17:43

Bug Creating Indexes Code-First EF5 to PostGreSQL

Post by aarondrabeck » Fri 09 Nov 2012 18:07

I am trying to create my database code-first using the Devart PostgreSQL connector.

I get past the insert tables section but the first Index it creates, it errors. Looks like a syntax problem.

I should mention to kick off this entire create db process, I am executing Update-Database -verbose in the package manager console.

Code: Select all

CREATE TABLE "Sales"."Producers" ( 
  "Id" uuid NOT NULL,
  "Person_Id" uuid NULL,
  "ProducerData" varchar(512) NULL,
  PRIMARY KEY ("Id")
)
CREATE INDEX "SystemEventWatcher"."IX_EventEntries_SystemEventId" ON "SystemEventWatcher"."EventEntries" ("SystemEventId")
Devart.Data.PostgreSql.PgSqlException (0x80004005): syntax error at or near "."
   at Devart.Data.PostgreSql.t.e(ag A_0)
   at Devart.Data.PostgreSql.ag.ah()
   at Devart.Data.PostgreSql.PgSqlCommand.InternalPrepare(Boolean implicitPrepare, Int32 startRecord, Int32 maxRecords)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
   at Devart.Common.DbCommandBase.ExecuteNonQuery()
   at System.Data.Entity.Migrations.DbMigrator.ExecuteSql(DbTransaction transaction, MigrationStatement migrationStatement)
   at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ExecuteSql(DbTransaction transaction, MigrationStatement migrationStatement)
   at System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable`1 migrationStatements)
   at System.Data.Entity.Migrations.Infrastructure.MigratorBase.ExecuteStatements(IEnumerable`1 migrationStatements)
   at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, XDocument targetModel, IEnumerable`1 operations, Boolean downgrading, Boolean auto)
   at System.Data.Entity.Migrations.DbMigrator.AutoMigrate(String migrationId, XDocument sourceModel, XDocument targetModel, Boolean downgrading)
   at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.AutoMigrate(String migrationId, XDocument sourceModel, XDocument targetModel, Boolean downgrading)
   at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
   at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
   at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
   at System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update(String targetMigration)
   at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.RunCore()
   at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Bug Creating Indexes Code-First EF5 to PostGreSQL

Post by Shalex » Wed 14 Nov 2012 16:47

Thank you for your report. We have reproduced the problem. We will post here when it is fixed.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Bug Creating Indexes Code-First EF5 to PostGreSQL

Post by Shalex » Fri 30 Nov 2012 16:14

The bug with pointing out the schema name when generating index in Code-First Migrations is fixed. We will post here when the corresponding build of dotConnect for PostgreSQL is available for download.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Bug Creating Indexes Code-First EF5 to PostGreSQL

Post by Shalex » Fri 21 Dec 2012 17:26

New version of dotConnect for PostgreSQL 6.3 is released!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=3&t=25518.

Post Reply