Rails Migration: Bigint on PostgreSQL seems to be failing?

前端 未结 5 2098
一向
一向 2020-12-05 18:58

Trying to create a table with a bigint column creates a standard integer column instead. What could be going wrong? I don\'t know where to start looking.

I\'m using

5条回答
  •  无人及你
    2020-12-05 19:20

    I was able to create a bigint using t.column. This is useful if you want to control the column order in the table.

    create_table :table_name do |t|
      t.string :other_column
      t.column :really_big_int, :bigint
      .
      .
      t.timestamps
    end
    

    I'm using Rails 3.2.12 with pg gem version 0.15.1 (x86-mingw32).

提交回复
热议问题