Bootrapping a database using Capistrano

Hi,

I used “rake db:schema:dump” to generate a file containing:

ActiveRecord::Schema.define(:version => 20) do

create_table “connections”, :force => true do |t|

So it has everything needed to generate my database (I already created
it and it’s waiting on the server, empty). How do I automate this… the
result has to be a ready database without a lot of trouble.

I also hope to automatically generate that meta-table that stores the
version… (is that getting generated from :version => X line there)?

I never tried to do this so I would be really happy about some pointers
in the right direction. Couldn’t really find a lot about this on the
net.

Thank you!
David

On 8/12/07, D. Krmpotic [email protected] wrote:

I used “rake db:schema:dump” to generate a file containing:
So it has everything needed to generate my database (I already created
it and it’s waiting on the server, empty). How do I automate this… the
result has to be a ready database without a lot of trouble.

Read up on Rails migration, and make the current schema dump your 1st
migration. Once you are in production, you will have to use
migrations, anyway.


Alex

ah ok… so that’s the best way… I know about migrations… it makes
sense…

thank you
david

Alexey V. wrote:

On 8/12/07, D. Krmpotic [email protected] wrote:

I used “rake db:schema:dump” to generate a file containing:
So it has everything needed to generate my database (I already created
it and it’s waiting on the server, empty). How do I automate this… the
result has to be a ready database without a lot of trouble.

Read up on Rails migration, and make the current schema dump your 1st
migration. Once you are in production, you will have to use
migrations, anyway.


Alex

And, check out “enhanced_migrations”, which are really nice when you
are working on a project with more than one person, etc.

On 8/12/07, D. Krmpotic [email protected] wrote:

So it has everything needed to generate my database (I already created

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


Chris B.
[email protected]