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.



45
46
47
48
49
50
# File 'lib/dm-migrations/sql/mysql.rb', line 45

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