Skip to content

Instantly share code, notes, and snippets.

@hoffmanc
Created November 29, 2012 01:22
Show Gist options
  • Save hoffmanc/4166102 to your computer and use it in GitHub Desktop.
Save hoffmanc/4166102 to your computer and use it in GitHub Desktop.
ActiveRecord tries to do this on update_attributes call
SELECT 1 FROM `models` WHERE
(`models`.`id` = BINARY 'd178546e-39bc-11e2-8b8b-40406f66ce3e'
AND `models`.`id` != 'd178546e-39bc-11e2-8b8b-40406f66ce3e') LIMIT 1
create_table "models", :id => false, :force => true do |t|
t.datetime "scheduled_on"
t.datetime "responded_on"
t.integer "respondent_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "survey_instance_id", :limit => 36
t.string "id", :limit => 36
t.string "moment_type"
t.boolean "outside_schedule"
t.datetime "edited_at"
t.boolean "on_device", :default => false
t.integer "user_id"
end
add_index "random_moments", ["id"], :name => "index_random_moments_on_id"
add_index "random_moments", ["id"], :name => "random_moments_id_unique", :unique => true
add_index "random_moments", ["respondent_id"], :name => "index_random_moments_on_respondent_id"
add_index "random_moments", ["survey_instance_id"], :name => "index_random_moments_on_survey_instance_id"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment