Forked from bjhess/adjust_twitter_id_to_unsigned_bigint.rb
Created
June 3, 2009 23:11
-
-
Save kylebragger/123319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you really want safety from Twitter blowing up, this will get you | |
# to 18,446,744,073,709,551,615 tweets. (Remember, mediumint is smaller | |
# than int.) (http://dev.mysql.com/doc/refman/4.1/en/numeric-types.html) | |
class AdjustTwitterIdToUnsignedBigint < ActiveRecord::Migration | |
def self.up | |
change_column :twitter_messages, :twitter_id, "bigint unsigned" | |
end | |
def self.down | |
change_column :twitter_messages, :twitter_id, :integer | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will get you to about 4.3 billion tweets | |
# (http://dev.mysql.com/doc/refman/4.1/en/numeric-types.html) | |
class AdjustTwitterIdToUnsignedInt < ActiveRecord::Migration | |
def self.up | |
change_column :twitter_messages, :twitter_id, "integer unsigned" | |
end | |
def self.down | |
change_column :twitter_messages, :twitter_id, :integer | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment