django migrate to mysql code example

Example 1: Your models have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.

$ python manage.py makemigrations && python manage.py migrate
$ git add --all
$ git commit -m "fixed migrate error"
$ git push heroku master
$ heroku run python manage.py makemigrations
$ heroku run python manage.py migrate
--- Done ___

Example 2: link django to mysql

$ brew reinstall openssl
	#run two commands under "For compilers to find [email protected] you may need to set:"
$ pip install mysqlclient

Tags:

Sql Example