Open Closed

Replace mongo db to postgres #365


User avatar
0
Anushri created

Hi,

I am using abp io core with latest version. also included modules folder for account, identity, identityserver and users.I am using free account so not using any premium account. Currently I am using mongo db and done with my all functionalities but my client wants to switch on postgres so could you please let me know how can I switch mongo db to postgres.

Thanks,

  • ABP Framework version: 3.0.5
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): identity server sepeated

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

    Hi,

    Please see the docuemnt :https://docs.abp.io/en/abp/latest/Entity-Framework-Core-PostgreSQL

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Replacing to postgres means you need to change mongodb to EF Core.

    You need to change the mongodb-related packages and module packages in the project to EF Core. You also need to add migration for EF Core. I suggest you create a project template that uses EF Core and refer to its code.

    Please read the documentation of data access.

    https://docs.abp.io/en/abp/latest/Data-Access

  • User Avatar
    0
    Anushri created

    Hi maliming and liangshiwei

    I have tried your solution but no luck. I have created new project with postgres and then added modules folder to access account, indentity, identityserver and user. I am getting exception like IUserTwoFactor while generating passwordresettoken.

    I have not modified any code here just register one user and then pass email and app name from swagger and then I am getting above error. Please suggest me for the same.

    Also, please send me the reference link to replace mongo db to postgres without creating a new solution with EF.

    Thanks,

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi @Anushri

    I am getting exception like IUserTwoFactor while generating passwordresettoken.

    What version does the new solution is used? Is it 3.0.5?

    The new ef project is created for your reference. There is currently no document on how to migrate mongodb to ef core postgres.

    You can try the steps I mentioned earlier. https://support.abp.io/QA/Questions/365#answer-c4cf4340-3ad2-7aaf-ae8f-39f71d1dcf3d

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15