Note that there are some explanatory texts on larger screens.

plurals
  1. POheroku django south does not appear to use migrations
    text
    copied!<p>I'm having trouble with Django south migrations. It may be related to how we've laid our project out but it was working previously, and it works fine locally.</p> <p>I pushed new code last night that contained a migration in <code>my_app</code> app. So in my local environment...</p> <pre class="lang-none prettyprint-override"><code>$ ./manage.py migrate --list socialaccount (*) 0001_initial (*) 0002_genericmodels (*) 0003_auto__add_unique_socialaccount_uid_provider (*) 0004_add_sites (*) 0005_set_sites (*) 0006_auto__del_field_socialapp_site (*) 0007_auto__add_field_socialapp_client_id (*) 0008_client_id (*) 0009_auto__add_field_socialtoken_expires_at (*) 0010_auto__chg_field_socialtoken_token (*) 0011_auto__chg_field_socialtoken_token payments (*) 0001_initial users (*) 0001_initial my_app (*) 0001_initial (*) 0002_auto__add_organizerapplication </code></pre> <p>In heroku, it doesn't recognize my_app as an app with migrations. When I attempt to migrate that app....</p> <pre class="lang-none prettyprint-override"><code>$ heroku run my_app/manage.py migrate my_app --app=my_app Running my_app/manage.py migrate my_app attached to terminal... up, run.5016 The app 'my_app' does not appear to use migrations. ./manage.py migrate [appname] [migrationname|zero] [--all] [--list] [--skip] [--merge] [--no-initial-data] [--fake] [--db-dry-run] [--database=dbalias] </code></pre> <p>If I list the migrations, you'll notice my_app isn't listed...</p> <pre class="lang-none prettyprint-override"><code>$ heroku run my_app/manage.py migrate --list --app=my_app Running my_app/manage.py migrate --list attached to terminal... up, run.8264 socialaccount (*) 0001_initial (*) 0002_genericmodels (*) 0003_auto__add_unique_socialaccount_uid_provider (*) 0004_add_sites (*) 0005_set_sites (*) 0006_auto__del_field_socialapp_site (*) 0007_auto__add_field_socialapp_client_id (*) 0008_client_id (*) 0009_auto__add_field_socialtoken_expires_at (*) 0010_auto__chg_field_socialtoken_token (*) 0011_auto__chg_field_socialtoken_token payments (*) 0001_initial users (*) 0001_initial </code></pre> <p>I'm not sure it's relevant but <code>my_app</code> is listed in my <code>INSTALLED_APPS</code> when I check.</p> <p>UPDATE</p> <p>The issue was that this particular migrations dir was missing <code>__init__.py.</code> Running commands like <code>convert_to_south</code> through Heroku don't impact this as local file changes don't stick. Pushing the repo again with that file got the migrations recognized. I then just had to fake the first migration and I was good.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload