1. Michael Bayer
  2. alembic
  3. Issues

Issues

Issue #58 resolved

model level booleans coming through autogen should at least be complete

Anonymous created an issue

When I make new revision with --autogenerate options for new boolean column I get this migration script {{{

!python

def upgrade(): ### commands auto generated by Alembic - please adjust! ### ... sa.Column('is_grand', sa.Boolean(), nullable=True), sa.CheckConstraint('TODO'), ...

}}}

The script is running with error: {{{ sqlalchemy.exc.ProgrammingError: (ProgrammingError) column "todo" does not exist }}} What does it mean TODO? Does alembic support sqlachemy boolean type?

Comments (4)

  1. Michael Bayer repo owner

    it means that autogenerate does not render the SQL text of a CheckConstraint just yet. A Boolean may have a CheckConstraint associated with it, if the backend only supports integers. I'm not sure why in your case it is actually spitting the constraint out, though, it should be implicit with the Boolean type, since some backends shouldn't be getting the constraint.

  2. Log in to comment