Module: EnhancedMySQLTasks::SchemaStatements
- Defined in:
- lib/enhanced_mysql_tasks/schema_statements.rb
Instance Method Summary collapse
Instance Method Details
#dump_schema_information ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/enhanced_mysql_tasks/schema_statements.rb', line 3 def dump_schema_information sm_table = ActiveRecord::Migrator.schema_migrations_table_name sql = String.new sql << "INSERT INTO #{sm_table} (version) VALUES\n" sql << ActiveRecord::SchemaMigration.order('version').map { |sm| "('#{sm.version}')" }.join(",\n") sql << ";\n" end |