method

change_table

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: CommandRecorder
change_table(table_name, **options) 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/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
Register or log in to add new notes.