Flowdock
method

change_column_null

Importance_0
Ruby on Rails latest stable (v5.2.3) - 0 notes - Class: ActiveRecord::ConnectionAdapters::MysqlAdapter

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.1.0) is shown here.

These similar methods exist in v5.2.3:

change_column_null(table_name, column_name, null, default = nil) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

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
Register or log in to add new notes.