Hi,
I tried to Update mattermost with Docker. But I got this message:
First I tried 9.4.5 to 9.5.0.
But I got this message:
idx_poststats_userid ON poststats(userid)
mattermost | Error: failed to initialize platform: cannot cre ate store: failed to apply database migrations: driver: postgres, message: faile d to execute migration, command: executing_query, originalError: pq: relation “p oststats” does not exist, query:
mattermost |
mattermost | – morph:nontransactional
mattermost | CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_post stats_userid ON poststats(userid)
mattermost |
mattermost | Usage:
mattermost | mattermost [flags]
mattermost | mattermost [command]
mattermost |
mattermost | Available Commands:
mattermost | completion Generate the autocompletion script for the specified shell
mattermost | db Commands related to the database
mattermost | export Export data from Mattermost
mattermost | help Help about any command
mattermost | import Import data.
mattermost | jobserver Start the Mattermost job server
mattermost | server Run the Mattermost server
mattermost | version Display version information
mattermost |
mattermost | Flags:
mattermost | -c, --config string Configuration file to us e.
mattermost | -h, --help help for mattermost
mattermost |
mattermost | Use “mattermost [command] --help” for more infor mation about a command.
mattermost |
mattermost exited with code 1
Ok, that’s a bit strange. Because it shows the migration 115 as complete but that didn’t happen.
Anyways, you can run this:
CREATE MATERIALIZED VIEW IF NOT EXISTS poststats AS
SELECT userid, to_timestamp(createat/1000)::date as day, COUNT(*) as numposts, MAX(CreateAt) as lastpostdate
FROM posts
GROUP BY userid, day;
on the DB, and then re-attempt the upgrade to 9.5.5.