Migration-assist tool hits a roadblock - migrating from mysql 8 to postgresql 15--Cannot connect to migrated postgresql db

Thank you to Agniva De Sarker — your suggestion worked!

I have hit another problem now and I hope there is some solution. I was able to complete the other data migration steps. But I cannot seem to get Mattermost to start up with the new postgres config.json settings. I’m using:


"SqlSettings": {
    "DriverName": "postgres",
    "DataSource": "postgres://mmuser:secretpassword@127.0.0.1:5432/mattermost?sslmode=disable\u0026connect_timeout=10",

…it errors with logs like this:


– The job identifier is 10552.
Aug 13 16:08:16 mattermost mattermost[4593]: {“timestamp”:“2024-08-13 16:08:16.906 -06:00”,“level”:“info”,“msg”:“Server is initializing…”,“caller”:“platform/service.go:175”,“go_version”:“go1.20.7”}
Aug 13 16:08:16 mattermost mattermost[4593]: {“timestamp”:“2024-08-13 16:08:16.906 -06:00”,“level”:“info”,“msg”:“Pinging SQL”,“caller”:“sql/sql_utils.go:67”,“database”:“master”,“dataSource”:“postgres://%2A%2A%2A%2A:%2A%2A%2A%2A@127.0.0.1:5432/mattermost?connect_timeout=10&sslmode=disable”}
Aug 13 16:08:16 mattermost mattermost[4593]: 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:
Aug 13 16:08:16 mattermost mattermost[4593]: SELECT CURRENT_SCHEMA()
Aug 13 16:08:16 mattermost mattermost[4593]: {“timestamp”:“2024-08-13 16:08:16.909 -06:00”,“level”:“error”,“msg”:“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: \n\nSELECT CURRENT_SCHEMA()\n”,“caller”:“commands/server.go:76”}
Aug 13 16:08:16 mattermost mattermost[4593]: Usage:
Aug 13 16:08:16 mattermost mattermost[4593]: mattermost [flags]
Aug 13 16:08:16 mattermost mattermost[4593]: mattermost [command]
Aug 13 16:08:16 mattermost mattermost[4593]: Available Commands:
Aug 13 16:08:16 mattermost mattermost[4593]: completion Generate the autocompletion script for the specified shell
Aug 13 16:08:16 mattermost mattermost[4593]: db Commands related to the database
Aug 13 16:08:16 mattermost mattermost[4593]: export Export data from Mattermost
Aug 13 16:08:16 mattermost mattermost[4593]: help Help about any command
Aug 13 16:08:16 mattermost mattermost[4593]: import Import data.
Aug 13 16:08:16 mattermost mattermost[4593]: jobserver Start the Mattermost job server
Aug 13 16:08:16 mattermost mattermost[4593]: server Run the Mattermost server
Aug 13 16:08:16 mattermost mattermost[4593]: version Display version information
Aug 13 16:08:16 mattermost mattermost[4593]: Flags:
Aug 13 16:08:16 mattermost mattermost[4593]: -c, --config string Configuration file to use.
Aug 13 16:08:16 mattermost mattermost[4593]: -h, --help help for mattermost
Aug 13 16:08:16 mattermost mattermost[4593]: Use “mattermost [command] --help” for more information about a command.
Aug 13 16:08:16 mattermost systemd[1]: mattermost.service: Main process exited, code=exited, status=1/FAILURE
– Subject: Unit process exited


Is it possible that my earlier move to make mmuser the owner of the Public schema has some negative effects? Or is there something else wrong with the schema of the postgresql db that I’m trying to connect to? I’m sorry but I do not know how to interpret the startup log message nor what to do next to connect to the postgresql db. The data did migrate----when I dump from the postgresql it’s nearly the same size as the uncompress mysql db.