forgeplus/lib/tasks/sync_table_structure.rake

12 lines
290 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......."
2020-04-01 11:07:01 +08:00
system "mysql -uroot -poracle10g -h127.0.0.1 forge_development < #{Rails.root}/db/structure.sql"
2020-03-09 00:40:16 +08:00
puts "init success"
end
end