From DB to migrations

If I have an ancient app which uses a (MySQL) database because the db
structure was NOT created by migrations -- is there a way I can go
from the DB stricture to the migration files so that I could recreate
the DB on a different machine with a different type of DB ? Thanks,

rake db:schema:dump
rake db:schema:load

I assume you know this because you asked just for the "structure", but
the rake commands that Rick points you at will get you what you asked
for, but not things like FK constraints, other constraints,
transactions, etc. It will give you the schema though.



Moreover if you use specific Mysql type such as ENUM or SET.
It may not be take in account during the dump. But you will find some
plugins or gems that fix some problems : : for the ENUM type : for the views


Thanks guys,

This was precisely what I was looking for. -RVince.