Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Change call method to list mysql tables in optimize task
Browse files Browse the repository at this point in the history
  • Loading branch information
swoopla authored and ZeroPointEnergy committed Sep 11, 2018
1 parent 838062e commit f2f0065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/db_raw.rake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace :db do
case adapter
when 'mysql', 'mysql2'
puts "Optimizing tables, this may take a while:"
for table in ActiveRecord::Base.connection.select_values('SHOW TABLES').sort
for table in ActiveRecord::Base.connection.tables.sort
puts "* #{table}"
ActiveRecord::Base.connection.execute("OPTIMIZE TABLE #{table}")
end
Expand Down

0 comments on commit f2f0065

Please sign in to comment.