mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -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:
parent
72ed17df44
commit
2183c220ad
1 changed files with 1 additions and 1 deletions
|
@ -302,7 +302,7 @@ module ActiveRecord
|
||||||
def dump_schema_information #:nodoc:
|
def dump_schema_information #:nodoc:
|
||||||
sm_table = ActiveRecord::Migrator.schema_migrations_table_name
|
sm_table = ActiveRecord::Migrator.schema_migrations_table_name
|
||||||
migrated = select_values("SELECT version FROM #{sm_table}")
|
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
|
end
|
||||||
|
|
||||||
# Should not be called normally, but this operation is non-destructive.
|
# Should not be called normally, but this operation is non-destructive.
|
||||||
|
|
Loading…
Reference in a new issue