everzet/capifony — Issue #89: Database tasks should be fired only for :db :role
Author: graindeweb
Created: 2012-02-10 16:40:51+00:00
State: open

As for "deploy:migrate", doctrine tasks (drop and create) should be fired only for the :db role.

```
namespace :database do
desc "Create the configured databases."
task :create, *:roles => :db* do
run "cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:database:create --env=#{symfony_env_prod}"
end

desc "Drop the configured databases."
task :drop, :roles => :db do
run "cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:database:drop --env=#{symfony_env_prod} --force"
end
end
```