[PATCH] migrations: Fix 0010 reversion
Andy Doan
andy.doan at linaro.org
Thu Jun 30 03:17:09 AEST 2016
On 06/02/2016 05:30 AM, Stephen Finucane wrote:
> The syntax previously used was not compatible with MySQL. Replace with
> a simpler, more broadly supported version using JOINs.
>
> Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
> ---
This is failing on my Postgres 9.3 install. We may have to do a
conditional on postgres/mysql for this :/
> .../0010_migrate_data_from_submission_to_patch.py | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> 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 1d4b6e1..00669dd 100644
> --- a/patchwork/migrations/0010_migrate_data_from_submission_to_patch.py
> +++ b/patchwork/migrations/0010_migrate_data_from_submission_to_patch.py
> @@ -19,12 +19,12 @@ class Migration(migrations.Migration):
> archived, hash
> FROM patchwork_submission
> '''],
> - ['''UPDATE patchwork_submission SET
> + ['''UPDATE patchwork_submission t1
> + INNER JOIN patchwork_patch t2 ON t1.id = t2.submission_ptr_id
> + 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
> ''']
> ),
> ]
>
More information about the Patchwork
mailing list