merb-devel at rubyforge.org
2006-Dec-03 07:26 UTC
[Merb-devel] How To Create Database Tables With Merb 0.0.7?
Howdy, I just gem unpacked merb and have configured the sample_app to use an sqlite3 database. I see that the Rakefile has a task named "schema", but it points to /dist/schema/schema1.rb", which doesn''t exist. I copied /dist/schema/schema1.rb to /dist/schema/schema.rb then ran "rake schema". What''s the recommended way to create the database tables? Thanks, Ed
merb-devel at rubyforge.org
2006-Dec-03 20:04 UTC
[Merb-devel] How To Create Database Tables With Merb 0.0.7?
On Dec 2, 2006, at 11:26 PM, merb-devel at rubyforge.org wrote:> Howdy, > > I just gem unpacked merb and have configured the sample_app to use an > sqlite3 database. I see that the Rakefile has a task named "schema", > but it points to /dist/schema/schema1.rb", which doesn''t exist. I > copied /dist/schema/schema1.rb to /dist/schema/schema.rb then ran > "rake schema". What''s the recommended way to create the database > tables? > > Thanks, > > Ed >Hey Ed- Once you have your database connection stuff setup then all you have to do is run: $ rake db:migrate There is also a new_migration script in the script dir of the sampel app. To make a new migration you do this: $ script/new_migration add_foo_to_bar That schema task is something else so don''t sweat that one right now. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)
merb-devel at rubyforge.org
2006-Dec-03 21:19 UTC
[Merb-devel] How To Create Database Tables With Merb 0.0.7?
> > On Dec 2, 2006, at 11:26 PM, merb-devel at rubyforge.org wrote: > > > Howdy, > > > > I just gem unpacked merb and have configured the sample_app to use an > > sqlite3 database. I see that the Rakefile has a task named "schema", > > but it points to /dist/schema/schema1.rb", which doesn''t exist. I > > copied /dist/schema/schema1.rb to /dist/schema/schema.rb then ran > > "rake schema". What''s the recommended way to create the database > > tables? > > > > Thanks, > > > > Ed > > > > Hey Ed- > > Once you have your database connection stuff setup then all you have > to do is run: > > $ rake db:migrate > > There is also a new_migration script in the script dir of the sampel > app. To make a new migration you do this: > > $ script/new_migration add_foo_to_bar > > > That schema task is something else so don''t sweat that one right now. > > Cheers- > > -- Ezra Zygmuntowicz > -- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel >Ah that''s so easy. Thanks Ezra! Ed