Migration from MySQL 8 to Postgres Database

Hi @gdelia-pm, glad that you worked it out. I actually lost track of it, but I restarted the migration from the beginning. Currently, the source MySQL8 DB has the mattermost schema corresponding to version 8.1.
I’m following the steps you mentioned,

  1. I’ve created a new database and user with the postgres docker init, as per the prepare database documentation.

    CREATE DATABASE mattermost;
    CREATE USER mmuser WITH PASSWORD '<MY_PASS>';
    GRANT ALL PRIVILEGES ON DATABASE mattermost to mmuser;
    ALTER DATABASE mattermost OWNER TO mmuser;
    GRANT USAGE, CREATE ON SCHEMA PUBLIC TO mmuser;
    

    Schema right now,

    image

  2. Created new load file mm_posts.load and ran the pgloader command with pgloader mm_posts.load > migration.log, but getting error,

  3. Assuming It is because of the posts tables missing issue, I ve ran the morph migrations again after cloning the mattermost release-8.1.

    After that got the old database connection failed error when running the original migration.load file, @isacikgoz

    And this was error in migration.log.

  4. I’ve now altered the ALTER TABLE public.posts ** => ALTER TABLE mattermost.posts ** in mm_posts.load, rebuild the database. Then run the morph command to build up the post schema. Retried the posts table only migration (mm_posts.load),

    The process exits without error but no data getting migrated, the log out…

Can you suggest what I’m missing? I know it is some simple thing I’ve overlooked. Thanks in advance.