rails update column migration code example
Example 1: change column rails example
def change
change_column(:table_name, :column_name, :new_type)
end
Example 2: rails migration update column default value
class MigrationName < ActiveRecord::Migration
def change
change_column :my_table, :my_column, :data_type, deafult: "value"
end
end