diff --git a/db/migrate/20131122064921_increase_twitter_user_id_length.rb b/db/migrate/20131122064921_increase_twitter_user_id_length.rb new file mode 100644 index 00000000000..65cb13ce3e1 --- /dev/null +++ b/db/migrate/20131122064921_increase_twitter_user_id_length.rb @@ -0,0 +1,5 @@ +class IncreaseTwitterUserIdLength < ActiveRecord::Migration + def change + change_column :twitter_user_infos, :twitter_user_id, :bigint + end +end diff --git a/spec/models/twitter_user_info_spec.rb b/spec/models/twitter_user_info_spec.rb new file mode 100644 index 00000000000..be6d28a7bbb --- /dev/null +++ b/spec/models/twitter_user_info_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper' + +describe TwitterUserInfo do + it "does not overflow" do + id = 22019458041 + info = TwitterUserInfo.create!(user_id: -1, screen_name: 'sam', twitter_user_id: id) + info.reload + info.twitter_user_id.should == id + end +end