public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Restore dump_schema_information connection adapter method
pd (author)
Sat May 03 23:31:36 -0700 2008
rick (committer)
Mon May 05 23:25:22 -0700 2008
commit  04d85548608eb42f2d7071daa4661c5eac3a552a
tree    fcd80d303339434460eb24e519ab01caa0b66107
parent  0052938ac5b8894b27fdb9f27b1ed39f0a9ea176
...
295
296
297
 
 
 
 
 
 
298
299
300
...
295
296
297
298
299
300
301
302
303
304
305
306
0
@@ -295,6 +295,12 @@ module ActiveRecord
0
       def structure_dump
0
       end
0
 
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")
0
+      end
0
+
0
       # Should not be called normally, but this operation is non-destructive.
0
       # The migrations module handles this automatically.
0
       def initialize_schema_migrations_table

Comments