diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-05-06 20:53:56 +1200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-05-06 20:53:56 +1200 |
commit | a08004a9a7d4c93c39f9693f6406ecb70d6a38c0 (patch) | |
tree | 531584bf588a3b288ab14a8e16540ab947a0ec45 /activerecord | |
parent | c26d10563eaa29961ae895a9fbe3afae7d24a9b1 (diff) | |
parent | 04f52219f11944e50555dc59917c73c99581dac0 (diff) | |
download | rails-a08004a9a7d4c93c39f9693f6406ecb70d6a38c0.tar.gz rails-a08004a9a7d4c93c39f9693f6406ecb70d6a38c0.tar.bz2 rails-a08004a9a7d4c93c39f9693f6406ecb70d6a38c0.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activerecord')
-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 |