mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 10:30:01 +08: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…
Reference in New Issue
Block a user