• Patrick Bair's avatar
    Add migration helper to create table with CHECKs · c6c17bcf
    Patrick Bair authored
    Add a new migration helper that allows the caller to define CHECK
    constraints in the table definition block. This can be used to avoid
    having to `disable_ddl_transaction!` and add the check constraints using
    the existing helper, which cannot be used inside a transaction block.
    Also provides a convenience method to more easily add CHECK constraints
    for text limits.
    c6c17bcf
table_schema_helpers.rb 4.7 KB