Eric Smith wrote:
> Rails 2.3.2.  Ruby 1.8.7.  MySQL 5.x
> 
> I have used "rake db:schema:dump" to generate a migration structure to
> go from development to production.  I want to use "rake
> db:schema:load" to load it into my new database.  Sounds like a plan.
> 
> When I run "rake db:schema:load" on the new database (development or
> production), I get the following error:
> 

Your rake task is picking up your development environment from 
config/environment.rb.

Here's what you can do to start off with a clean production schema 
provided you are the only one working on your db and you have 
foolishly/wisely modified your db schema without going through a proper 
migration strategy..

1) perform a rake db:schema:dump
2) remove all prior migration files
3) perform a rake db:migrate
4) open the migration file just created, and cut and paste the contents 
from the schema.rb file that you created in step 1.  (during the paste, 
just copy the relevant parts, avoid the database create part..)
5) Now you can use that migration file on production
6) Ask that girl in finance out on a date like you promised yourself 2 
weeks ago.

hth

ilan

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to