Sure:
cd /path/to/myapp
rake db:schema:dump
cp db/schema.rb /path/to/otherapp/db/ cd /path/to/otherapp rake db:schema:load
jeremy
Sure:
cd /path/to/myapp
rake db:schema:dump
cp db/schema.rb /path/to/otherapp/db/ cd /path/to/otherapp rake db:schema:load
jeremy
Yes - it’s fixed in MySQL 5.1 maybe?
Kidding. If you’re moving between two MySQLs, set the schema dump format to :sql in config/environment.rb. That’ll give you a ‘native’ schema dump.
jeremy
I know you asked for a “rails” way to do it… but gee… mysqldump is so easy.
Too true! Good point, Brian.
jeremy
http://digg.com/software/Ruby_on_Rails_Database_Backups_and_Exports_Tutorial
Explains backups for mysql, postgresql and sqlite on both linux and windows.
I can’t tell whether you’re into Rails or driving google ad revenue.
jeremy