Class: SQL::Mysql::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/dm-migrations/sql/mysql.rb

Instance Method Summary collapse

Constructor Details

#initialize(adapter, table_name) ⇒ Table

Returns a new instance of Table.



37
38
39
40
41
42
# File 'lib/dm-migrations/sql/mysql.rb', line 37

def initialize(adapter, table_name)
  @columns = []
  adapter.table_info(table_name).each do |col_struct|
    @columns << SQL::Mysql::Column.new(col_struct)
  end
end