Skip to content

Commit 3a41c80

Browse files
committed
add task db:execute
1 parent 48f9d29 commit 3a41c80

File tree

1 file changed

+9
-0
lines changed
  • lib/capistrano/tasks

1 file changed

+9
-0
lines changed

lib/capistrano/tasks/db.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
require_relative('../../db/load_helper.rb')
44

55
namespace :db do
6+
desc "execute a mysql command local, remote or container host"
7+
task :execute do
8+
on roles(:db, :container_host) do |host|
9+
ask(:tmp_cmd, "mysql command")
10+
Helper.execute_db_command_autodetect fetch(:tmp_cmd)
11+
end
12+
end
13+
14+
615
desc "export a local, remote or remote container mysql db"
716
task :export do
817
on roles(:db, :container_host) do |host|

0 commit comments

Comments
 (0)