diff options
author | Kyle Hargraves <philodespotos@gmail.com> | 2008-05-04 01:31:36 -0500 |
---|---|---|
committer | rick <rick@spacemonkey.local> | 2008-05-05 23:25:22 -0700 |
commit | 04d85548608eb42f2d7071daa4661c5eac3a552a (patch) | |
tree | fcd80d303339434460eb24e519ab01caa0b66107 | |
parent | 0052938ac5b8894b27fdb9f27b1ed39f0a9ea176 (diff) | |
download | rails-04d85548608eb42f2d7071daa4661c5eac3a552a.tar.gz rails-04d85548608eb42f2d7071daa4661c5eac3a552a.tar.bz2 rails-04d85548608eb42f2d7071daa4661c5eac3a552a.zip |
Restore dump_schema_information connection adapter method
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 6 |
1 files changed, 6 insertions, 0 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 6aae556d67..b556516572 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -295,6 +295,12 @@ module ActiveRecord 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 |