forgeplus/lib/tasks/sync_table_structure.rake

12 lines
287 B
Ruby

desc "Initialize the data table structure"
namespace :sync_table_structure do
task import_csv: :environment do
puts "init table structure......."
system "mysql -uroot -p123456 -h127.0.0.1 forge_development < #{Rails.root}/db/structure.sql"
puts "init success"
end
end