id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 22445,Doc on reversible data migrations needed,Karen Tracey,Tim Graham,"If I create a data migration, run it, then try to migrate back to before it, I get: {{{ Unapplying m3app.0003_auto_20140415_1022...Traceback (most recent call last): File ""./manage.py"", line 10, in execute_from_command_line(sys.argv) File ""/home/kmtracey/.virtualenvs/uncfm/lib/python3.3/site-packages/django/core/management/__init__.py"", line 427, in execute_from_command_line utility.execute() File ""/home/kmtracey/.virtualenvs/uncfm/lib/python3.3/site-packages/django/core/management/__init__.py"", line 419, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File ""/home/kmtracey/.virtualenvs/uncfm/lib/python3.3/site-packages/django/core/management/base.py"", line 288, in run_from_argv self.execute(*args, **options.__dict__) File ""/home/kmtracey/.virtualenvs/uncfm/lib/python3.3/site-packages/django/core/management/base.py"", line 337, in execute output = self.handle(*args, **options) File ""/home/kmtracey/.virtualenvs/uncfm/lib/python3.3/site-packages/django/core/management/commands/migrate.py"", line 145, in handle executor.migrate(targets, plan, fake=options.get(""fake"", False)) File ""/home/kmtracey/.virtualenvs/uncfm/lib/python3.3/site-packages/django/db/migrations/executor.py"", line 62, in migrate self.unapply_migration(migration, fake=fake) File ""/home/kmtracey/.virtualenvs/uncfm/lib/python3.3/site-packages/django/db/migrations/executor.py"", line 114, in unapply_migration migration.unapply(project_state, schema_editor) File ""/home/kmtracey/.virtualenvs/uncfm/lib/python3.3/site-packages/django/db/migrations/migration.py"", line 121, in unapply raise Migration.IrreversibleError(""Operation %s in %s is not reversible"" % (operation, self)) django.db.migrations.migration.IrreversibleError: Operation > in m3app.0003_auto_20140415_1022 is not reversible }}} I cannot find any documentation on how to create a reversible data migration. I'm used to doing this with South, I assume there is some way to do this in the new migrations framework? We need some doc on how to do it...or if this is not just a missing doc issue then this needs to be re-classified as a migrations code issue...",Bug,closed,Documentation,1.7-beta-1,Release blocker,fixed,,,Accepted,0,0,0,0,0,0