ensure we have a bigint id
This commit is contained in:
parent
b804f0bec9
commit
49b48e1eb6
|
@ -0,0 +1,5 @@
|
|||
class IncreaseTwitterUserIdLength < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :twitter_user_infos, :twitter_user_id, :bigint
|
||||
end
|
||||
end
|
|
@ -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
|
Loading…
Reference in New Issue