-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EF Core 1.1 Separate Assembly Migrations Not Considered #9601
Comments
You can manually remove the create table and drop table from the migrations to temporarily fix this. But it would nice if it could be discoverable or hinted to the tools that the table exists by pointing it to other migrations in a separate assembly. |
@HelloKitty I think from reading this that you are looking for the functionality described in issue #2725. If this is not the case, can you explain a bit more what you are asking? |
@ajcvickers That appears to be functionality that would address the issue. Some sort of hinting to the location of migrations to consider or explicit exclusions for table generation would solve it, as described by the issue you linked. I apologize for the duplicate! |
Closing due to duplicate of #2725 |
@HelloKitty no need to apologize! |
Describe what is not working as expected.
Add-Migration appears to not consider generated migrations in a separate project/assembly reference when generating a new migrations for a separate context that references that table through a foreign key. It will create the scaffolding, if that is what is it still called, for the foreign table. This causes Update-Database to fail since the table will already exist.
If you are seeing an exception, include the full exceptions details (message and stack trace).
Exception message: Table 'avatarentries' already exists
Stack trace:
Steps to reproduce
Include a complete code listing (or project/solution) that we can run to reproduce the issue.
Partial code listings, or multiple fragments of code, will slow down our response or cause us to push the issue back to you to provide code to reproduce the issue.
Repro too bulky
Further technical details
EF Core version: (found in project.csproj or packages.config) 1.1
Database Provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Operating system:
IDE: (e.g. Visual Studio 2015)
The text was updated successfully, but these errors were encountered: