Ruby on Rails Tuesday, September 5, 2017

Well, I wasn't going to touch the schema file directly.  I thought about merging some migrations and deleting some that aren't being used.  

If I deleted the database and re-ran the migrations wouldn't it update the schema?  

On Tuesday, September 5, 2017 at 11:09:22 AM UTC-4, Norbert Melzer wrote:
On 09/05/2017 03:31 PM, Joe Guerra wrote:
> Thanks, I do have some junk in my schema that I should clean up by
> removing some older migrations that I'm not using in my current web app.

No, you should clean that unneeded stuff in your current schema by
*creating* migrations which remove the superflous tables/columns.

This way you can incrementaly move from any DB-schema version to any
other in either direction.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cfacfb34-29cb-486d-b630-24b051f3b144%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment