Migrating ScholarX Database to PostgreSQL (for pilot program)

Previously we used ClearDB to keep the MYSQL database of ScholarX. But ClearDB has a query limit per hour which causes a 500 internal server error when the limit is reached. So we agreed to migrate the database to the PostgreSQL database given by Heroku.

I already tested the application using a PostgreSQL database and it’s working. I have some questions regarding this and also need to clarify few things first.

  1. Since we need this only for the pilot program, we have to keep the MySQL configuration too. So do we need to set up the backend to work with both databases(Postgres as the optional one)?
  2. We’ll have to change the queries which are manually written in the spring-boot repositories when migrating to Postgres. So maybe it’ll be hard to use 2 database services.
  3. Seems like the Heroku PostgreSQL service changes the host and database details frequently. I need to check it again.

My Suggestion:

  1. Creating a new branch of ScholarX backend for the deployment(from master branch)
  2. Adding the PostgreSQL configuration
  3. Update the Heroku configuration to deploy the new branch
    So we won’t have the problems which I mentioned above

Any other ideas? @anjisvj @Gravewalker @YohanAvishke @EngTeam

4 Likes

What if we create a DB in our EC2 instance? @piumal1999

But we have that cpu credit issue.

I’ll create a new branch to work with postgresql.

How long will it take to find a solution for this? Can we make it by Saturday?

Now the MVP is connected to the PostgreSQL database.
https://sef-scholarx.herokuapp.com/

2 Likes

Wow wonderful job :heart_eyes: @piumal1999. Thank you soo much for your quick update.

1 Like