hi, is there a way to create the database (say development and or production) specified in database.yml with rake? thanks, Enrico -- "The only thing necessary for the triumph of evil is for good men to do nothing" Edmund Burke
A production database usually is much more than just the create statement. For testing and development I use sqlite, where no db creation is necessary, when you first start to use it it gets created automatically. On 5/4/06, Enrico Teotti <agenteo@gmail.com> wrote:> > hi, > is there a way to create the database (say development and or > production) specified in database.yml with rake? > thanks, > Enrico > > -- > "The only thing necessary for the triumph of evil > is for good men to do nothing" > Edmund Burke > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Roberto Saccon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060504/e9aa1167/attachment.html
Have you looked at the rake migrate utilities. ~A Enrico Teotti wrote:> hi, > is there a way to create the database (say development and or > production) specified in database.yml with rake? > thanks, > Enrico > > -- > "The only thing necessary for the triumph of evil > is for good men to do nothing" > Edmund Burke > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Isn''t migrations assuming the DB is already there? I''m aware of the migrating functionality on tables and data, there''s an execute method able to execute the query you pass but still... isn''t it assuming the DB is alredy in place? I know it''s just a matter of typing few words, I was just wondering about a rake way to do it. thanks -- "The only thing necessary for the triumph of evil is for good men to do nothing" Edmund Burke
you can initially import your schema with: rake db_schema_import but i''m not sure about the actual creation of DB. -tak. On May 4, 2006, at 11:57 AM, Enrico Teotti wrote:> Isn''t migrations assuming the DB is already there? > I''m aware of the migrating functionality on tables and data, there''s > an execute method able to execute the query you pass but still... > isn''t it assuming the DB is alredy in place? > I know it''s just a matter of typing few words, I was just wondering > about a rake way to do it. > thanks > > > -- > "The only thing necessary for the triumph of evil > is for good men to do nothing" > Edmund Burke > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Takashi Okamoto a ?crit :> you can initially import your schema with: > > rake db_schema_import > > but i''m not sure about the actual creation of DB. > > -tak. >IMHO, db_schema_import task does work only for SQLite. For MySQL I always have to create "manually" the empty schemas needed (dev, test, prod). What about other DBMS ? I don''t know, a try costs nothing ... Didier