In a Rails 3.2.3 application, I need to allow an administrator to create a database and populate it with tables from schema.rb.
Simple code execution in schema.rb is ideal. Basically, I'm looking for a way to do:
rake db:setup
without using rake.
I have a few things that I would also like to do, such as backing up the database, and I wonder if there is a Rails DSL that I can work with, or just need to write SQL and run it through ActiveRecord :: Base .connection.execute.
Thanks for any help you can offer.
source
share