# Disable Migration creation in generate Model

**URL:** <https://www.ruby-forum.com/t/disable-migration-creation-in-generate-model/62375>\
**Category:** Rails\
**Created:** [June 3, 2006, 2:01pm UTC](https://www.ruby-forum.com/t/disable-migration-creation-in-generate-model/62375 "2006-06-03T14:01:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jongretar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@jongretar](https://www.ruby-forum.com/u/jongretar)\
**Post date:** [June 3, 2006, 2:01pm UTC](https://www.ruby-forum.com/t/disable-migration-creation-in-generate-model/62375/1 "2006-06-03T14:01:18Z")

</div>

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.

–

---

<div class="post-metadata">

**Author:** ![jongretar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@jongretar](https://www.ruby-forum.com/u/jongretar)\
**Post date:** [June 3, 2006, 2:23pm UTC](https://www.ruby-forum.com/t/disable-migration-creation-in-generate-model/62375/2 "2006-06-03T14:23:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jongretar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@jongretar](https://www.ruby-forum.com/u/jongretar)\
**Post date:** [June 3, 2006, 3:11pm UTC](https://www.ruby-forum.com/t/disable-migration-creation-in-generate-model/62375/3 "2006-06-03T15:11:25Z")

</div>

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](mailto:removed_email_address@domain.invalid) wrote:

> \<thing\_to\_generate\>  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–

---

<div class="post-metadata">

**Author:** ![jongretar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@jongretar](https://www.ruby-forum.com/u/jongretar)\
**Post date:** [June 3, 2006, 4:54pm UTC](https://www.ruby-forum.com/t/disable-migration-creation-in-generate-model/62375/4 "2006-06-03T16:54:48Z")

</div>

Thanks, John,

I was wondering about that too.  
-Larry
