method

change_table

rails latest stable - Class: ActiveRecord::Migration::CommandRecorder
change_table(table_name, **options)
public

No documentation available.

# File activerecord/lib/active_record/migration/command_recorder.rb, line 132
      def change_table(table_name, **options) # :nodoc:
        if delegate.supports_bulk_alter? && options[:bulk]
          recorder = self.class.new(self.delegate)
          recorder.reverting = @reverting
          yield recorder.delegate.update_table_definition(table_name, recorder)
          commands = recorder.commands
          @commands << [:change_table, [table_name], -> t { bulk_change_table(table_name, commands) }]
        else
          yield delegate.update_table_definition(table_name, self)
        end
      end