ruby on rails - Change the default value for table column with migration - Stack Overflow

PHOTO EMBED

Thu Aug 27 2020 16:52:41 GMT+0000 (Coordinated Universal Time)

Saved by @ludaley #rb

class ChangeDefaultvalueForHideSeasonSelector < ActiveRecord::Migration 
  def change 
    change_column_default :plussites, :hide_season_selector, true 
  end
end
content_copyCOPY

https://stackoverflow.com/questions/42668391/change-the-default-value-for-table-column-with-migration