9101de9
fix testsuite failing with SQLAlchemy < 1.4 The new SQLAlchemy naming convention fails with SQLAlchemy < 1.4 when executed on SQLite (used in the test suite). The reason is that SQLite doesn't support Boolean type natively, and SQLAlchemy automatically tries to create a constraint, but that fails without a constraint name specified. SQLAlchemy 1.4 resolves this issue by not creating constraints at all (for non-native types). You can read more about it here: https://github.com/pallets/flask-sqlalchemy/pull/886 https://docs.sqlalchemy.org/en/14/core/constraints.html#configuring-naming-for-boolean-enum-and-other-schema-types https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#enum-and-boolean-datatypes-no-longer-default-to-create-constraint Since we need to support SQLAlchemy 1.3 at the moment (in Fedora 33 and 34), out of several solutions I decided to name constraints for all Boolean types (the names are then used by the naming convention, they doesn't override it). I also specified that the constraint *should* be created (no reason not to create it, when we have it named already). Otherwise the contraints would stop being created once upgraded to SQLAlchemy >= 1.4. Fixes: https://pagure.io/fedora-qa/blockerbugs/issue/197 Merges: https://pagure.io/fedora-qa/blockerbugs/pull-request/199