Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run db:schema:load when deploying with COLD=1
This needed when deploying to a server for the first time or when you want to wipe out a database. The issue I'm fixing is this. Things have evolved and in https://github.com/coopdevs/timeoverflow-provisioning we no longer set things up to enable PostgreSQL extensions such as `pg_trgm`. Because Capistrano runs `db:migrate` when deploying very old migrations like `db/migrate/00000000000002_setup_pg_trgm.rb` don't work anymore. I prefer to make this step explicit in the code and with some context rather than having to do this manually in the server and let the dev in charge figure it out every time. Apparently, from capistrano/rails#118 I see this is a known issue for which there's no provided solution. I copied a solution proposed by a capistrano/rails member so should be good. Just run it as follows: ``` $ bundle exec cap staging deploy COLD=1 ```
- Loading branch information