Skip to content

Add check constraints at table-alter time #178

Open

Description

@louwers

Quoting the documentation.

SQLite3 supports specifying check constraints on the table or on the column definition. We currently only support adding a check constraint via a column definition, since the table definition approach only works at table-creation time and cannot be added at table-alter time.

Just wanted to let you know that as of SQLite 3.53.0 this is possible.

Enhance ALTER TABLE to permit adding and removing NOT NULL and CHECK constraints.

Activity

  1. warmwaffles commented on Apr 30, 2026

    @warmwaffles
    Member

    OOO I did not catch that in the release notes. I'll get support for that added soon.

  2. louwers commented on Apr 30, 2026

    @louwers
    Author

    Yeah I am not even a user, but I thought you might want to know. :)

  3. mochaaP commented on Sep 30, 2026

    @mochaaP
    Contributor

    Hi, I'm willing to work on this. Do you accept PRs?

  4. mochaaP commented on Sep 30, 2026

    @mochaaP
    Contributor

    see mochaa/main for latest changes.

  5. warmwaffles commented on Sep 30, 2026

    @warmwaffles
    Member

    Do you accept PRs?

    Yes 🤣 and if you have anything else you want to propose updating or changing, you are free to push.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions