Hi
I would like to write an app that makes some use of ActiveRecord for
persisting a few domain objects but also extensive direct database
access for doing things like creating new tables, adding columns /
indexes. Essentially I’m looking to replicate many of the features in a
tool like phpmyadmin for mysql, in a ruby app.
I have two questions:
-
Is this creating and or modifying of tables, fields, indexes etc
something I Should do using Ruby DBI? Can ActiveRecord do any of this
stuff? -
If I do need to use DBI is there anywhere I can borrow features from
ActiveRecord such as getting the database connection from ActiveRecord
but executing custom SQL against them. Or accessing database tables
using ActiveRecord which may be renamed or have fields added or removed
at run time?
My thanks in advance
Adam