- ABP Framework version: v9.0.0
- UI Type: Blazor Server
- Database System: EF Core (SQL Server)
- Steps to reproduce the issue:
Hi! We are having an issue with Entity Framework migrations in our solution which consists of an application and multiple custom modules. Each module has its own DbContext
, like in the approach shown here. It's worth pointing out that we are using a separate database for the tenant.
To put it simply, here's the issue we are facing:
- Module A creates Table_A
- Migration correctly adds Table_A
- Module B creates Table_B, which has a relationship to Table_A (one-to-many)
- Migration incorrectly tries to add Table_A again, in addition to Table_B
This obviously results in the error "Table_A already exists" when running the migrator. I'm not sure what we are doing wrong, but we tried a bunch of different things and the migration for Table_B is always wrong (it shouldn't try to recreate Table_A).
Any help is appreciated. Thanks!
10 Answer(s)
-
0
Hi, can you please check this answer and see if it answers your question?
-
0
Hello, Negative, the issue is at the moment of generating migration it includes in the up code a table that was already in previous migration up code. The issue is not at the moment of applying migration as far as I can see.
-
0
Hello, Negative, the issue is at the moment of generating migration it includes in the up code a table that was already in previous migration up code. The issue is not at the moment of applying migration as far as I can see.
Hi, by any chance, can you share your application via email (to support@abp.io with the ticket number), so I can better assist you.
Regards.
-
0
Hi, @EngincanV. As requested, I've sent the application code and added a bit of context to the issue mentioned here.
Let me know if you need anything else, thanks!
-
0
Hi, @EngincanV. As requested, I've sent the application code and added a bit of context to the issue mentioned here.
Let me know if you need anything else, thanks!
Thank you, I got your project. I will examine it and try to write you back asap.
Regards.
-
0
Hi, @EngincanV. As requested, I've sent the application code and added a bit of context to the issue mentioned here.
Let me know if you need anything else, thanks!
Hi again @bmulinari, I'm trying to download the application but it says "page not found" when clicking to the link and providing the password. Can you please check it and let me know about the final status?
Regards.
-
0
Hi! I apologize for the broken link. I've shared a new by mail.
Let me know if you need anything.
-
0
Hi! I apologize for the broken link. I've shared a new by mail.
Let me know if you need anything.
Hi, thanks for updating the link. I will examine your project today and write back to you asap.
Regards.
-
0
Hello, your feedback please.
-
0
Hello. Your feedback please