Skip to content

Instantly share code, notes, and snippets.

@mihow
Created November 8, 2018 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mihow/261aa4f0d85a3867eb44e0c81dc3d849 to your computer and use it in GitHub Desktop.
Save mihow/261aa4f0d85a3867eb44e0c81dc3d849 to your computer and use it in GitHub Desktop.
Create temporary migrations when deploying dev from CircleCi
# Dev only:
# Create migrations for any model changes that don't have migrations committed yet.
# Makes the migrations locally and push them up since we can't write files outside /tmp in Lambda
if [[ "${CIRCLE_BRANCH}" == "dev" ]]
then
python manage.py makemigrations --name ${CIRCLE_BRANCH}_`date "+%Y%m%d-%H%M%S"` --settings=app.settings.production
fi
zappa update -s config/zappa_settings.json ${CIRCLE_BRANCH}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment