Skip to content

Commit

Permalink
Update remove_column docs for how indexes are changed
Browse files Browse the repository at this point in the history
Different databases have different behaviour when it comes to dropping a
column that is part of a composite indexes. For example, MySQL and
OracleDB will simply remove the column from the index. However
PostgresQL will remove any index that is using that column.
  • Loading branch information
AnotherJoSmith committed Nov 29, 2021
1 parent 8a419e8 commit bdfc622
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -656,7 +656,8 @@ def remove_columns(table_name, *column_names, type: nil, **options)
# The +type+ and +options+ parameters will be ignored if present. It can be helpful
# to provide these in a migration's +change+ method so it can be reverted.
# In that case, +type+ and +options+ will be used by #add_column.
# Indexes on the column are automatically removed.
# Depending on the database you're using, indexes using this column may be
# automatically removed or modified to remove this column from the index.
#
# If the options provided include an +if_exists+ key, it will be used to check if the
# column does not exist. This will silently ignore the migration rather than raising
Expand Down

0 comments on commit bdfc622

Please sign in to comment.