Style: Prepend "operation_" to data migrations

Prepend "operation_" to the data migration functions
for clear purpose. Add keyword arguments to the RunPython
migration opration.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-07 17:28:22 -04:00
parent ab1482152e
commit 255b1c75ea
11 changed files with 29 additions and 29 deletions

View File

@@ -4,7 +4,7 @@ from django.conf import settings
from django.db import migrations
def migrate_old_comments(apps, schema_editor):
def operation_migrate_old_comments(apps, schema_editor):
# https://code.djangoproject.com/ticket/24282
# If someone has a better solution until Django 1.8, would appreciate
# a pull-request :)
@@ -43,5 +43,5 @@ class Migration(migrations.Migration):
]
operations = [
migrations.RunPython(migrate_old_comments),
migrations.RunPython(code=operation_migrate_old_comments),
]