instance method
structure_dump
Ruby on Rails 3.1.12
Since v3.1.12 Last seen in v3.1.12Signature
structure_dump()
SCHEMA STATEMENTS ========================================
Source
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 366
def structure_dump
if supports_views?
sql = "SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'"
else
sql = "SHOW TABLES"
end
select_all(sql).inject("") do |structure, table|
table.delete('Table_type')
structure += select_one("SHOW CREATE TABLE #{quote_table_name(table.to_a.first.last)}")["Create Table"] + ";\n\n"
end
end
Defined in activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb line 366
· View on GitHub
· Improve this page
· Find usages on GitHub