From a16528f715f49531c6013dde741fcba8182202b6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 12 Sep 2005 05:33:18 +0000 Subject: Added dump of schema version to the db_structure_dump task for databases that support migrations #1835 [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/migration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/migration.rb') diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 6f9b0ee2b4..9cde37548d 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -170,7 +170,7 @@ module ActiveRecord end def current_version - Base.connection.select_one("SELECT version FROM schema_info")["version"].to_i + (Base.connection.select_one("SELECT version FROM schema_info") || {})["version"].to_i end end -- cgit v1.2.3