rails3 bigint primary key

前端 未结 6 1539
小鲜肉
小鲜肉 2020-12-11 03:53

I would like to create a bigint (or string or whatever that is not int) typed primary key field under Rails 3.

I have a given

6条回答
  •  时光说笑
    2020-12-11 04:01

    For those of you who came here (like I did) in an effort to figure out how to make a custom id column that uses bigint instead of int, what I didn't realize is that for Rails 5.1 and above, bigint is the default type for id

    https://github.com/rails/rails/pull/26266

提交回复
热议问题