lib/generators/teleport/templates/capistrano/tasks/setup_db.rake in teleporter-2.0.10 vs lib/generators/teleport/templates/capistrano/tasks/setup_db.rake in teleporter-2.0.11

- old
+ new

@@ -19,11 +19,11 @@ database_content = %Q{#{fetch(:rails_env)}: adapter: #{db_adapter} timeout: 5000 encoding: utf8 reconnect: false - database: #{fetch(:application)} + database: #{fetch(:application)}_#{fetch(:stage)} pool: 5 username: #{fetch(:deploy_user)} password: #{fetch(:db_password)} host: port: 5432 @@ -42,10 +42,10 @@ execute :sudo, '/etc/init.d/postgresql restart' sleep 3 rescue Exception end begin - execute %Q{echo "CREATE DATABASE #{fetch(:application)} WITH OWNER #{fetch(:deploy_user)} ENCODING 'UTF8';" | sudo -u postgres psql} + execute %Q{echo "CREATE DATABASE #{fetch(:application)}_#{fetch(:stage)} WITH OWNER #{fetch(:deploy_user)} ENCODING 'UTF8';" | sudo -u postgres psql} rescue Exception end end end end