Unable to delete own posts (`mattermost failed to update Posts: pq: function jsonb_set(text, unknown, unknown) does not exist`)

Thank you for the info @dombn I think the correct DDL is as following:

CREATE TABLE IF NOT EXISTS  public.posts (
    id character varying(26) NOT NULL,
    createat bigint,
    updateat bigint,
    deleteat bigint,
    userid character varying(26),
    channelid character varying(26),
    rootid character varying(26),
    originalid character varying(26),
    message character varying(65535),
    type character varying(26),
    props jsonb,
    hashtags character varying(1000),
    filenames character varying(4000),
    fileids character varying(300),
    hasreactions boolean,
    editat bigint,
    ispinned boolean,
    remoteid character varying(26)
)

Where props is a jsonb, hashtags, filenames and fileids are size constrained varchars.

Did you follow the guidelines here? Migration guidelines from MySQL to PostgreSQL — Mattermost documentation

1 Like