Open Closed

Table Prefix Flexibility Gone? #2385


User avatar
0
Spospisil created
  • ABP Framework version: v5.0.1
  • UI type:MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): MVC/Tiered

Has the ability to remove the table prefix from all the tables been removed with version 5.0.x? For example, previously with ABP 4.4.4 I could override the prefix with the command

        builder.ConfigurePermissionManagement(options => { options.TablePrefix = string.Empty; });

but with 5.0.x it appears as if module specific 'ModelBuilderConfigurationOptions' have been removed and I can no longer pass into the method the prefix I desire.

Please advise.


4 Answer(s)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    AbpPermissionManagementDbProperties.DbTablePrefix = "NewPrefix"

    Can you try this code?

  • User Avatar
    0
    Spospisil created

    AbpPermissionManagementDbProperties.DbTablePrefix = "NewPrefix"

    Can you try this code?

    I already have and it doesn't work as expected.

  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    In the MyProjectName.EntityFrameworkCore project, it worked for me when I put it at the beginning of the OnModelCreating method in the MyProjectNameDbContext.

    You can see the generated migration code from the image below when I create a new migration for new table prefix.

  • User Avatar
    0
    Spospisil created

    Hi,

    My issue was I had previously generated migrations that had the prefix in there before I added the logic to remove the prefixes. I had not deleted the migrations and it was just reapplying them.

    Thanks for the help.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on July 11, 2025, 11:35