Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed contact request migration so it doesn't break mysql

  • Loading branch information...
commit 42b296c8bf990e5fef5a6406dd374afe71150590 1 parent ed5bfb1
@rapind authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 db/migrate/20120312231612_create_contact_requests.rb
View
4 db/migrate/20120312231612_create_contact_requests.rb
@@ -9,8 +9,8 @@ def change
t.timestamps
end
- # We don't want to start at 0.
- execute "SELECT setval('contact_requests_id_seq', #{(rand(999) + 1000)});"
+ # We don't want to start at 0. TODO - change this to also work with MySQL.
+ execute("SELECT setval('contact_requests_id_seq', #{(rand(999) + 1000)});") rescue nil
add_index :contact_requests, :read
add_index :contact_requests, :email
Please sign in to comment.
Something went wrong with that request. Please try again.