mirror of
https://github.com/github/rails.git
synced 2026-02-06 12:15:17 -05:00
Make sure clone_structure can load the results of dump_schema_information
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]
This commit is contained in:
committed by
Michael Koziarski
parent
72ed17df44
commit
2183c220ad
@@ -302,7 +302,7 @@ module ActiveRecord
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user