コード例 #1
0
    def test_simulate(self):
        """Testing MoveToDjangoMigrations"""
        end_sig = self.start_sig.clone()

        app_sig = end_sig.get_app_sig('tests')
        app_sig.upgrade_method = UpgradeMethod.MIGRATIONS

        mutation = MoveToDjangoMigrations(mark_applied=['0001_initial'])
        new_sig = self.perform_simulations([mutation], end_sig)

        new_app_sig = new_sig.get_app_sig('tests')
        self.assertEqual(new_app_sig.upgrade_method, UpgradeMethod.MIGRATIONS)
        self.assertEqual(new_app_sig.applied_migrations, set(['0001_initial']))
コード例 #2
0
from __future__ import unicode_literals

from django_evolution.mutations import MoveToDjangoMigrations

MUTATIONS = [
    MoveToDjangoMigrations(),
]
コード例 #3
0
from django_evolution.mutations import MoveToDjangoMigrations

MUTATIONS = [
    MoveToDjangoMigrations(mark_applied=['0001_initial', '0002_08_updates']),
]