From: Daniel Axtens Date: Tue, 9 Aug 2016 04:55:19 +0000 (+1000) Subject: Convert RunSQL migration commands from list to strings X-Git-Tag: v2.0.0-rc1~286 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f2fdd1cad4f8af9563814d601d868cb720c83e1c;p=thirdparty%2Fpatchwork.git Convert RunSQL migration commands from list to strings The ability to use a list was added in Django 1.8 - compare https://docs.djangoproject.com/en/1.7/ref/migration-operations/#runsql https://docs.djangoproject.com/en/1.8/ref/migration-operations/#runsql We don't need a list as we run only 1 SQL command. So convert to strings. This helps unbreak Django 1.7. Signed-off-by: Daniel Axtens Reviewed-by: Stephen Finucane --- diff --git a/patchwork/migrations/0010_migrate_data_from_submission_to_patch.py b/patchwork/migrations/0010_migrate_data_from_submission_to_patch.py index 1d4b6e17..fe4291b8 100644 --- a/patchwork/migrations/0010_migrate_data_from_submission_to_patch.py +++ b/patchwork/migrations/0010_migrate_data_from_submission_to_patch.py @@ -12,19 +12,19 @@ class Migration(migrations.Migration): operations = [ migrations.RunSQL( - ['''INSERT INTO patchwork_patch + '''INSERT INTO patchwork_patch (submission_ptr_id, diff2, commit_ref2, pull_url2, delegate2_id, state2_id, archived2, hash2) SELECT id, diff, commit_ref, pull_url, delegate_id, state_id, archived, hash FROM patchwork_submission - '''], - ['''UPDATE patchwork_submission SET + ''', + '''UPDATE patchwork_submission SET diff=diff2, commit_ref=commit_ref2, pull_url=pull_url2, delegate_id=delegate2_id, state_id=state2_id, archived=archived2, hash=hash2 FROM patchwork_patch WHERE patchwork_submission.id = patchwork_patch.submission_ptr_id - '''] + ''' ), ]