Type:
Class
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
is actually of this type:
1 2 3 4 5 6 7 8 9 10 11 | class SomeMigration < ActiveRecord::Migration def up create_table :foo do |t| puts t. class # => "ActiveRecord::ConnectionAdapters::TableDefinition" end end def down ... end end |
The table definitions The Columns are stored as a ColumnDefinition in the
columns
attribute.