Staging instance, all changes can be removed at any time

Skip to content

161: Fix sql upgrade script

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

Loading