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,
RVince.

rake db:schema:dump
and
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.

Andrew

Hello,

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 :
http://enum-column.rubyforge.org/ : for the ENUM type
http://activewarehouse.rubyforge.org/rails_sql_views/ : for the views
...

Mickael

Thanks guys,

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