method
remove_unique_constraint
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::PostgreSQL::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.