1
0
mirror of https://github.com/django/django.git synced 2025-10-27 23:56:08 +00:00

First stab at some migration creation commands

This commit is contained in:
Andrew Godwin
2013-06-19 15:36:22 +01:00
parent 2ae8a8a77d
commit ab5cbae9b7
10 changed files with 210 additions and 52 deletions

View File

@@ -60,3 +60,10 @@ class MigrationRecorder(object):
"""
self.ensure_schema()
self.Migration.objects.filter(app=app, name=name).delete()
@classmethod
def flush(cls):
"""
Deletes all migration records. Useful if you're testing migrations.
"""
cls.Migration.objects.all().delete()