Skip to content

sqlalchemy.sql.expression.false() doesn't render to 0 on sqlite #2368

Closed
@sqlalchemy-bot

Description

@sqlalchemy-bot
Collaborator

Migrated issue, originally created by MartinH (@dwt)

Thus creating a Column('foo', Boolean, server_default=sqlalchemy.sql.expression.false()) will trigger an error as the Boolean type adds a check constraint for 1 or 0 (as on sqlite there are only integers, no booleans).

I've tried sqlalchemy.func.false() too, but that generates the string 'false()' which also breaks.

Activity

sqlalchemy-bot

sqlalchemy-bot commented on Jan 18, 2012

@sqlalchemy-bot
CollaboratorAuthor

Michael Bayer (@zzzeek) wrote:

wow, somehow I didn't get an email for this ticket, will look soon.

sqlalchemy-bot

sqlalchemy-bot commented on Jan 18, 2012

@sqlalchemy-bot
CollaboratorAuthor

Michael Bayer (@zzzeek) wrote:

OK these two constructs have not been widely published so were somewhat forgotten. In 8c05a3b I moved them to be accessible via sqlalchemy.sql and also got sqlite dialect to render to 0 and 1.

sqlalchemy-bot

sqlalchemy-bot commented on Jan 18, 2012

@sqlalchemy-bot
CollaboratorAuthor

Changes by Michael Bayer (@zzzeek):

  • removed labels: access
  • added labels: sqlite
  • set milestone to "0.7.5"
  • changed status to closed
added this to the 0.7.5 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

    Labels

    bugSomething isn't workingsqlite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sqlalchemy-bot

        Issue actions

          sqlalchemy.sql.expression.false() doesn't render to 0 on sqlite · Issue #2368 · sqlalchemy/sqlalchemy