Browse files

anually insert version record into the schema_seeds table to avoid cl…

…ash with ActiveRecord#version magic attribute.
  • Loading branch information...
1 parent 0b5b1e5 commit adaf5c48b1ab60fb1dffb2060db1a487a249a0d6 @midas committed Jul 27, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/genesis/seeder.rb
View
3 lib/genesis/seeder.rb
@@ -132,7 +132,8 @@ def self.run_seed( version, metadata )
log_entry_start( class_name )
klass.send( @method )
if @method == :up
- SchemaSeed.create!( :version => version )
+ # SchemaSeed.create!( :version => version )
+ ActiveRecord::Base.connection.execute( "INSERT INTO schema_seeds(`version`) VALUES('#{version}');" )
else
schema_seed = SchemaSeed.find( :first, :conditions => { :version => version } )
schema_seed.destroy unless schema_seed.nil?

0 comments on commit adaf5c4

Please sign in to comment.