Sha256: 5ead6b5069900c789a7e9407e6dcb6488dea5bb1bb4adf36b5eaa04f4df99c24
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
namespace :artisan do namespace :db do desc "Perform database migrations" task :migrate do on roles(:db) do within release_path do if fetch(:run_migrations) execute :php, :artisan, "migrate" end end end end desc "Refresh database schema" # this will delete all the things task :refresh do on roles(:db) do within release_path do execute :php, :artisan, "migrate:refresh" end end end desc 'Seed the database / Seed an individual class' task :seed, :class do |t, args| seed_class = args[:class] on roles(:db) do within current_path do if seed_class execute :php, :artisan, "db:seed --class=#{seed_class}" else execute :php, :artisan, "db:seed" end end end end end namespace :app do desc "Make the storage dir more accessible" task :storage do on roles(:app) do within release_path do execute :sudo, :chmod, "-R 777 app/storage" end end end end after 'deploy:updated', 'artisan:db:migrate' after 'deploy:updated', 'artisan:app:storage' end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cap-laravel-0.0.8 | lib/cap/tasks/artisan.rake |