Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you need to selectively (for just one app) reset migrations that are taking too long, <a href="https://stackoverflow.com/a/12823039/623735">this</a> worked for me.</p> <pre><code>rm &lt;app-dir&gt;/migrations/* python manage.py schemamigration &lt;app-name&gt; --initial python manage.py migrate &lt;app-name&gt; 0001 --fake --delete-ghost-migrations </code></pre> <p>Don't forget to manually restore any <a href="http://south.aeracode.org/wiki/Dependencies" rel="nofollow noreferrer">dependencies</a> on other apps by adding lines like <code>depends_on = (("&lt;other_app_name&gt;", "0001_initial"),("&lt;yet_another_app_name&gt;", "0001_initial"))</code> to your <code>&lt;app-dir&gt;/migrations/0001_initial.py</code> file, as the first attribute in your migration class just below <code>class Migration(SchemaMigration):</code>.</p> <p>You can then <code>./manage.py migrate &lt;app-name&gt; --fake --delete-ghost-migrations</code> on other environments, per <a href="https://stackoverflow.com/a/12823039/623735">this SO answer</a>. Of course if you fake the delete or fake the <code>migrate zero</code> you'll need to manually delete any left-over db tables with a migration like <a href="https://stackoverflow.com/a/15799023/623735">this</a>.</p> <p>A more nuclear option is to <code>./manage.py migrate --fake --delete-ghost-migrations</code> on the live deployment server followed by a [my]sqldump. Then pipe that dump into [my]sql on the environments where you need the migrated, fully-populated db. South sacrilege, I know, but worked for me.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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