aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-05-06 10:04:25 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-05-06 10:04:25 +0100
commit4a0118d7278687b534edf1e1184d6858cb4d29b8 (patch)
treeb1e776b31ae4cde6f0cd0c29be5b9f4fdfcfdaaa /activerecord
parent2037cdda0e82bb77676ecdd3c312a22e29a2b070 (diff)
parent04f52219f11944e50555dc59917c73c99581dac0 (diff)
downloadrails-4a0118d7278687b534edf1e1184d6858cb4d29b8.tar.gz
rails-4a0118d7278687b534edf1e1184d6858cb4d29b8.tar.bz2
rails-4a0118d7278687b534edf1e1184d6858cb4d29b8.zip
Merge commit 'mainstream/master'
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb6
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