Flowdock
method

add_column

Importance_0
v2.2.1 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::SQLiteAdapter
add_column(table_name, column_name, type, 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/connection_adapters/sqlite_adapter.rb, line 217
      def add_column(table_name, column_name, type, options = {}) #:nodoc:
        if @connection.respond_to?(:transaction_active?) && @connection.transaction_active?
          raise StatementInvalid, 'Cannot add columns to a SQLite database while inside a transaction'
        end
        
        super(table_name, column_name, type, options)
        # See last paragraph on http://www.sqlite.org/lang_altertable.html
        execute "VACUUM"
      end
Register or log in to add new notes.