Check out example codes for "how to push database to heroku". It will help you in understanding the concepts better.

Code Example 1

heroku run rails db:migrate

Code Example 2

heroku pg:credentials:url

Learn ReactJs, React Native from akashmittal.com