1
0
mirror of https://github.com/django/django.git synced 2025-10-28 16:16:12 +00:00

Add RunPython migration operation and tests

This commit is contained in:
Andrew Godwin
2013-09-25 13:58:07 +01:00
parent 05656f2388
commit 3b810c5656
5 changed files with 79 additions and 3 deletions

View File

@@ -15,6 +15,9 @@ class Operation(object):
# Some operations are impossible to reverse, like deleting data.
reversible = True
# Can this migration be represented as SQL? (things like RunPython cannot)
reduces_to_sql = True
def __new__(cls, *args, **kwargs):
# We capture the arguments to make returning them trivial
self = object.__new__(cls)