rails5.1でprimary keyがBigIntにならない
rails 5.1からデフォルトでprimary keyがbigintになると聞いたけど、自分の環境ではbigintにならず、4bytes以上のidを保存しようとすると以下のようなエラーが出た。
rails 5.1 activemodel::type::integer with limit 4 bytes
色々調べた結果、SQLiteは対応してない模様。PostgreSQLとMySQLのみに対応しているとのこと。
【参考】 https://github.com/rails/rails/pull/26266
Per a conversation with @sgrif: changes default primary keys from
Integer to BIGINT for both Postgresql and MySQL. Leaves behavior
alone for SQLite since this database does not provide support for
BIGINT primary keys.
Author And Source
この問題について(rails5.1でprimary keyがBigIntにならない), 我々は、より多くの情報をここで見つけました https://qiita.com/komakomako/items/d8f60a79c0e3c2050247著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .