In my Rails application development, I would like to write a script to create a new database and a table in the new database (I am using MySQL), so that I can later run the script like following:
rails runner db/scripts/data_mover.rb
But I do not know how to do it in ruby code or Rails way...Anyone can provide some hint or sample?