Open Closed

How can I change the database table prefix? #1259


0
alper created
Support Team

I would like to change the database table prefix for IdentityServer.


3 Answer(s)
  • 0
    alper created
    Support Team

    The table prefix change must be done in BookStoreEfCoreEntityExtensionMappings.cs file. All modules have static variables to be able to change the database table prefix. After changing the table prefix, you need to add a new migration and apply it to the database.

       OneTimeRunner.Run(() =>
        {
            AbpIdentityDbProperties.DbTablePrefix = "QQQ"; //Identity
            AbpIdentityServerDbProperties.DbTablePrefix = "QQQ"; //Identity Server
            AbpAuditLoggingDbProperties.DbTablePrefix = "QQQ"; //Audit Logging
            FileManagementDbProperties.DbTablePrefix = "QQQ"; //File Management
            LanguageManagementDbProperties.DbTablePrefix = "QQQ"; //Language Management
            SaasDbProperties.DbTablePrefix = "QQQ"; //SaaS
            TextTemplateManagementDbProperties.DbTablePrefix = "QQQ"; //Text Template
            PaymentDbProperties.DbTablePrefix = "QQQ"; //Payment
        });
    

    See the location where you need to write this code

    In the corresponding module document, you can see the static variable of the table prefix. Identity Module: File Management Module:


    Add new migration to create the migration script

  • 0
    vijay.nallala created

    Can you please adivse the were should be set the guid to Int for Entity Key. we are using oracle. we need to have all use the Id as Integer, Can you please help me on this.

  • 0
    alper created
    Support Team

    Can you please adivse the were should be set the guid to Int for Entity Key. we are using oracle. we need to have all use the Id as Integer, Can you please help me on this.

    could you please create a new ticket for the new question.