I use the following command from terminal:
mysql -u root -p sample_development < sample.sql
Is there a simple way of me including this command in a rake task? I've found some old answers, Is there a rake task for backing up the data in your database?, which includes around 30 lines of code, but is there an easier way to translate this one liner into a rake task?
Thanks in advance.