Giter Site home page Giter Site logo

Comments (5)

l2999019 avatar l2999019 commented on August 30, 2024

I think I found the reason.
My Oracle data has two different accounts, but in the same space it looks like this。
image
So when one of the libraries has a table named “_EFMigrationsHistory”, Codefirst will not create a new “_EFMigrationsHistory“, causing this error. Do you know any solution?

from dotnet-db-samples.

alexkeh avatar alexkeh commented on August 30, 2024

These are two different issues. In your first post, you are executing a SELECT against a table that does not yet exist. The solution is to scaffold the migration, then apply the model to the DB, which will then create __EFMigrationsHistory table. You can do this by following the steps in this README.

https://github.com/oracle/dotnet-db-samples/tree/master/samples/dotnet-core/ef-core

I need more information to understand what produces your second error. What is the relationship between ORACLETESTDB and MYTEST? If they are two distinct schemas, what common access does the user have in common for these schemas?

from dotnet-db-samples.

l2999019 avatar l2999019 commented on August 30, 2024

These two users are in the same database instance, but they are different users.
I execute the following SQL statement in Mytest, and I can find "_EFMigration History" in ORACLETESTDB.
Is that the reason?
image

Because I deleted the “_EFMigrationsHistory“ table of ORACLETESTDB, Codefirst on MYTEST side can be successfully executed.
The relationship between ORACLETESTDB and MYTEST is shown below, in the same database instance.
image
image

from dotnet-db-samples.

alexkeh avatar alexkeh commented on August 30, 2024

In most situations, each Oracle user has its own separate schema.

I suspect what has happened is that you had created an EF Core schema already created for ORACLETESTDB. Then, you tried to create a new EF Core schema again before deleting the previously created tables, such as _EFMigration History.

Of course, the solution is what you found, which is deleting the previously created schema objects if you plan to start a new EF Core schema.

from dotnet-db-samples.

l2999019 avatar l2999019 commented on August 30, 2024

Thank you very much for your answer

from dotnet-db-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.