Ensure task is run on dev env
This commit is contained in:
parent
95a9c61457
commit
676a756e1d
1 changed files with 6 additions and 4 deletions
|
@ -76,12 +76,14 @@ EOF
|
||||||
local_file = "/tmp/#{filename}"
|
local_file = "/tmp/#{filename}"
|
||||||
run_and_stop_if_error "scp deploy@sgmap_backup:/var/backup/production1/db/#{filename} #{local_file}"
|
run_and_stop_if_error "scp deploy@sgmap_backup:/var/backup/production1/db/#{filename} #{local_file}"
|
||||||
|
|
||||||
Rake::Task["db:drop"].invoke
|
dev_env_param = "RAILS_ENV=development"
|
||||||
Rake::Task["db:create"].invoke
|
|
||||||
|
Rake::Task["db:drop"].invoke(dev_env_param)
|
||||||
|
Rake::Task["db:create"].invoke(dev_env_param)
|
||||||
run_and_stop_if_error "psql tps_development -f #{local_file}"
|
run_and_stop_if_error "psql tps_development -f #{local_file}"
|
||||||
|
|
||||||
Rake::Task["db:migrate"].invoke
|
Rake::Task["db:migrate"].invoke(dev_env_param)
|
||||||
Rake::Task["db:environment:set"].invoke("RAILS_ENV=development")
|
Rake::Task["db:environment:set"].invoke(dev_env_param)
|
||||||
Rake::Task["db:test:prepare"].invoke
|
Rake::Task["db:test:prepare"].invoke
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue