Page 1 of 1

Two DbContexts with corresponding DataInitializers - "ORA-00955: name is already used by an existing object

Posted: Mon 20 Oct 2014 22:16
by borya09
Hello,

I'm using dotConnect for Oracle, EF6, and CodeFirst approach with two DbContexts, each one with its own DatabaseInitializer.

With the startup of the app, both DatabaseInitializers are fired, but with the second one, I always get an error, and data of this initializer is not inserted in the database, neither the corresponding registry in table '__MigrationHistory':

The error I get is:

Code: Select all

"ORA-00955: name is already used by an existing object"
If I remove recently created table '__MigrationHistory', and I force a request to the app so the second DatabaseInitializer is fired again, the initilization works well.

My question is: Is it posible to use Code Fist approach with more than one DbContext with corresponding DatabaseInitializer?


Thanks,
Borja

Re: Two DbContexts with corresponding DataInitializers - "ORA-00955: name is already used by an existing object

Posted: Tue 21 Oct 2014 12:39
by Shalex
Please connect to a separate database schema with each of your DbContexts.