Forum: Ruby on Rails Disable Migration creation in generate Model

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.
Jón B. (Guest)
on 2006-06-03 16:01
(Received via mailing list)
Hi....

Is there some way to configure Rails to not create a
db/migrate/###_model_name.rb when I do a script/generate model
ModelName?

It's a little annoying when I'm setting up a new application since I
prefer creating all the first tables in a 001_inital_schema.rb file.
Then when I generate models for those tables I get migration scripts
for all of them again that I have to delete. And it's a bit annoying
especially since I use the --svn flag so the unneeded migration go
also into the subversion repo. I'm hoping that there is some way to
disable this without editing the generate script itself.

Personally I feel this shouldn't to this by default since the
script/generate migration command is much more to the point.

--
John T. (Guest)
on 2006-06-03 16:23
Jón Borgþórsson wrote:
> Hi....
>
> Is there some way to configure Rails to not create a
> db/migrate/###_model_name.rb when I do a script/generate model
> ModelName?

I believe that script/generate model ModelName --skip-migration will do
what you want. Incidentally, you can find out the available options by
doing script/generate, or more specifically script/generate
<thing_to_generate>

It will output a help screen.

John
Jón B. (Guest)
on 2006-06-03 17:11
(Received via mailing list)
Damn... I had actually checked that out before and simply didn't
notice it. Even though I was looking for it. :)


On 6/3/06, John T. <removed_email_address@domain.invalid> wrote:
> <thing_to_generate>
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Larry K. (Guest)
on 2006-06-03 18:54
(Received via mailing list)
Thanks, John,

I was wondering about that too.
-Larry
This topic is locked and can not be replied to.