From f2f006585d94526f19dadc3fda003821e00a7106 Mon Sep 17 00:00:00 2001 From: Pascal Vibet Date: Tue, 15 Sep 2015 10:54:31 +0200 Subject: [PATCH] Change call method to list mysql tables in optimize task --- lib/tasks/db_raw.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/db_raw.rake b/lib/tasks/db_raw.rake index 457a145ee..9daa16393 100644 --- a/lib/tasks/db_raw.rake +++ b/lib/tasks/db_raw.rake @@ -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