Permalink
Browse files

use the schema migration model to create a new record

  • Loading branch information...
1 parent 6c7b66f commit f3f8f0eb310bf8384f334c19943f9b15430402ca @tenderlove tenderlove committed Jan 12, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 activerecord/lib/active_record/migration.rb
View
3 activerecord/lib/active_record/migration.rb
@@ -761,8 +761,7 @@ def record_version_state_after_migrating(version)
Base.connection.delete stmt
else
@migrated_versions.push(version).sort!
- stmt = table.compile_insert table["version"] => version.to_s
- Base.connection.insert stmt
+ ActiveRecord::SchemaMigration.create!(:version => version.to_s)
end
end

0 comments on commit f3f8f0e

Please sign in to comment.