Symfony应用>部署内容:未执行迁移任务

时间:2019-07-16 14:10:52

标签: continuous-deployment capistrano3 symfony-3.3

无法执行内容ef deploy:migrate任务。

cap staging deploy:migrate不执行doctrine:schema:update symfony命令。相反,任务执行的响应为空。

lock "~> 3.11.0"

set :application, "some app"
set :repo_url, "...*.git"

set :stages, ["staging", "production"]
set :default_stage, "staging"

set :symfony_console_path, "bin/console"

set :linked_files, ["app/config/parameters.yml", "app/config/parameters_staging.yml"]
set :linked_dirs, ["app/logs", "vendor", "web/vendor", "web/assets", "web/uploads/user_data"]

set :model_manager, "doctrine"

set :format, :pretty
set :log_level, :debug
set :keep_releases, 3

after 'deploy:updated', 'symfony:assets:install'
after 'deploy:updated', 'deploy:migrate'

namespace :deploy do
    task :migrate do
      on roles(:db) do
         invoke 'symfony:console', 'doctrine:schema:update', '--force', '--env=staging'
      end
    end
  end

1 个答案:

答案 0 :(得分:0)

无需放置其他参数'--env=staging'