Jon Gretar Borgthorsson
2006-Jun-03 11:59 UTC
[Rails] Disable Migration creation in generate Model
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. -- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
John Topley
2006-Jun-03 12:23 UTC
[Rails] Re: Disable Migration creation in generate Model
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 -- Posted via http://www.ruby-forum.com/.
Jon Gretar Borgthorsson
2006-Jun-03 13:08 UTC
[Rails] Re: Disable Migration creation in generate Model
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 Topley <john@johntopley.com> wrote:> 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
Larry Kelly
2006-Jun-03 14:53 UTC
[Rails] Re: Disable Migration creation in generate Model
Thanks, John, I was wondering about that too. -Larry On 6/3/06, Jon Gretar Borgthorsson <jon.borgthorsson@gmail.com> wrote:> > 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 Topley <john@johntopley.com> wrote: > > 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 > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > -------------- > Jon Gretar Borgthorsson > http://www.jongretar.net/ > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060603/40c2ba7f/attachment-0001.html