crater-invoice/crater

I have to reset the database after each deploy

grownhacking opened this issue · 1 comments

Hello, I deployed crater on heroku like a laravel application with a pgsql database

My issue:

  • after each deploy I have to go through the installation process, thus reset the database

The problem:

  • If I make any changes to the code I'll have to reset all of my clients data

My attemps to fix it:

  • try to remove the route /installation -> route "/" redirects to "/installation" with error 404 but I can click on "go back" and login on the main page
  • play with @scripts\admin\stores\installation.js but I understand now it can't work

What I understand now:

  • The installation process creates files and the code checks if those files exist, it has nothing to do about the database already being setup
  • Then, I should try to keep the Storage::disk('local') between each deploy

My attempt:

  • I tried cloning the deployed application and redeploy it but I still have to go through the installation process

It feels strange to have an app that you can't maintain by deploying the new code and use the same database, please enlight me on the proper road.
Regards

When deploying make sure you copy storage/app to the new deployment if crater sees the file called database_created it skips the installation process.

Personally I would prefer to see a database check and flag is if the tables are there and the version number is correct skip installation else install or update