-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calls: post-migration issues #18
Comments
cc @streamer45 |
@zap51 Could you show the current schema for the
|
mattermost# \d+ public."calls";
Table "public.calls"
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description
--------------+------------------------+-----------+----------+---------+----------+-------------+--------------+-------------
id | character varying(26) | | not null | | extended | | |
channelid | character varying(26) | | | | extended | | |
startat | bigint | | | | plain | | |
endat | bigint | | | | plain | | |
createat | bigint | | | | plain | | |
deleteat | bigint | | | | plain | | |
title | character varying(256) | | | | extended | | |
postid | character varying(26) | | | | extended | | |
threadid | character varying(26) | | | | extended | | |
ownerid | character varying(26) | | | | extended | | |
participants | text | | not null | | extended | | |
stats | text | | not null | | extended | | |
props | text | | not null | | extended | | |
Indexes:
"idx_24766_primary" PRIMARY KEY, btree (id)
"idx_calls_channel_id" btree (channelid)
"idx_calls_end_at" btree (endat)
Access method: heap |
@zap51 Right, somehow the JSON based columns ( Anyhow, to fix this now, you'd have to convert them to what's expected by the app: ALTER TABLE calls ALTER COLUMN participants TYPE jsonb USING participants::jsonb;
ALTER TABLE calls ALTER COLUMN props TYPE jsonb USING props::jsonb;
ALTER TABLE calls ALTER COLUMN stats TYPE jsonb USING stats::jsonb; /cc @isacikgoz in case you have thoughts |
Thanks for the hint, @streamer45. In my other instance which has Postgres from the start says mattermost=# \d+ calls;
Table "public.calls"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------------+------------------------+-----------+----------+---------+----------+--------------+-------------
id | character varying(26) | | not null | | extended | |
channelid | character varying(26) | | | | extended | |
startat | bigint | | | | plain | |
endat | bigint | | | | plain | |
createat | bigint | | | | plain | |
deleteat | bigint | | | | plain | |
title | character varying(256) | | | | extended | |
postid | character varying(26) | | | | extended | |
threadid | character varying(26) | | | | extended | |
ownerid | character varying(26) | | | | extended | |
participants | jsonb | | not null | | extended | |
stats | jsonb | | not null | | extended | |
props | jsonb | | not null | | extended | |
Indexes:
"calls_pkey" PRIMARY KEY, btree (id)
"idx_calls_channel_id" btree (channelid)
"idx_calls_end_at" btree (endat)
Access method: heap I'm converting that to |
@streamer45,
Thanks! |
Ah, that makes sense. Thanks for checking! |
Thanks @streamer45. Looks like I'll have to be more careful while doing MariaDB to MySQL. Thanks |
I better check the DB migrations and perform data type changes. Would you please suggest if the mysql column data type changes yield any undesirable results or any pointers for me to consider? I'll rather attempt performing a fresh installation of MM with MySQL and compare the column data types of all tables against my MariaDB one. |
@zap51 I think in MySQL JSON is backward compatible with text based columns so it will probably work fine. But in Postgres that's obviously not the case since MariaDB has not been supported by MM for a long time so I think a clean install could be a good solution. |
Actually there was a Maybe we should add the full-schema-check to the guide (I'm just inclined not to add it by default as it may create some confusion). But let me know if you think otherwise. |
@isacikgoz thanks for the info. I'll give this a try today. |
@isacikgoz Why do you think it would be confusing? If we can make it happen in the background and print a warning or error, we could prevent a deeper problem later on when using the product. It's not a huge deal in the case of Calls, but it'd be great to find a workaround. |
@streamer45 Right, the confusion may come from interpreting the diff and being able to fix it. But all in all it should indicate the error earlier indeed. @zap51 Just realized that I may rushed with my recommendation as |
Hello,
I was able to run other
pgloader
files successfully but thoughpgloader
succeeded for calls, Mattermost server reports the errors. This is postgresql-14.13.pgloader:
And Mattermost server reports the below:
As a result of this, System Statistics does not display any information on Calls plugin.
Regards,
Jayanth
The text was updated successfully, but these errors were encountered: