method

remove_unique_constraint

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: SchemaStatements
remove_unique_constraint(table_name, column_name = nil, **options) public

Removes the given unique constraint from the table.

remove_unique_constraint :sections, name: "unique_position"

The column_name parameter will be ignored if present. It can be helpful to provide this in a migration’s change method so it can be reverted. In that case, column_name will be used by #add_unique_constraint.

Show source
Register or log in to add new notes.