I made syncdb (Python/Django application) in Heroku and he created table south_migrationhistory,
(venv-project)username@username:~/projectapp$ heroku run py
Tested on Django 1.9
settings.py
in_heroku = False
if 'DATABASE_URL' in os.environ:
in_heroku = True
import dj_database_url
if in_heroku:
DATABASES = {'default': dj_database_url.config()}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
Then run:
heroku addons:create heroku-postgresql:hobby-dev
sudo apt-get intall postgresql libpq-dev
pip install dj-database-url psycopg2
pip freeze >requirements.txt
git add .
git commit -m 'msg'
git push heroku master
heroku run python manage.py migrate
References:
syncdb
, just migrate
: What should I use instead of syncdb in Django 1.9?