Deploy to Heroku - initial DB table creation?

I am trying a deployment to Heroku for the first time and following the steps in the developer manual. Perhaps I missed a step, but I cannot find how the system tables and initial data are loaded in the cloud data store?

I see the create SQL scripts for my entity tables and I can execute those by hand if needed, but what about the system tables?

Asking another way: when you first deploy to a new platform with an empty DB, how do you create all of the tables and the essential data so the application can run?

I am using latest version of Studio and Platform and MySQL for DB.

Thanks for any and all help!


1 Like

could you please share the application logs?
Also could you please clarify which kind of deployment do you use (WAR or GitHub)?

Thank you for following up on my question.

I am using the GitHub deployment and the git & build steps seemed to work OK.

Now that I saved the logs and view them in a different format, I can see some errors about creating the chagelog table. I will try to interpret these some more myself and I am hoping you can shed some light on their meaning also.

I will try to attach the logs from opening the app.ajjf-test-logs-1526438810366.txt (38.7 KB)

After reviewing the log I focused on this line:

Caused by: java.sql.SQLException: No database selected

I noticed my heroku-context.xml file did not have the DB name at the end of the URL. Once that was added and re-deployed, it started working. All tables (system and application) are now magically in the database.

Thank you for prompting me to find the answer. If I had not saved and downloaded the heroku logs and viewed them in Notepad++ I would not have seen the clues.

1 Like