I think it might still say that somewhere in the docs because I remember
being confused when I updated something a little while ago and something
wasn't working, so when I figured out that my migration hadn't been
activated yet, which took a little while to pin down as the problem, I was
able to fix it pretty easily. I'm pretty sure at the time the docs I was
looking at said it would be automatically run. It was a few weeks ago, so I
don't recall exactly where. I'll see if I can find it when I have time.

Carl

On Thu, Aug 13, 2009 at 10:48 AM, Ricardo Chimal, Jr. <[email protected]>wrote:

>
> running migrations before updating the code would still leave you in a
> similar broken state because the database schema has changed but your
> code has not been updated for it.  Depending on how much has changed
> will be the severity of your "brokenness".  Keep in mind that this is
> still a small period of time we're talking about, seconds not minutes.
>
> We used to have it automatically call rake db:migrate but there are
> problems when the migrations themselves were broken.
>
>
> On Aug 13, 5:14 am, Chap <[email protected]> wrote:
> > Good point Richard, if we have to handle it ourselves I think it
> > deserves a little mention in the docs.
> >
> > I assume that most people are use to capistrano which had a "cap
> > deploy:migrations" command that would run the migrations before
> > symlinking the new code. (Although I never personally tested it.)
> >
> > Maybe heroku needs needs a similar command that would run the
> > migrations before updating the code?
> >
> > On Aug 12, 3:22 pm, "Ricardo Chimal, Jr." <[email protected]> wrote:
> >
> > > This is going to be a problem wherever you deploy your application
> > > to.  And what "happens" during that gap is really up to you.
> >
> > > Once the push completes the old version of your codebase is no longer
> > > running.  If the migration changes the database schema radically odds
> > > are you're going to see a lot of broken pages because presumably you
> > > have updated your code for those changes.  If the migration does
> > > something minor, then you probably won't see a lot of breaking.  The
> > > point being that handling this is left to you as the developer to
> > > handle.
> >
> > > One option is to have a maintenance flag in your database or config
> > > var that you can toggle to display a maintenance page.  This is
> > > probably the easiest to do and could be used for a large set of use
> > > cases.
> >
> > > Another option would be to have code that can work around your schema
> > > changes, this is probably the most difficult for most to implement but
> > > it is an option.
> >
> > > --
> > > Ricardo
> >
> > > On Aug 10, 5:40 am, Chap <[email protected]> wrote:
> >
> > > > Between the push to heroku (which will automatically launch the app)
> > > > and heroku rake db:migrate what happens?
> >
> > > > I know it's only a few seconds, but potentially the site would be
> > > > broke right?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to