Mattermost not starting after migration

Dear support forum,

I succesfully migrated matermost from one mysql server to another server running postgres, but when I try to start, I get this error:

Error: failed to initialize platform: cannot create store: failed to apply database migrations: driver: postgres, message: failed to fetch current schema, command: current_schema, originalError: sql: Scan error on column index 0, name “current_schema”: converting NULL to string is unsupported, query:

How can I solve this problem?

Thanks in advance for your help.

The magic is in the Datasource in the param search_path. Watch too if you connection require SSL or not.

Try this:

“DataSource”: “postgres://your_user:your_password@your_host:5432/mattermost?sslmode=require\u0026search_path=mattermost,public”,

1 Like