Skip to content

Support validate_check_constraint on Migration/ChangeColumnNull #23

@lucasmazza

Description

@lucasmazza

I'm adding the gem to our app and testing it against existing migrations, and I noticed that Migration/ChangeColumnNull throws false positives against migrations using validate_check_constraint instead of validate_constraint, like in the following example:

class ReplaceNotNullConstraintOnUsersName < ActiveRecord::Migration[7.0]
  def change
    validate_check_constraint :users, name: :users_name_is_not_null
    change_column_null :users, :name, false
    remove_check_constraint :users, name: :users_name_is_not_null
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions