Skip to content

mysql boolean support in the edge version of rails #524

@tmimura39

Description

@tmimura39

Problem

In the edge version of rails (active_record), an error occurs when defining a boolean column for mysql.

Error:  Trilogy::QueryError: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(1)' at line 1 (trilogy_query_recv)

Error Cause

Edge rails has changed from tinyint to using the boolean type.
rails/rails#54144

On the other hand, ridgepole applies limit(1) to boolean types.

This will cause a SQL with limit(1) to be issued for the boolean type, resulting in a syntax error.

Workaround

Execute ridgepole with the --default-bool-limit 0 option.
This is not a backward-compatible support, so you need to use different options depending on the version of rails you are using.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions