Migrated issue, originally created by Alex Rothberg
If I start with the following and then uncomment the CheckConstraint, alembic does not handle the migration adding it or even print a warning. If I just have alembic add the entire class the migration to add the class DOES have the CheckConstraint.
class TitleDepartmentYear(db.Model):
id = db.Column(UUID, default=uuid.uuid4, primary_key=True)
name = db.Column(db.String(), nullable=False)
__table_args__ = (
# db.CheckConstraint(
# sqa.func.char_length(name) > 0,
# name="title_department_year_name_min_length",
# ),
)
Migrated issue, originally created by Alex Rothberg
If I start with the following and then uncomment the CheckConstraint, alembic does not handle the migration adding it or even print a warning. If I just have alembic add the entire class the migration to add the class DOES have the CheckConstraint.