title: ActiveRecord change column default value (not working)
body: <p>I've got a <code>companies</code> table in my database with two columns (<code>size</code> and <code>state</code>) that I wish to add default values to. Currently there is no default value and the columns are not set to <code>null: false</code>. I've tried using the <code>update_column</code> and <code>update_column_default</code> methods as outlined in the <a href="http://apidock.com/rails/ActiveRecord/ConnectionAdapters/SchemaStatements/change_column_default" rel="nofollow">docs</a>, but neither seems to be doing anything. I'm able to run the migration but there are no changes to the table.</p>
  
  <p>I've tried <code>update_column</code> like so:</p>
  
  <pre><code>class AddDefaultValuesToCompanies &lt; ActiveRecord::Migration
      def change
          def up
              change_column :companies, :state, :string, default: 'MA'
              change_column :companies, :size, :string, default: '1-10'
          end
  
          def down
              change_column :companies, :state, :string, default: nil
              change_column :companies, :size, :string, default: nil
          end
      end
  end
  </code></pre>
  
  <p>I've also tried using <code>update_column_default</code> like so:</p>
  
  <pre><code>class AddDefaultValuesToCompanies &lt; ActiveRecord::Migration
      def change
          def up
              change_column_default(:companies, :state, 'MA')
              change_column_default(:companies, :size, '1-10')
          end
  
          def down
              change_column_default(:companies, :state, nil)
              change_column_default(:companies, :size, nil)
          end
      end
  end
  </code></pre>
  
  <p>What am I missing here?</p>