Comment 0 for bug 2048519

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

As per discourse post https://discourse.maas.io/t/upgrade-to-3-4-fails/7761

I tried to upgrade my maas install to 3.4 (from 3.2).

So I upgraded PostgreSQL to 14 first (worked perfect). After I upgraded to maas 3.3 with

snap refresh --channel=3.3 maas

which worked without problem.

but

snap refresh --channel=3.4 maas

results in SQL error:

Operations to perform:
  Apply all migrations: auth, contenttypes, maasserver, metadataserver, piston3, sessions, sites
Running migrations:
  Applying metadataserver.0034_use_builtin_json_field... OK
  Applying maasserver.0291_rdns_hostnames_as_array... OK
  Applying maasserver.0292_use_builtin_json_field...Traceback (most recent call last):
  File "/snap/maas/32469/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.DatatypeMismatch: default for column "extra" cannot be cast automatically to type jsonb