diff options
author | Steven Soroka <ssoroka78@gmail.com> | 2008-05-16 17:41:59 -0500 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-05-17 18:49:16 +1200 |
commit | 2183c220ada046993274ccdc6f1f86e9e8a3a5c6 (patch) | |
tree | 9d21384d2f282393aad8b787a37d8922613c95d9 /activerecord/lib/active_record/connection_adapters/abstract | |
parent | 72ed17df44e194674ec9a83a5504db53e3426a8e (diff) | |
download | rails-2183c220ada046993274ccdc6f1f86e9e8a3a5c6.tar.gz rails-2183c220ada046993274ccdc6f1f86e9e8a3a5c6.tar.bz2 rails-2183c220ada046993274ccdc6f1f86e9e8a3a5c6.zip |
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]
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index ac24e920fe..b57d0a3ef7 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -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. |