Sha256: 1d498734b81f52fe1ec7db62b66524181f34b166c67fe658d95358a358b35d38
Contents?: true
Size: 1.29 KB
Versions: 2
Compression:
Stored size: 1.29 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" task :seed do on roles(:db) do within release_path do execute :php, "artisan db:seed" end end end desc "Seed a specific class" task :seed_class do ask(:seed_class, "seeder") on roles(:db) do |h| within release_path do execute :php, "artisan db:seed --class=#{fetch(:seed_class)}" 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cap-laravel-0.0.6 | lib/cap/tasks/artisan.rake |
cap-laravel-0.0.5 | lib/cap/tasks/artisan.rake |