method
change_column_null
change_column_null(table_name, column_name, null, default = nil)
public
Hide source
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 678 def change_column_null(table_name, column_name, null, default = nil) column = column_for(table_name, column_name) unless null || default.nil? execute("UPDATE #{quote_table_name(table_name)} SET #{quote_column_name(column_name)}=#{quote(default)} WHERE #{quote_column_name(column_name)} IS NULL") end change_column table_name, column_name, column.sql_type, :null => null end