Message ID | 1470718525-32603-2-git-send-email-dja@axtens.net |
---|---|
State | Accepted |
Headers | show |
On 09 Aug 14:55, Daniel Axtens wrote: > 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 <dja@axtens.net> Reviewed-by: Stephen Finucane <stephenfinucane@hotmail.com>
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 1d4b6e1793ca..fe4291b84c9a 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 - '''] + ''' ), ]
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 <dja@axtens.net> --- .../migrations/0010_migrate_data_from_submission_to_patch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)