161: Fix sql upgrade script
Closed
requested to merge generated-differential-D3833-source into generated-differential-D3833-target
Prior to this commit, the existing script did not work:
swh=> rollback; begin; update revision set extra_headers = ARRAY[][] where extra_headers is null;
ROLLBACK
BEGIN
ERROR: syntax error at or near "["
LINE 1: update revision set extra_headers = ARRAY[][] where extra_he...
With the following diff's content, on staging:
swh=> rollback; begin; update revision set extra_headers = ARRAY[]::bytea[][] where extra_headers is null;
ROLLBACK
BEGIN
UPDATE 865732
swh=> select extra_headers from revision where extra_headers = ARRAY[]::bytea[][] limit 10;
extra_headers
---------------
{}
...
I guess it's kinda related to #2524 ;)
Test Plan
manual run on staging prior to actually deploy on production
Migrated from D3833 (view on Phabricator)
Merge request reports
Activity
Build is green
Patch application report for D3833 (id=13492)
Rebasing onto f570f933...
First, rewinding head to replay your work on top of it... Applying: 161: Fix sql upgrade script
Changes applied before test
commit 1ce82b790cc48e7495f8694bbbb16d41a503e5f9 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Mon Aug 24 16:38:08 2020 +0200 161: Fix sql upgrade script Related to #2524
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/854/ for more details.
Some references in the commit message have been migrated:
- T2524 is now #2524
Build is green
Patch application report for D3833 (id=13508)
Rebasing onto cc33dd35...
Current branch diff-target is up to date.
Changes applied before test
commit f3870dcd07dc39838278aef6365e3ed8a6e0b261 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Mon Aug 24 16:38:08 2020 +0200 161: Fix sql upgrade script Related to #2524
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/865/ for more details.
Please register or sign in to reply