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


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

  • 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

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38