Comment 3 for bug 2048519

Revision history for this message
Jacopo Rota (r00ta) wrote : Re: Migration during the upgrade to 3.4 stable is failing - default for column "extra" cannot be cast automatically to type jsonb

Looking at the 0292_use_builtin_json_field.py migration file we the following impacted tables

- bootresource
- bootresourcefile
- bootsourcecache
- config
- interface
- notification

From the user's db we can see that `config`, `notification` and `bootsourcecache` are not impacted. So the final workaround is the following:

```
# migrate maasserver_bootresource
ALTER TABLE maasserver_bootresource ALTER COLUMN extra SET DEFAULT NULL;

# migrate maasserver_bootresourcefile
ALTER TABLE maasserver_bootresourcefile ALTER COLUMN extra SET DEFAULT NULL;

# migrate maasserver_interface
ALTER TABLE maasserver_interface ALTER COLUMN ipv4_params SET DEFAULT NULL;
ALTER TABLE maasserver_interface ALTER COLUMN ipv6_params SET DEFAULT NULL;
ALTER TABLE maasserver_interface ALTER COLUMN params SET DEFAULT NULL;
```