Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Mattermost
  3. Migration To PostgreSQL - error 42601

Migration To PostgreSQL - error 42601

Scheduled Pinned Locked Moved Mattermost
21 Posts 4 Posters 1.4k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • vadimV Offline
    vadimV Offline
    vadim
    wrote on last edited by
    #8

    There is "
    Screenshot at Sep 23 17-28-15.png

    1 Reply Last reply
    0
    • BrutalBirdieB Offline
      BrutalBirdieB Offline
      BrutalBirdie
      Partner
      wrote on last edited by
      #9

      That is wrong. Give me a minute.

      Like my work? Consider donating a drink. Cheers!

      1 Reply Last reply
      0
      • BrutalBirdieB Offline
        BrutalBirdieB Offline
        BrutalBirdie
        Partner
        wrote on last edited by BrutalBirdie
        #10

        The migration.load should look like this:

        LOAD DATABASE
             FROM      mysql://{{ mysql_user }}:{{ mysql_password }}@{{ mysql_address }}/{{ source_schema }}
             INTO      pgsql://{{ pg_user }}:{{ pg_password }}@{{ postgres_address }}/{{ target_schema }}
        
        WITH data only,
             workers = 8, concurrency = 1,
             multiple readers per thread, rows per range = 10000,
             prefetch rows = 10000, batch rows = 2500,
             create no tables, create no indexes,
             preserve index names
        
        SET PostgreSQL PARAMETERS
             maintenance_work_mem to '128MB',
             work_mem to '12MB'
        
        SET MySQL PARAMETERS
             net_read_timeout  = '120',
             net_write_timeout = '120'
        
        CAST column Channels.Type to "channel_type" drop typemod,
             column Teams.Type to "team_type" drop typemod,
             column UploadSessions.Type to "upload_session_type" drop typemod,
             column ChannelBookmarks.Type to "channel_bookmark_type" drop typemod,
             column Drafts.Priority to text,
             type int when (= precision 11) to integer drop typemod,
             type bigint when (= precision 20) to bigint drop typemod,
             type text to varchar drop typemod,
             type tinyint when (<= precision 4) to boolean using tinyint-to-boolean,
             type json to jsonb drop typemod
        
        EXCLUDING TABLE NAMES MATCHING ~<IR_>, ~<focalboard>, 'schema_migrations', 'db_migrations', 'db_lock',
             'Configurations', 'ConfigurationFiles', 'db_config_migrations'
        
        BEFORE LOAD DO
             $$ ALTER SCHEMA public RENAME TO "{{ source_schema }}"; $$,
             $$ TRUNCATE TABLE "{{ source_schema }}".systems; $$,
             $$ DROP INDEX IF EXISTS "{{ source_schema }}".idx_posts_message_txt; $$,
             $$ DROP INDEX IF EXISTS "{{ source_schema }}".idx_fileinfo_content_txt; $$
        
        AFTER LOAD DO
             $$ UPDATE "{{ source_schema }}".db_migrations set name='add_createat_to_teamembers' where version=92; $$,
             $$ ALTER SCHEMA "{{ source_schema }}" RENAME TO public; $$,
             $$ SELECT pg_catalog.set_config('search_path', '"$user", public', false); $$,
             $$ ALTER USER {{ pg_user }} SET SEARCH_PATH TO 'public'; $$;
        

        If you want to see the diff with the added " more clearly https://www.diffchecker.com/Aac35QV0/

        Upload this to /app/data/migration.load and use this instead of the /app/pkg/migration.load

        The context.ini should have no quotes.

        Like my work? Consider donating a drink. Cheers!

        1 Reply Last reply
        1
        • BrutalBirdieB Offline
          BrutalBirdieB Offline
          BrutalBirdie
          Partner
          wrote on last edited by
          #11

          I am creating a PR for the Mattermost App with this changed to be reflected in the /app/pkg/migration.load

          Like my work? Consider donating a drink. Cheers!

          1 Reply Last reply
          1
          • vadimV Offline
            vadimV Offline
            vadim
            wrote on last edited by
            #12

            Sorry, but now way

            2024-09-23T15:19:01.012000Z LOG pgloader version "3.6.7~devel"
            2024-09-23T15:19:01.180001Z LOG Migrating from #<MYSQL-CONNECTION mysql://2782771d9a999c09@mysql:3306/2782771d9a999c09 {1008E9B383}>
            2024-09-23T15:19:01.180001Z LOG Migrating into #<PGSQL-CONNECTION pgsql://userea3b3c89dc76489aab6b37d7c17aba6e@postgresql:5432/dbea3b3c89dc76489aab6b37d7c17aba6e {1008E67533}>
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."displayname" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."channelbookmarks"."displayname".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."sortorder" is casted to type "bigint" which is not the same as "integer", the type of current target database column "2782771d9a999c09"."channelbookmarks"."sortorder".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."linkurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."channelbookmarks"."linkurl".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."imageurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."channelbookmarks"."imageurl".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."type" is casted to type "channel_bookmark_type" which is not the same as "\"2782771d9a999c09\".channel_bookmark_type", the type of current target database column "2782771d9a999c09"."channelbookmarks"."type".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."ChannelMembers"."schemeuser" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."channelmembers"."schemeuser".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."ChannelMembers"."schemeadmin" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."channelmembers"."schemeadmin".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."ChannelMembers"."schemeguest" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."channelmembers"."schemeguest".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."Channels"."type" is casted to type "channel_type" which is not the same as "\"2782771d9a999c09\".channel_type", the type of current target database column "2782771d9a999c09"."channels"."type".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."OutgoingOAuthConnections"."oauthtokenurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."outgoingoauthconnections"."oauthtokenurl".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."OutgoingOAuthConnections"."granttype" is casted to type "varchar" which is not the same as "\"2782771d9a999c09\".outgoingoauthconnections_granttype", the type of current target database column "2782771d9a999c09"."outgoingoauthconnections"."granttype".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."Preferences"."value" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."preferences"."value".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."RetentionIdsForDeletion"."ids" is casted to type "jsonb" which is not the same as "character varying[]", the type of current target database column "2782771d9a999c09"."retentionidsfordeletion"."ids".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."TeamMembers"."schemeuser" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."teammembers"."schemeuser".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."TeamMembers"."schemeadmin" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."teammembers"."schemeadmin".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."TeamMembers"."schemeguest" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."teammembers"."schemeguest".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."Teams"."type" is casted to type "team_type" which is not the same as "\"2782771d9a999c09\".team_type", the type of current target database column "2782771d9a999c09"."teams"."type".
            2024-09-23T15:19:01.392003Z WARNING Source column "2782771d9a999c09"."UploadSessions"."type" is casted to type "upload_session_type" which is not the same as "\"2782771d9a999c09\".upload_session_type", the type of current target database column "2782771d9a999c09"."uploadsessions"."type".
            2024-09-23T15:19:01.392003Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls" with name "calls" in target catalog
            2024-09-23T15:19:01.392003Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls_channels" with name "calls_channels" in target catalog
            2024-09-23T15:19:01.392003Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls_jobs" with name "calls_jobs" in target catalog
            2024-09-23T15:19:01.392003Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls_sessions" with name "calls_sessions" in target catalog
            2024-09-23T15:19:01.392003Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."db_migrations_calls" with name "db_migrations_calls" in target catalog
            2024-09-23T15:19:01.392003Z LOG Skipping "2782771d9a999c09".calls
            2024-09-23T15:19:01.392003Z LOG Skipping "2782771d9a999c09".calls_channels
            2024-09-23T15:19:01.392003Z LOG Skipping "2782771d9a999c09".calls_jobs
            2024-09-23T15:19:01.392003Z LOG Skipping "2782771d9a999c09".calls_sessions
            2024-09-23T15:19:01.392003Z LOG Skipping "2782771d9a999c09".db_migrations_calls
            2024-09-23T15:19:01.392003Z WARNING PostgreSQL warning: constraint "fk_retentionpolicieschannels_retentionpolicies" of relation "retentionpolicieschannels" does not exist, skipping
            2024-09-23T15:19:01.392003Z WARNING PostgreSQL warning: constraint "fk_retentionpoliciesteams_retentionpolicies" of relation "retentionpoliciesteams" does not exist, skipping
            2024-09-23T15:19:04.016012Z ERROR Database error 23505: duplicate key value violates unique constraint "users_email_key"
            DETAIL: Key (email)=(system-bot@localhost) already exists.
            CONTEXT: COPY users, line 9
            2024-09-23T15:19:05.860020Z ERROR Database error 23505: duplicate key value violates unique constraint "teams_name_key"
            DETAIL: Key (name)=(ravolar) already exists.
            CONTEXT: COPY teams, line 2
            2024-09-23T15:19:06.204021Z ERROR Database error 23505: duplicate key value violates unique constraint "roles_name_key"
            DETAIL: Key (name)=(channel_user) already exists.
            CONTEXT: COPY roles, line 1
            2024-09-23T15:19:06.464023Z LOG report summary reset
                                              table name     errors       rows      bytes      total time
            --------------------------------------------  ---------  ---------  ---------  --------------
                                             before load          0          4                     0.036s
                                         fetch meta data          0         72                     0.056s
                                       Drop Foreign Keys          0          4                     0.000s
            --------------------------------------------  ---------  ---------  ---------  --------------
                                 "2782771d9a999c09".jobs          0     152344    28.4 MB          4.740s
                                "2782771d9a999c09".posts          0      38351     8.1 MB          4.236s
                               "2782771d9a999c09".audits          0      21974     2.9 MB          2.240s
                             "2782771d9a999c09".fileinfo          0       4981    13.5 MB          3.264s
                          "2782771d9a999c09".preferences          0        798    73.7 kB          1.392s
                       "2782771d9a999c09".channelmembers          0        291    64.3 kB          1.388s
                    "2782771d9a999c09".sidebarcategories          0         59     8.5 kB          1.456s
                       "2782771d9a999c09".recentsearches          0         27     4.1 kB          1.476s
               "2782771d9a999c09".productnoticeviewstate          0         18     1.1 kB          1.528s
                     "2782771d9a999c09".incomingwebhooks          0          3     0.5 kB          1.600s
                     "2782771d9a999c09".channelbookmarks          0          0                     1.632s
                          "2782771d9a999c09".compliances          0          0                     1.680s
                         "2782771d9a999c09".groupmembers          0          0                     1.720s
                      "2782771d9a999c09".oauthaccessdata          0          1     0.2 kB          1.764s
                     "2782771d9a999c09".outgoingwebhooks          0          0                     1.788s
                       "2782771d9a999c09".remoteclusters          0          0                     1.808s
               "2782771d9a999c09".retentionpoliciesteams          0          0                     1.828s
                   "2782771d9a999c09".sharedchannelusers          0          0                     1.852s
                           "2782771d9a999c09".usergroups          0          0                     1.872s
                              "2782771d9a999c09".threads          0       1115   133.3 kB          0.108s
                 "2782771d9a999c09".channelmemberhistory          0        308    21.5 kB          0.112s
                             "2782771d9a999c09".sessions          0         66    12.1 kB          0.084s
                                "2782771d9a999c09".users          1          0                     0.108s
                               "2782771d9a999c09".status          0         20     1.1 kB          0.116s
                               "2782771d9a999c09".drafts          0          7     1.3 kB          0.140s
                               "2782771d9a999c09".tokens          0          0                     0.176s
                             "2782771d9a999c09".commands          0          0                     0.168s
                        "2782771d9a999c09".groupchannels          0          0                     0.208s
                          "2782771d9a999c09".notifyadmin          0          0                     0.196s
             "2782771d9a999c09".outgoingoauthconnections          0          0                     0.220s
                        "2782771d9a999c09".postreminders          0          0                     0.224s
            "2782771d9a999c09".retentionpolicieschannels          0          0                     0.288s
                 "2782771d9a999c09".sharedchannelremotes          0          0                     0.284s
                       "2782771d9a999c09".uploadsessions          0          0                     0.332s
                    "2782771d9a999c09".threadmemberships          0       2781   232.5 kB          0.040s
                            "2782771d9a999c09".reactions          0        669    76.7 kB          0.068s
                             "2782771d9a999c09".channels          0        116    21.5 kB          0.084s
                              "2782771d9a999c09".systems          0         61     2.5 kB          0.108s
                          "2782771d9a999c09".teammembers          0         26     1.7 kB          0.140s
                                 "2782771d9a999c09".bots          0         12     1.4 kB          0.164s
                                "2782771d9a999c09".teams          1          0                     0.180s
                     "2782771d9a999c09".clusterdiscovery          0          0                     0.204s
                        "2782771d9a999c09".desktoptokens          0          0                     0.224s
                           "2782771d9a999c09".groupteams          0          0                     0.244s
                            "2782771d9a999c09".oauthapps          0          1     0.3 kB          0.296s
              "2782771d9a999c09".persistentnotifications          0          0                     0.408s
              "2782771d9a999c09".retentionidsfordeletion          0          0                     0.448s
                              "2782771d9a999c09".schemes          0          0                     0.472s
                       "2782771d9a999c09".sharedchannels          0          0                     0.520s
                   "2782771d9a999c09".usertermsofservice          0          0                     0.580s
                         "2782771d9a999c09".linkmetadata          0       2203   835.9 kB          0.056s
                        "2782771d9a999c09".postspriority          0        518    30.9 kB          0.016s
                      "2782771d9a999c09".sidebarchannels          0        110    12.4 kB          0.008s
                  "2782771d9a999c09".pluginkeyvaluestore          0         53    13.3 kB          0.012s
                                "2782771d9a999c09".roles          1          0                     0.032s
                       "2782771d9a999c09".publicchannels          0         12     2.7 kB          0.016s
                     "2782771d9a999c09".useraccesstokens          0          3     0.3 kB          0.056s
                      "2782771d9a999c09".commandwebhooks          0          0                     0.008s
                                "2782771d9a999c09".emoji          0          0                     0.008s
                             "2782771d9a999c09".licenses          0          0                     0.048s
                        "2782771d9a999c09".oauthauthdata          0          1     0.2 kB          0.044s
                 "2782771d9a999c09".postacknowledgements          0          0                     0.024s
                    "2782771d9a999c09".retentionpolicies          0          0                     0.040s
             "2782771d9a999c09".sharedchannelattachments          0          0                     0.040s
                       "2782771d9a999c09".termsofservice          0          0                     0.044s
            --------------------------------------------  ---------  ---------  ---------  --------------
                                 COPY Threads Completion          0          8                     4.808s
                                         Reset Sequences          0          0                     0.032s
                                     Create Foreign Keys          0          2                     0.000s
                                         Set Search Path          0          1                     0.000s
                                        Install Comments          0          0                     0.000s
                                              after load          0          4                     0.024s
            --------------------------------------------  ---------  ---------  ---------  --------------
                                       Total import time          3     226929    54.4 MB          4.864s
            
            1 Reply Last reply
            0
            • BrutalBirdieB Offline
              BrutalBirdieB Offline
              BrutalBirdie
              Partner
              wrote on last edited by
              #13

              What is your message supposed to say?
              "No way" what? 🤔 I am confused.

              If you wait an hour, I am currently updating the doc.

              Like my work? Consider donating a drink. Cheers!

              1 Reply Last reply
              1
              • BrutalBirdieB Offline
                BrutalBirdieB Offline
                BrutalBirdie
                Partner
                wrote on last edited by
                #14

                Please start from Zero with a new mattermost instance for migration.
                The output of pgloader indicated that while trying to migrate MySQL to the Postgres db and schema get renamed back and forth and now the tool can't work out what is correct.

                Like my work? Consider donating a drink. Cheers!

                1 Reply Last reply
                0
                • vadimV Offline
                  vadimV Offline
                  vadim
                  wrote on last edited by
                  #15

                  There is fresh installation:

                  2024-09-23T16:54:53.008000Z LOG pgloader version "3.6.7~devel"
                  2024-09-23T16:54:53.008000Z LOG Data errors in '/tmp/pgloader/'
                  2024-09-23T16:54:53.008000Z LOG Parsing commands from file #P"/app/data/migration.load"
                  2024-09-23T16:54:53.312001Z LOG Migrating from #<MYSQL-CONNECTION mysql://2782771d9a999c09@mysql:3306/2782771d9a999c09 {1008E9B2B3}>
                  2024-09-23T16:54:53.316001Z LOG Migrating into #<PGSQL-CONNECTION pgsql://user0f690c85822c47d0af7ac1c95032b4e8@postgresql:5432/db0f690c85822c47d0af7ac1c95032b4e8 {1008E67533}>
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."displayname" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."channelbookmarks"."displayname".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."sortorder" is casted to type "bigint" which is not the same as "integer", the type of current target database column "2782771d9a999c09"."channelbookmarks"."sortorder".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."linkurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."channelbookmarks"."linkurl".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."imageurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."channelbookmarks"."imageurl".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."type" is casted to type "channel_bookmark_type" which is not the same as "\"2782771d9a999c09\".channel_bookmark_type", the type of current target database column "2782771d9a999c09"."channelbookmarks"."type".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelMembers"."schemeuser" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."channelmembers"."schemeuser".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelMembers"."schemeadmin" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."channelmembers"."schemeadmin".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelMembers"."schemeguest" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."channelmembers"."schemeguest".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."Channels"."type" is casted to type "channel_type" which is not the same as "\"2782771d9a999c09\".channel_type", the type of current target database column "2782771d9a999c09"."channels"."type".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."OutgoingOAuthConnections"."oauthtokenurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."outgoingoauthconnections"."oauthtokenurl".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."OutgoingOAuthConnections"."granttype" is casted to type "varchar" which is not the same as "\"2782771d9a999c09\".outgoingoauthconnections_granttype", the type of current target database column "2782771d9a999c09"."outgoingoauthconnections"."granttype".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."Preferences"."value" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."preferences"."value".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."RetentionIdsForDeletion"."ids" is casted to type "jsonb" which is not the same as "character varying[]", the type of current target database column "2782771d9a999c09"."retentionidsfordeletion"."ids".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."TeamMembers"."schemeuser" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."teammembers"."schemeuser".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."TeamMembers"."schemeadmin" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."teammembers"."schemeadmin".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."TeamMembers"."schemeguest" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."teammembers"."schemeguest".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."Teams"."type" is casted to type "team_type" which is not the same as "\"2782771d9a999c09\".team_type", the type of current target database column "2782771d9a999c09"."teams"."type".
                  2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."UploadSessions"."type" is casted to type "upload_session_type" which is not the same as "\"2782771d9a999c09\".upload_session_type", the type of current target database column "2782771d9a999c09"."uploadsessions"."type".
                  2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls" with name "calls" in target catalog
                  2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls_channels" with name "calls_channels" in target catalog
                  2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls_jobs" with name "calls_jobs" in target catalog
                  2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls_sessions" with name "calls_sessions" in target catalog
                  2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."db_migrations_calls" with name "db_migrations_calls" in target catalog
                  2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".calls
                  2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".calls_channels
                  2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".calls_jobs
                  2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".calls_sessions
                  2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".db_migrations_calls
                  2024-09-23T16:54:53.532002Z WARNING PostgreSQL warning: constraint "fk_retentionpolicieschannels_retentionpolicies" of relation "retentionpolicieschannels" does not exist, skipping
                  2024-09-23T16:54:53.532002Z WARNING PostgreSQL warning: constraint "fk_retentionpoliciesteams_retentionpolicies" of relation "retentionpoliciesteams" does not exist, skipping
                  2024-09-23T16:54:57.760020Z ERROR Database error 23505: duplicate key value violates unique constraint "roles_name_key"
                  DETAIL: Key (name)=(channel_user) already exists.
                  CONTEXT: COPY roles, line 1
                  2024-09-23T16:54:57.924020Z LOG report summary reset
                                                    table name     errors       rows      bytes      total time
                  --------------------------------------------  ---------  ---------  ---------  --------------
                                                   before load          0          4                     0.216s
                                               fetch meta data          0         72                     0.076s
                                             Drop Foreign Keys          0          4                     0.004s
                  --------------------------------------------  ---------  ---------  ---------  --------------
                                       "2782771d9a999c09".jobs          0     152346    28.4 MB          4.160s
                                      "2782771d9a999c09".posts          0      38351     8.1 MB          3.712s
                                     "2782771d9a999c09".audits          0      21974     2.9 MB          1.704s
                                   "2782771d9a999c09".fileinfo          0       4981    13.5 MB          2.144s
                                "2782771d9a999c09".preferences          0        798    73.7 kB          1.308s
                             "2782771d9a999c09".channelmembers          0        291    64.3 kB          1.460s
                          "2782771d9a999c09".sidebarcategories          0         59     8.5 kB          1.756s
                             "2782771d9a999c09".recentsearches          0         27     4.1 kB          1.844s
                     "2782771d9a999c09".productnoticeviewstate          0         18     1.1 kB          1.888s
                           "2782771d9a999c09".incomingwebhooks          0          3     0.5 kB          1.912s
                           "2782771d9a999c09".channelbookmarks          0          0                     1.952s
                                "2782771d9a999c09".compliances          0          0                     1.964s
                               "2782771d9a999c09".groupmembers          0          0                     2.000s
                            "2782771d9a999c09".oauthaccessdata          0          1     0.2 kB          2.032s
                           "2782771d9a999c09".outgoingwebhooks          0          0                     2.052s
                             "2782771d9a999c09".remoteclusters          0          0                     2.072s
                     "2782771d9a999c09".retentionpoliciesteams          0          0                     2.092s
                         "2782771d9a999c09".sharedchannelusers          0          0                     2.124s
                                 "2782771d9a999c09".usergroups          0          0                     2.148s
                                    "2782771d9a999c09".threads          0       1115   133.3 kB          0.388s
                       "2782771d9a999c09".channelmemberhistory          0        308    21.5 kB          0.464s
                                   "2782771d9a999c09".sessions          0         66    12.1 kB          0.540s
                                      "2782771d9a999c09".users          0         31    18.8 kB          0.612s
                                     "2782771d9a999c09".status          0         20     1.1 kB          0.596s
                                     "2782771d9a999c09".drafts          0          7     1.3 kB          0.628s
                                     "2782771d9a999c09".tokens          0          0                     0.640s
                                   "2782771d9a999c09".commands          0          0                     0.660s
                              "2782771d9a999c09".groupchannels          0          0                     0.660s
                                "2782771d9a999c09".notifyadmin          0          0                     0.696s
                   "2782771d9a999c09".outgoingoauthconnections          0          0                     0.364s
                              "2782771d9a999c09".postreminders          0          0                     0.388s
                  "2782771d9a999c09".retentionpolicieschannels          0          0                     0.388s
                       "2782771d9a999c09".sharedchannelremotes          0          0                     0.404s
                             "2782771d9a999c09".uploadsessions          0          0                     0.412s
                          "2782771d9a999c09".threadmemberships          0       2781   232.5 kB          0.128s
                                  "2782771d9a999c09".reactions          0        669    76.7 kB          0.120s
                                   "2782771d9a999c09".channels          0        116    21.5 kB          0.148s
                                    "2782771d9a999c09".systems          0         61     2.5 kB          0.164s
                                "2782771d9a999c09".teammembers          0         26     1.7 kB          0.192s
                                       "2782771d9a999c09".bots          0         12     1.4 kB          0.212s
                                      "2782771d9a999c09".teams          0          2     0.3 kB          0.236s
                           "2782771d9a999c09".clusterdiscovery          0          0                     0.252s
                              "2782771d9a999c09".desktoptokens          0          0                     0.272s
                                 "2782771d9a999c09".groupteams          0          0                     0.308s
                                  "2782771d9a999c09".oauthapps          0          1     0.3 kB          0.332s
                    "2782771d9a999c09".persistentnotifications          0          0                     0.352s
                    "2782771d9a999c09".retentionidsfordeletion          0          0                     0.392s
                                    "2782771d9a999c09".schemes          0          0                     0.428s
                             "2782771d9a999c09".sharedchannels          0          0                     0.420s
                         "2782771d9a999c09".usertermsofservice          0          0                     0.420s
                               "2782771d9a999c09".linkmetadata          0       2203   835.9 kB          0.048s
                              "2782771d9a999c09".postspriority          0        518    30.9 kB          0.008s
                            "2782771d9a999c09".sidebarchannels          0        110    12.4 kB          0.008s
                        "2782771d9a999c09".pluginkeyvaluestore          0         53    13.3 kB          0.004s
                                      "2782771d9a999c09".roles          1          0                     0.036s
                             "2782771d9a999c09".publicchannels          0         12     2.7 kB          0.012s
                           "2782771d9a999c09".useraccesstokens          0          3     0.3 kB          0.004s
                            "2782771d9a999c09".commandwebhooks          0          0                     0.052s
                                      "2782771d9a999c09".emoji          0          0                     0.032s
                                   "2782771d9a999c09".licenses          0          0                     0.020s
                              "2782771d9a999c09".oauthauthdata          0          1     0.2 kB          0.060s
                       "2782771d9a999c09".postacknowledgements          0          0                     0.016s
                          "2782771d9a999c09".retentionpolicies          0          0                     0.048s
                   "2782771d9a999c09".sharedchannelattachments          0          0                     0.036s
                             "2782771d9a999c09".termsofservice          0          0                     0.044s
                  --------------------------------------------  ---------  ---------  ---------  --------------
                                       COPY Threads Completion          0          8                     4.256s
                                               Reset Sequences          0          0                     0.028s
                                           Create Foreign Keys          0          2                     0.000s
                                               Set Search Path          0          1                     0.000s
                                              Install Comments          0          0                     0.000s
                                                    after load          0          4                     0.028s
                  --------------------------------------------  ---------  ---------  ---------  --------------
                                             Total import time          1     226964    54.5 MB          4.312s
                  
                  BrutalBirdieB 1 Reply Last reply
                  0
                  • vadimV vadim

                    There is fresh installation:

                    2024-09-23T16:54:53.008000Z LOG pgloader version "3.6.7~devel"
                    2024-09-23T16:54:53.008000Z LOG Data errors in '/tmp/pgloader/'
                    2024-09-23T16:54:53.008000Z LOG Parsing commands from file #P"/app/data/migration.load"
                    2024-09-23T16:54:53.312001Z LOG Migrating from #<MYSQL-CONNECTION mysql://2782771d9a999c09@mysql:3306/2782771d9a999c09 {1008E9B2B3}>
                    2024-09-23T16:54:53.316001Z LOG Migrating into #<PGSQL-CONNECTION pgsql://user0f690c85822c47d0af7ac1c95032b4e8@postgresql:5432/db0f690c85822c47d0af7ac1c95032b4e8 {1008E67533}>
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."displayname" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."channelbookmarks"."displayname".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."sortorder" is casted to type "bigint" which is not the same as "integer", the type of current target database column "2782771d9a999c09"."channelbookmarks"."sortorder".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."linkurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."channelbookmarks"."linkurl".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."imageurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."channelbookmarks"."imageurl".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelBookmarks"."type" is casted to type "channel_bookmark_type" which is not the same as "\"2782771d9a999c09\".channel_bookmark_type", the type of current target database column "2782771d9a999c09"."channelbookmarks"."type".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelMembers"."schemeuser" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."channelmembers"."schemeuser".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelMembers"."schemeadmin" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."channelmembers"."schemeadmin".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."ChannelMembers"."schemeguest" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."channelmembers"."schemeguest".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."Channels"."type" is casted to type "channel_type" which is not the same as "\"2782771d9a999c09\".channel_type", the type of current target database column "2782771d9a999c09"."channels"."type".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."OutgoingOAuthConnections"."oauthtokenurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."outgoingoauthconnections"."oauthtokenurl".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."OutgoingOAuthConnections"."granttype" is casted to type "varchar" which is not the same as "\"2782771d9a999c09\".outgoingoauthconnections_granttype", the type of current target database column "2782771d9a999c09"."outgoingoauthconnections"."granttype".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."Preferences"."value" is casted to type "varchar" which is not the same as "text", the type of current target database column "2782771d9a999c09"."preferences"."value".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."RetentionIdsForDeletion"."ids" is casted to type "jsonb" which is not the same as "character varying[]", the type of current target database column "2782771d9a999c09"."retentionidsfordeletion"."ids".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."TeamMembers"."schemeuser" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."teammembers"."schemeuser".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."TeamMembers"."schemeadmin" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."teammembers"."schemeadmin".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."TeamMembers"."schemeguest" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "2782771d9a999c09"."teammembers"."schemeguest".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."Teams"."type" is casted to type "team_type" which is not the same as "\"2782771d9a999c09\".team_type", the type of current target database column "2782771d9a999c09"."teams"."type".
                    2024-09-23T16:54:53.528002Z WARNING Source column "2782771d9a999c09"."UploadSessions"."type" is casted to type "upload_session_type" which is not the same as "\"2782771d9a999c09\".upload_session_type", the type of current target database column "2782771d9a999c09"."uploadsessions"."type".
                    2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls" with name "calls" in target catalog
                    2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls_channels" with name "calls_channels" in target catalog
                    2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls_jobs" with name "calls_jobs" in target catalog
                    2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."calls_sessions" with name "calls_sessions" in target catalog
                    2024-09-23T16:54:53.528002Z ERROR pgloader failed to find target table for source "2782771d9a999c09"."db_migrations_calls" with name "db_migrations_calls" in target catalog
                    2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".calls
                    2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".calls_channels
                    2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".calls_jobs
                    2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".calls_sessions
                    2024-09-23T16:54:53.528002Z LOG Skipping "2782771d9a999c09".db_migrations_calls
                    2024-09-23T16:54:53.532002Z WARNING PostgreSQL warning: constraint "fk_retentionpolicieschannels_retentionpolicies" of relation "retentionpolicieschannels" does not exist, skipping
                    2024-09-23T16:54:53.532002Z WARNING PostgreSQL warning: constraint "fk_retentionpoliciesteams_retentionpolicies" of relation "retentionpoliciesteams" does not exist, skipping
                    2024-09-23T16:54:57.760020Z ERROR Database error 23505: duplicate key value violates unique constraint "roles_name_key"
                    DETAIL: Key (name)=(channel_user) already exists.
                    CONTEXT: COPY roles, line 1
                    2024-09-23T16:54:57.924020Z LOG report summary reset
                                                      table name     errors       rows      bytes      total time
                    --------------------------------------------  ---------  ---------  ---------  --------------
                                                     before load          0          4                     0.216s
                                                 fetch meta data          0         72                     0.076s
                                               Drop Foreign Keys          0          4                     0.004s
                    --------------------------------------------  ---------  ---------  ---------  --------------
                                         "2782771d9a999c09".jobs          0     152346    28.4 MB          4.160s
                                        "2782771d9a999c09".posts          0      38351     8.1 MB          3.712s
                                       "2782771d9a999c09".audits          0      21974     2.9 MB          1.704s
                                     "2782771d9a999c09".fileinfo          0       4981    13.5 MB          2.144s
                                  "2782771d9a999c09".preferences          0        798    73.7 kB          1.308s
                               "2782771d9a999c09".channelmembers          0        291    64.3 kB          1.460s
                            "2782771d9a999c09".sidebarcategories          0         59     8.5 kB          1.756s
                               "2782771d9a999c09".recentsearches          0         27     4.1 kB          1.844s
                       "2782771d9a999c09".productnoticeviewstate          0         18     1.1 kB          1.888s
                             "2782771d9a999c09".incomingwebhooks          0          3     0.5 kB          1.912s
                             "2782771d9a999c09".channelbookmarks          0          0                     1.952s
                                  "2782771d9a999c09".compliances          0          0                     1.964s
                                 "2782771d9a999c09".groupmembers          0          0                     2.000s
                              "2782771d9a999c09".oauthaccessdata          0          1     0.2 kB          2.032s
                             "2782771d9a999c09".outgoingwebhooks          0          0                     2.052s
                               "2782771d9a999c09".remoteclusters          0          0                     2.072s
                       "2782771d9a999c09".retentionpoliciesteams          0          0                     2.092s
                           "2782771d9a999c09".sharedchannelusers          0          0                     2.124s
                                   "2782771d9a999c09".usergroups          0          0                     2.148s
                                      "2782771d9a999c09".threads          0       1115   133.3 kB          0.388s
                         "2782771d9a999c09".channelmemberhistory          0        308    21.5 kB          0.464s
                                     "2782771d9a999c09".sessions          0         66    12.1 kB          0.540s
                                        "2782771d9a999c09".users          0         31    18.8 kB          0.612s
                                       "2782771d9a999c09".status          0         20     1.1 kB          0.596s
                                       "2782771d9a999c09".drafts          0          7     1.3 kB          0.628s
                                       "2782771d9a999c09".tokens          0          0                     0.640s
                                     "2782771d9a999c09".commands          0          0                     0.660s
                                "2782771d9a999c09".groupchannels          0          0                     0.660s
                                  "2782771d9a999c09".notifyadmin          0          0                     0.696s
                     "2782771d9a999c09".outgoingoauthconnections          0          0                     0.364s
                                "2782771d9a999c09".postreminders          0          0                     0.388s
                    "2782771d9a999c09".retentionpolicieschannels          0          0                     0.388s
                         "2782771d9a999c09".sharedchannelremotes          0          0                     0.404s
                               "2782771d9a999c09".uploadsessions          0          0                     0.412s
                            "2782771d9a999c09".threadmemberships          0       2781   232.5 kB          0.128s
                                    "2782771d9a999c09".reactions          0        669    76.7 kB          0.120s
                                     "2782771d9a999c09".channels          0        116    21.5 kB          0.148s
                                      "2782771d9a999c09".systems          0         61     2.5 kB          0.164s
                                  "2782771d9a999c09".teammembers          0         26     1.7 kB          0.192s
                                         "2782771d9a999c09".bots          0         12     1.4 kB          0.212s
                                        "2782771d9a999c09".teams          0          2     0.3 kB          0.236s
                             "2782771d9a999c09".clusterdiscovery          0          0                     0.252s
                                "2782771d9a999c09".desktoptokens          0          0                     0.272s
                                   "2782771d9a999c09".groupteams          0          0                     0.308s
                                    "2782771d9a999c09".oauthapps          0          1     0.3 kB          0.332s
                      "2782771d9a999c09".persistentnotifications          0          0                     0.352s
                      "2782771d9a999c09".retentionidsfordeletion          0          0                     0.392s
                                      "2782771d9a999c09".schemes          0          0                     0.428s
                               "2782771d9a999c09".sharedchannels          0          0                     0.420s
                           "2782771d9a999c09".usertermsofservice          0          0                     0.420s
                                 "2782771d9a999c09".linkmetadata          0       2203   835.9 kB          0.048s
                                "2782771d9a999c09".postspriority          0        518    30.9 kB          0.008s
                              "2782771d9a999c09".sidebarchannels          0        110    12.4 kB          0.008s
                          "2782771d9a999c09".pluginkeyvaluestore          0         53    13.3 kB          0.004s
                                        "2782771d9a999c09".roles          1          0                     0.036s
                               "2782771d9a999c09".publicchannels          0         12     2.7 kB          0.012s
                             "2782771d9a999c09".useraccesstokens          0          3     0.3 kB          0.004s
                              "2782771d9a999c09".commandwebhooks          0          0                     0.052s
                                        "2782771d9a999c09".emoji          0          0                     0.032s
                                     "2782771d9a999c09".licenses          0          0                     0.020s
                                "2782771d9a999c09".oauthauthdata          0          1     0.2 kB          0.060s
                         "2782771d9a999c09".postacknowledgements          0          0                     0.016s
                            "2782771d9a999c09".retentionpolicies          0          0                     0.048s
                     "2782771d9a999c09".sharedchannelattachments          0          0                     0.036s
                               "2782771d9a999c09".termsofservice          0          0                     0.044s
                    --------------------------------------------  ---------  ---------  ---------  --------------
                                         COPY Threads Completion          0          8                     4.256s
                                                 Reset Sequences          0          0                     0.028s
                                             Create Foreign Keys          0          2                     0.000s
                                                 Set Search Path          0          1                     0.000s
                                                Install Comments          0          0                     0.000s
                                                      after load          0          4                     0.028s
                    --------------------------------------------  ---------  ---------  ---------  --------------
                                               Total import time          1     226964    54.5 MB          4.312s
                    
                    BrutalBirdieB Offline
                    BrutalBirdieB Offline
                    BrutalBirdie
                    Partner
                    wrote on last edited by
                    #16

                    @vadim Did you restart and check if the chats are there?

                    Like my work? Consider donating a drink. Cheers!

                    1 Reply Last reply
                    0
                    • vadimV Offline
                      vadimV Offline
                      vadim
                      wrote on last edited by
                      #17

                      It looks like it works, I try to move files also

                      1 Reply Last reply
                      0
                      • vadimV Offline
                        vadimV Offline
                        vadim
                        wrote on last edited by
                        #18

                        Migration DONE! Thank you for amazing help!

                        BrutalBirdieB 1 Reply Last reply
                        2
                        • vadimV vadim

                          Migration DONE! Thank you for amazing help!

                          BrutalBirdieB Offline
                          BrutalBirdieB Offline
                          BrutalBirdie
                          Partner
                          wrote on last edited by
                          #19

                          @vadim consider clicking my donate link and buy me a coffee 😉
                          Glad it worked for you. 👍

                          Like my work? Consider donating a drink. Cheers!

                          vadimV 1 Reply Last reply
                          1
                          • BrutalBirdieB BrutalBirdie

                            @vadim consider clicking my donate link and buy me a coffee 😉
                            Glad it worked for you. 👍

                            vadimV Offline
                            vadimV Offline
                            vadim
                            wrote on last edited by
                            #20

                            @BrutalBirdie Done 🙂

                            BrutalBirdieB 1 Reply Last reply
                            0
                            • vadimV vadim

                              @BrutalBirdie Done 🙂

                              BrutalBirdieB Offline
                              BrutalBirdieB Offline
                              BrutalBirdie
                              Partner
                              wrote on last edited by
                              #21

                              @vadim thank you very much

                              Like my work? Consider donating a drink. Cheers!

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Bookmarks
                              • Search