- ABP Framework version: v5.3.3
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
- Database: MySQL WorkBench 8.0.30"
Hi Support Team,
I've tried to create a dozen of tables using code-first EF Core, there're 2 tables having foreign key to
I created domain classes, declared them in
DbContextModelCreatingExtensions as well as in
DbContext , ran
add-migration command, a migration file was created. After that, I ran
DbMigratorproject, an issue appeared:
Failed to open the referenced table 'appuser': I solved this one by manually modifying the migration file, changed parameter
AbpUsers at the 2 tables having foreign key.
Then I ran the
add-migration command again, another issue appeared:
Referencing column 'UserId' and referenced column 'Id' in foreign key constraint 'FK_my_table_AbpUsers_UserId' are incompatible.: I also solved this one by manually deleting parameter
collation: "ascii_general_ci"at columns
UserIdin the file and ran the command again. All worked well.
But, is there any way to remove the
collation: "ascii_general_ci param and just uses the default type when migration file is generated? I notice this param is automatically added after the framework is updated to v5 (.NET 5 => .NET 6).
I've tried an answer from stackoverflow but didn't work.
Also, I really appreciate if there's any solid solution for the 1st issue.
Hope to hearing from you guys soon.
Hi, is there any update?
I tried to put
DbContextand run migration, the parameter collations for newly created column are all disappeared, which is good, but it also alters current columns collation:
Because current columns use default collation, their collation parameter shouldn't be added, and surely not
Could you guy take a look at this?