Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't try to update the primary key sequence if it's a composite prim…

…ary key
  • Loading branch information...
commit f07a965fe9db3c10b879d9d797325da71778e4ca 1 parent 36a5826
@pjlegato authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/seed-fu/seeder.rb
  2. +1 −1  lib/seed-fu/version.rb
View
2  lib/seed-fu/seeder.rb
@@ -79,7 +79,7 @@ def constraint_conditions(data)
end
def update_id_sequence
- if @model_class.connection.adapter_name == "PostgreSQL"
+ if @model_class.connection.adapter_name == "PostgreSQL" && @model_class.primary_key.is_a?(String)
quoted_id = @model_class.connection.quote_column_name(@model_class.primary_key)
quoted_sequence = "'" + @model_class.sequence_name + "'"
@model_class.connection.execute(
View
2  lib/seed-fu/version.rb
@@ -1,4 +1,4 @@
module SeedFu
# The current version of Seed Fu
- VERSION = '2.0.1'
+ VERSION = '2.0.2'
end
Please sign in to comment.
Something went wrong with that request. Please try again.