Last Updated: February 25, 2016
·
172
· dorkrawk

Rails Migration To Update postgress array column

When writing a Rails migration to update a column that uses postgres array, you need to include the "array: true" param:

update_column :table_name, :col_name, :integer, array: true, null: false, default '{}'