Browse files

Make sure clone_structure can load the results of dump_schema_informa…


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 <>

[#201 state:resolved]
  • Loading branch information...
1 parent 72ed17d commit 2183c220ada046993274ccdc6f1f86e9e8a3a5c6 @ssoroka ssoroka committed with NZKoz May 16, 2008
@@ -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}")
- { |v| "INSERT INTO #{sm_table} (version) VALUES ('#{v}');" }.join("\n")
+ { |v| "INSERT INTO #{sm_table} (version) VALUES ('#{v}');" }.join("\n\n")
# Should not be called normally, but this operation is non-destructive.

0 comments on commit 2183c22

Please sign in to comment.