Ends in:
7 DAYS
14 HRS
23 MIN
11 SEC
Ends in:
7 D
14 H
23 M
11 S
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.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06