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.