mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
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
|
10
spec/models/twitter_user_info_spec.rb
Normal file
10
spec/models/twitter_user_info_spec.rb
Normal file
@ -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…
x
Reference in New Issue
Block a user