Skip to content

db: add migration to change boolean values to integers

georg requested to merge 505-db-migrate-boolean-values-to-integers into main

Since ActiveRecord >= 6.0, the SQLite3 connection adapter relies on boolean serialization to use 1 and 0, but does not natively recognize 't' and 'f' as booleans were previously serialized.

Accordingly, this migration handles conversion of both column defaults and stored data provided by a user.

In contrast to other migrations, only a 'forward' method is provided, a mechanism to 'reverse' is not. Given the nature of this migration, the later is not really required.

Unfortunately, we missed this breaking change when bumping ActiveRecord to >= 6.0 in Schleuder version 4.0. This caused quite some work upstream, but also in downstream environments and, last but not least, at the side of users.

We should extend our CI to explicitly test, and ensure things work as expected, if running a Schleuder setup in real world. As of now, we don't ensure data provided by a user in Schleuder version x still works after upgrading to version y.

Closes #505 (closed)

Edited by georg

Merge request reports