Skip to content

Boolean like Enum for all other #1589

Closed
@sqlalchemy-bot

Description

@sqlalchemy-bot
Collaborator

Migrated issue, originally created by Anonymous

"Enum type now works using VARCHAR + CHECK constraint for all other"
Now SA uses SMALLINT without CHECK to create Boolean columns in dialects not having native BOOLEAN type. I suggest using CHECK (value IN (0,1)) for Boolean too "for all others".

Activity

sqlalchemy-bot

sqlalchemy-bot commented on Dec 6, 2009

@sqlalchemy-bot
CollaboratorAuthor

Michael Bayer (@zzzeek) wrote:

Did a refactoring of the ENUM logic to simplify in f9cb6f5, the Boolean change is in 7dc4df8. This includes removing all of the dialect specific Boolean types from currently supported dialects and putting common logic into types.Boolean. The whole feature isn't supported on MySQL since they don't have CHECK constraint.

sqlalchemy-bot

sqlalchemy-bot commented on Dec 6, 2009

@sqlalchemy-bot
CollaboratorAuthor

Changes by Michael Bayer (@zzzeek):

  • removed labels: bug
  • added labels: feature
  • changed status to closed
added this to the 0.6.0 milestone on Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sqlalchemy-bot

        Issue actions

          Boolean like Enum for all other · Issue #1589 · sqlalchemy/sqlalchemy