FusionAuth / fusionauth-issues

FusionAuth issue submission project
https://fusionauth.io
91 stars 12 forks source link

Error while running Postgres 1.16.0-RC.1.sql migration #606

Closed nscarlson closed 4 years ago

nscarlson commented 4 years ago

Error while running Postres 1.16.0-RC.1.sql migration

Description

Encounter an error while running the migration. Beforehand, the database has been fully migrated to 1.15.8.

Steps to reproduce

Steps to reproduce the behavior:

  1. Ensure postgres database is migrated to 1.15.8 by running the postgresql.sql script from the direct downloads, following the advanced installation instructions.
  2. Run the 1.16.0-RC.1 migration script
  3. The migration fails with the error:

    ERROR:  invalid input syntax for type json
    DETAIL:  Expected end of input, but found "}".
    CONTEXT:  JSON data, line 1: ...ireMixedCase": false, "requireNonAlpha": false}}}

Expected behavior

Expected the migration to run without issue.

Platform

robotdan commented 4 years ago

Thanks for the report @nscarlson - we've also run into this issue. It will be fixed in the general availability release of 1.16.0.

Here is a work around if you're interested. Prior to upgrading run the following SQL command

UPDATE tenants
SET data = replace(data, '"requireNonAlpha": false}}}', '"requireNonAlpha": false}}')
  WHERE id = (SELECT tenants_id FROM applications WHERE id = '3c219e58ed0e4b18ad48f4f92793ae32');
nscarlson commented 4 years ago

Thank you @robotdan, I'll give that a try.