Skip to content

Instantly share code, notes, and snippets.

@poteto
Created September 15, 2012 14:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poteto/3728358 to your computer and use it in GitHub Desktop.
Save poteto/3728358 to your computer and use it in GitHub Desktop.
[rails] postgres bigint migration
# working with big integers over 4 bytes
# see http://www.postgresql.org/docs/9.2/interactive/datatype-numeric.html#DATATYPE-NUMERIC-TABLE
class CreateModel < ActiveRecord::Migration
def change
create_table :model do |t|
t.column :xxx, :bigint
t.timestamps
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment