I sort of asked this the other day but with no replies. I''m new to rails btw. Question: Is there a preferred way to create migrations ? What I''ve noticed is if I create a model first , it sets up the skelton of the migration. If I create a migration file and then do the model it attempt to create a migration file and not overide the one already in place. It seems to make sense to me to create the model first, letting Rails do it''s thing , yet in most of the tutorials I''ve worked through so far it creates the migration first. TIA Stuart -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060613/c4eab85f/attachment.html
On 6/13/06, Dark Ambient <sambient@gmail.com> wrote:> Question: Is there a preferred way to create migrations ?I''m not sure that there is One True Way to migrations. Personally, I usually have a decent idea of what I want in the database. So I will typically generate a migration, rake the migration to ensure it''s correct, then generate the model. I''m probably still a little "old school" too when it comes to generating application code since I often run a generate scaffold command and flesh out the scaffold. I like having my database table in existance for the initial scaffold generation. :: shrug :: -Curtis
Another way to to confirm things are correct .sounds wise. Stuart On 6/13/06, Curtis <cuspendlove@gmail.com> wrote:> > On 6/13/06, Dark Ambient <sambient@gmail.com> wrote: > > Question: Is there a preferred way to create migrations ? > > I''m probably still a little "old > school" too when it comes to generating application code since I often > run a generate scaffold command and flesh out the scaffold. > > I like having my database table in existance for the initial scaffold > generation. :: shrug :: > > > -Curtis > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060613/b5997a62/attachment.html