Skip to content

Support CHECK constraints in migrations and schema.rb #23083

@mpartel

Description

@mpartel

As mentioned at the bottom of this RailsGuide section, CHECK constraints cannot be expressed in schema.rb. Please support them.

A syntax suggestion:

    add_check 'my_table', 'a < b', name: 'a_less_than_b'
    remove_check 'my_table', 'a_less_than_b'

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