Browse files

Restore dump_schema_information connection adapter method

  • Loading branch information...
1 parent 0052938 commit 04d85548608eb42f2d7071daa4661c5eac3a552a @pd pd committed with rick May 4, 2008
View
6 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -295,6 +295,12 @@ def index_name(table_name, options) #:nodoc:
def structure_dump
end
+ 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")
+ end
+
# Should not be called normally, but this operation is non-destructive.
# The migrations module handles this automatically.
def initialize_schema_migrations_table

0 comments on commit 04d8554

Please sign in to comment.