Run migration from with rails project

DabbleDB is an example of an application that allows users to "create
databases on the fly", but they do not execute migrations from within
the application. There are a number of reasons that they don't -- from
security issues to stability issues to performance issues -- and I
would definitely advise against it and suggest that you look for an
alternate solution, as DabbleDB has done.