postgresql - Error "Requested value 'UpdateDatabaseOperation' was not found" when attempting to generate an idempotent Code First Migration script -


i'm using dotconnect 7.3.115.0 entityframework 6.0.2.

when try generate script migration, error "requested value 'updatedatabaseoperation' not found."

here details , stack trace:

pm> update-database -script -sourcemigration: $initialdatabase -targetmigration: test -verbose 

using startup project 'domain.dataaccess'.
using nuget project 'domain.dataaccess'.
target database is: 'testdatabase' (datasource: localhost, provider: devart.data.postgresql, origin: configuration).
applying explicit migrations: [201403241857577_initialcreate, 201403241941149_test].
applying explicit migration: 201403241857577_initialcreate.
applying explicit migration: 201403241941149_test.

system.argumentexception: requested value 'updatedatabaseoperation' not found.    @ system.enum.enumresult.setfailure(parsefailurekind failure, string failuremessageid, object failuremessageformatargument)    @ system.enum.tryparseenum(type enumtype, string value, boolean ignorecase, enumresult& parseresult)    @ system.enum.parse(type enumtype, string value, boolean ignorecase)    @ devart.common.entity.migrations.a.b(migrationoperation a_0)    @ devart.common.entity.migrations.f.a(migrationoperation a_0)    @ devart.common.entity.migrations.f.a(ienumerable`1 a_0)    @ devart.common.entity.migrations.c.a(ienumerable`1 a_0, string a_1)    @ devart.data.postgresql.entity.migrations.pgsqlentitymigrationsqlgenerator.generate(ienumerable`1 migrationoperations, string providermanifesttoken)    @ system.data.entity.migrations.dbmigrator.generatestatements(ilist`1 operations, string migrationid)    @ system.data.entity.migrations.infrastructure.migratorbase.generatestatements(ilist`1 operations, string migrationid)    @ system.data.entity.migrations.infrastructure.migratorscriptingdecorator.scriptupdate(string sourcemigration, string targetmigration)    @ system.data.entity.migrations.design.toolingfacade.scriptupdaterunner.run()    @ system.appdomain.docallback(crossappdomaindelegate callbackdelegate)    @ system.appdomain.docallback(crossappdomaindelegate callbackdelegate)    @ system.data.entity.migrations.design.toolingfacade.run(baserunner runner)    @ system.data.entity.migrations.design.toolingfacade.scriptupdate(string sourcemigration, string targetmigration, boolean force)    @ system.data.entity.migrations.updatedatabasecommand.<>c__displayclass2.<.ctor>b__0()    @ system.data.entity.migrations.migrationsdomaincommand.execute(action command) requested value 'updatedatabaseoperation' not found. 

update

it seems issue related generating idempotent scripts using -sourcemigration: $initialdatabase

per microsoft:

generating idempotent scripts (ef6 onwards)

starting ef6, if specify –sourcemigration $initialdatabase generated script ‘idempotent’. idempotent scripts can upgrade database @ version latest version (or specified version if use –targetmigration). generated script includes logic check __migrationshistory table , apply changes haven't been applied.

i encounter error when using dotconnect pointed @ postgresql database. works expected when using sqlserver instance.

thank report on this. have reproduced issue.

update

we have investigated issue in more details , not related dotconnect postgresql. issue related ef tool , command being used in it:

update-database -script -sourcemigration $initialdatabase -targetmigration: s -verbose 

it necessary use '-script' parameter or '-verbose' parameter, not both @ same time. please try using, example:

update-database -script 

to detailed information each command please use:

get-help update-database -detailed  

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -