Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure clone_structure can load the results of dump_schema_informa…

…tion

SchemaStatements#dump_schema_information joins inserts with a single \n, but is later split on \n\n, and fails when trying to execute all the inserts as a single sql statement.

Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#201 state:resolved]
  • Loading branch information...
commit 2183c220ada046993274ccdc6f1f86e9e8a3a5c6 1 parent 72ed17d
Steven Soroka ssoroka authored NZKoz committed
2  activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
View
@@ -302,7 +302,7 @@ def structure_dump
def dump_schema_information #:nodoc:
sm_table = ActiveRecord::Migrator.schema_migrations_table_name
migrated = select_values("SELECT version FROM #{sm_table}")
- migrated.map { |v| "INSERT INTO #{sm_table} (version) VALUES ('#{v}');" }.join("\n")
+ migrated.map { |v| "INSERT INTO #{sm_table} (version) VALUES ('#{v}');" }.join("\n\n")
end
# Should not be called normally, but this operation is non-destructive.
Please sign in to comment.
Something went wrong with that request. Please try again.