Open Closed

Use separate databases and migrator project to seed databases from application startup #2255


User avatar
0
firecape created
  • ABP Framework version: v5.0.0RC
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: " Executing host database seed... [16:55:37 ERR] An error occurred using the connection to database 'MyPermissionDb' on server"
  • Steps to reproduce the issue:"

I just want to use the application startup template, but use three separate databases for "Default," "AbpIdentityServer," and "AbpPermissionManagement." In the "Configure the Connection Strings" section of https://docs.abp.io/en/abp/5.0/Connection-Strings, I added these to my config. However, when I run the DbMigrator project, all of the tables are created in one database, and I get the above error. Can you list all the steps I need just so I can change a fresh, out of the box, application startup template to use three separate databases...one for the default, then identity, and then one for permissions. Thank you so much,

Tim

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi @firecape,

    Have you checked Database Migrations for the Entity Framework Core section of the document?

    Once you want to separate a module's database, you typically will need to create a second migration path

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    firecape created

    Awesome, thank you. I wasn't thinking that would be in the migrations section of the documentation, but looks like that's exactly what I need. Thanks,

    Tim

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.