Skip to content

Commit fdf3119

Browse files
committed
Update db_raw rake tasks to recognize mysql2 adapter
1 parent 85962f1 commit fdf3119

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/tasks/db_raw.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace :db do
1313
when 'sqlite3'
1414
source = struct.database
1515
sh "sqlite3 #{shellescape source} .dump > #{shellescape target}"
16-
when 'mysql'
16+
when 'mysql', 'mysql2'
1717
sh "mysqldump --add-locks --create-options --disable-keys --extended-insert --quick --set-charset #{mysql_credentials_for struct} > #{shellescape target_tmp}"
1818
mv target_tmp, target
1919
when 'postgresql'
@@ -39,7 +39,7 @@ namespace :db do
3939
target = struct.database
4040
mv target, "#{target}.old" if File.exist?(target)
4141
sh "sqlite3 #{shellescape target} < #{shellescape source}"
42-
when 'mysql'
42+
when 'mysql', 'mysql2'
4343
sh "mysql #{mysql_credentials_for struct} < #{shellescape source}"
4444
when 'postgresql'
4545
sh "psql #{postgresql_credentials_for struct} < #{shellescape source}"

0 commit comments

Comments
 (0)