What to Do If You See a Database Error
Because our migrations introduce a new integrity constraint, you may find that it fails
to apply because some existing data violates that constraint.
At this point you have two choices:
• Delete the database on the server and try again. After all, it’s only a toy project!
• Or, learn about data migrations. See
Appendix D.
Wrap-Up: git tag the New Release
The last thing to do is to tag the release in our VCS—it’s important that we’re always
able to keep track of what’s live:
$
git tag -f LIVE
# needs the -f because we are replacing the old tag
$
export TAG=`date +DEPLOYED-%F/%H%M`
$
git tag $TAG
$
git push -f origin LIVE $TAG
Some people don’t like to use
push -f
and update an existing tag, and
will instead some kind of version number to tag their releases. Use
whatever works for you.
And on that note, we can wrap up
Part II, and move on to the more exciting topics that
comprise
Part III .Can’t wait!
238
|
Chapter 14: Deploying Our New Code