Open Closed

Separate database for AuditLog module in Application #2929


User avatar
0
imranStem created

I created the application from the ABP Suite. I have changed the connection string as per below.

"ConnectionStrings": {
    "Default": "Server=SS-DBS01;Database=AbpApp;Trusted_Connection=True;MultipleActiveResultSets=true",
    "AbpAuditLogging": "Server=SS-DBS01;Database=AbpAppLogs;Trusted_Connection=True;MultipleActiveResultSets=true;TrustServerCertificate=True"
  },`

When I add the migration, the ABP audit log tables are added to the default database. I want a separate database for the ABP audit logs. I have read all the documents as well.

  • ABP Framework version: v4.3.2
  • 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:"

1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You need a second DbContext to create the database.

    We have an example, you can check it: https://github.com/abpframework/abp-samples/tree/master/EfCoreMigrationDemo

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