Skip to content
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

ERROR: operator does not exist: smallint = boolean #76

Open
janekska opened this issue May 31, 2021 · 1 comment
Open

ERROR: operator does not exist: smallint = boolean #76

janekska opened this issue May 31, 2021 · 1 comment

Comments

@janekska
Copy link

I am getting this error after migration:

App 555161 stderr: Completed 500 Internal Server Error in 936ms (ActiveRecord: 27.2ms)
App 555161 stderr:
App 555161 stderr: ActiveRecord::StatementInvalid (PG::UndefinedFunction: ERROR: operator does not exist: smallint = boolean
App 555161 stderr: LINE 1: ...) AND (members.user_id = 2 OR (projects.is_public = TRUE AND...

migration:
From Redmine 3.3.3 to 4.2.1 (MySql to MySql) by using common Redmine migration. Checked working.
Then from MySQL to Postgres - then this error.
Note: the same error was when tried another approach: first migrate from v.3.3.3. MySQL to Postgres then update Redmine.

What could be wrong?

brgds & looking forward

@AnatolyFromPerion
Copy link

AnatolyFromPerion commented Nov 14, 2021

Hello,
project.is_public probably was of type tinyint before migration.
This script cannot distinguish between tinyint column used as "boolean" and the same column used as a number.
Hence, the column is converted to smallest PG's numeric type, which is smallint

I think, custom SQL script should be run to convert project.is_public column from smallint to boolean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants