Rails Migration: Bigint on PostgreSQL seems to be failing?

前端 未结 5 2095
一向
一向 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:12

    For some reason the create table doesn't like bigint. You can, however do it with add_columm using the bigint data type:

    add_column :table_name, :really_big_int, :bigint
    

    Then you don't need that limit stuff.

提交回复
热议问题