Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make compatible with more databases.

- Use quote_column_name in queries.
  • Loading branch information...
commit fd7bb096c1681c73ced59341cb5557e4faf86d12 1 parent 012401f
@midas authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/genesis/seeder.rb
View
3  lib/genesis/seeder.rb
@@ -136,8 +136,7 @@ def self.run_seed( version, metadata )
log_entry_start( class_name )
klass.send( @method )
if @method == :up
- # SchemaSeed.create!( :version => version )
- ActiveRecord::Base.connection.execute( "INSERT INTO schema_seeds(`version`) VALUES('#{version}');" )
+ ActiveRecord::Base.connection.execute( "INSERT INTO schema_seeds(#{ActiveRecord::Base.connection.quote_column_name 'version'}) VALUES('#{version}');" )
else
schema_seed = SchemaSeed.find( :first, :conditions => { :version => version } )
schema_seed.destroy unless schema_seed.nil?
Please sign in to comment.
Something went wrong with that request. Please try again.