Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- [#885](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/885) Fix the quoting of ActiveModel attributes
- [#890](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/890) Fix removal of invalid ordering from select statements
- [#881](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/881) Dump column collation to schema.rb and allow collation changes using column_change
- [#892](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/892) Add support for if_exists on remove_column

#### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ def rename_table(table_name, new_name)
rename_table_indexes(table_name, new_name)
end

def remove_column(table_name, column_name, type = nil, options = {})
def remove_column(table_name, column_name, type = nil, **options)
raise ArgumentError.new("You must specify at least one column name. Example: remove_column(:people, :first_name)") if column_name.is_a? Array
return if options[:if_exists] == true && !column_exists?(table_name, column_name)

remove_check_constraints(table_name, column_name)
remove_default_constraint(table_name, column_name)
Expand Down