Forum: Ruby on Rails Migration or model first

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dark Ambient (Guest)
on 2006-06-13 17:44
(Received via mailing list)
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
91577d00348e23566f04e26438ace241?d=identicon&s=25 Curtis S. (cuspendlove)
on 2006-06-13 17:50
(Received via mailing list)
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
Dark Ambient (Guest)
on 2006-06-13 18:22
(Received via mailing list)
Another way to to confirm things are correct .sounds wise.

Stuart
This topic is locked and can not be replied to.