Closed isacikgoz closed 3 months ago
Can you clarify where do we already do the table.column check? Also, how would it avoid errors? Is there a bug here by checking the table.column again?
@agnivade we are anyway running checks and this is the procedure for that: https://github.com/mattermost/migration-assist/blob/main/queries/procedures/create_unicode_check.sql
The bug was due to the error:
An Error Occurred: error during running unicode checks for mysql: error while trying to fix posts.props error: Error 3140 (22032): Invalid JSON text: "Invalid escape character in string." at position 407 in value for column 'Posts.Props'.
Where we generate the fix query from a prepared statement. The escape sequences getting bugged if there are two \
(backslashes) in the JSON.
Yeah, the escaping is wrong.
Summary
While doing the check we already check if the table.column exists or not so we are not required to run that check again. This will simplify the query and also would avoid errors (happened to a user).