public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
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]
ssoroka (author)
Fri May 16 15:41:59 -0700 2008
NZKoz (committer)
Fri May 16 23:49:16 -0700 2008
commit  2183c220ada046993274ccdc6f1f86e9e8a3a5c6
tree    9d21384d2f282393aad8b787a37d8922613c95d9
parent  72ed17df44e194674ec9a83a5504db53e3426a8e
...
302
303
304
305
 
306
307
308
...
302
303
304
 
305
306
307
308
0
@@ -302,7 +302,7 @@
0
       def dump_schema_information #:nodoc:
0
         sm_table = ActiveRecord::Migrator.schema_migrations_table_name
0
         migrated = select_values("SELECT version FROM #{sm_table}")
0
- migrated.map { |v| "INSERT INTO #{sm_table} (version) VALUES ('#{v}');" }.join("\n\n")
0
+ migrated.map { |v| "INSERT INTO #{sm_table} (version) VALUES ('#{v}');" }.join("\n\n")
0
       end
0
 
0
       # Should not be called normally, but this operation is non-destructive.

Comments

    No one has commented yet.