forgeplus/lib/tasks/sync_table_structure.rake

12 lines
287 B
Ruby
Raw Normal View History

2020-03-09 00:40:16 +08:00
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