Flowdock
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Superclass: Object

Represents the schema of an SQL table in an abstract way. This class provides methods for manipulating the schema representation.

Inside migration files, the t object in {create_table}[rdoc-ref:SchemaStatements#create_table] is actually of this type:

class SomeMigration < ActiveRecord::Migration[6.0]
  def up
    create_table :foo do |t|
      puts t.class  # => "ActiveRecord::ConnectionAdapters::TableDefinition"
    end
  end

  def down
    ...
  end
end
Show files where this class is defined (1 file)
Register or log in to add new notes.