Last active
January 25, 2023 12:57
-
-
Save craigmcnamara/7ae748806133941d438d872a4575a865 to your computer and use it in GitHub Desktop.
Database per branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To enable a per branch DBs, go to .env and add `DB_PER_BRANCH=true` | |
<% branch_suffix = ENV["DB_PER_BRANCH"] ? ("--" + `git rev-parse --abbrev-ref HEAD`.chomp)&.gsub(/\./, '')&.split('/')&.last : "" %> | |
development: | |
database: app_development<%= branch_suffix %> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment