On 5 May 2011 17:42, jcwoods <[email protected]> wrote: > Right, but my point was doing db:setup (or db:schema:load) and db:seed > is dependent on whether the database exists or not at the time the > package is installed. This goes back to my original post -- how do I > detect if the database is there if db:create succeeds either way? > > If I didn't have seed data, this would be a moot point since I could > do db:create + db:migrate every time. Or am I missing something?
You could write the seed code (db/seeds.rb) so that it works out for itself, based on whether the db is empty or not, or whether some particular data is present, whether to do the seeding. Then you can just run it. Colin -- 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.

