Redeploy Yesod app with Keter without recreating database
I am writing my first app with Yesod, and I've got it to a state where it works, but I want to keep adding little things to it. So far, every time I redeploy with keter by swapping in the new package, the database gets recreated for that app. How can I redeploy without that effect? I am not very familiar with postgres, so a workaround would be great as well.
Edit: I also scaffolded it with SQLite, if that makes a difference. I have been looking all over and still can't figure this out.
In contrast to what the accepted answer says, you can actually do this. In the sqlite.yml configuration, you just set the path to a place that it has access to.
My current setup is, I've made a folder at /opt/keter/database and then my config for production is,
Production: database: /opt/keter/database/HsCMS_production.sqlite3 poolsize: 100 <<: *defaults
which will keep the database persistent across deployments. You should be aware of when you alter the database though, it still needs to do migrations.
The answer that I figured out eventually was that I couldn't make it keep the data if it was scaffolded with Sq-lite.