Skip to content

Instantly share code, notes, and snippets.

@drpancake
Created March 5, 2020 01:04
Show Gist options
  • Save drpancake/f0b799f8b9bc47ace2bee722176a29f6 to your computer and use it in GitHub Desktop.
Save drpancake/f0b799f8b9bc47ace2bee722176a29f6 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "Checking for migrations"
while [[ $(python manage.py showmigrations | grep '\[ \]') ]]; do
echo "--> Waiting for migrations to be applied..."
sleep 0.5
done
echo "OK migrations are ready"
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment