Commit 36d36818 authored by Simon Charette's avatar Simon Charette
Browse files

Fixed #26647 -- Included the state of all applied migrations when migrating forward.

Thanks Jasper Maes for the detailed report.
parent 30d110ef
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -116,8 +116,8 @@ class MigrationExecutor(object):
            if key in self.loader.graph.nodes
        }
        for migration, _ in full_plan:
            if not migrations_to_run:
                # We remove every migration that we applied from this set so
            if not migrations_to_run and not applied_migrations:
                # We remove every migration that we applied from these sets so
                # that we can bail out once the last migration has been applied
                # and don't always run until the very end of the migration
                # process.
@@ -136,6 +136,7 @@ class MigrationExecutor(object):
                # to make sure the resulting state doesn't include changes
                # from unrelated migrations.
                migration.mutate_state(state, preserve=False)
                applied_migrations.remove(migration)

        return state

+0 −0

Empty file added.

+22 −0
Original line number Diff line number Diff line
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('mutate_state_b', '0001_initial'),
    ]

    operations = [
        migrations.SeparateDatabaseAndState([], [
            migrations.CreateModel(
                name='A',
                fields=[
                    ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
                ],
            ),
        ])
    ]
+0 −0

Empty file added.

+0 −0

Empty file added.

Loading