From 6d2105bb6327d75b936f09cd4c34222d82e9e722 Mon Sep 17 00:00:00 2001 From: "David A. Lee" Date: Wed, 9 Jan 2019 16:29:56 -0500 Subject: Specify the type for the auto-generated primary key Given the change to using `bigint` as type for auto-generated primary keys (as per https://github.com/rails/rails/pull/26266), I propose updating the Active Record Basics guide to explicitly state the type being used so as to avoid confusion as to the type of integer used, especially as the type can vary depending on the database used. --- guides/source/active_record_basics.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md index a67e2924d7..b0d4bbd2c0 100644 --- a/guides/source/active_record_basics.md +++ b/guides/source/active_record_basics.md @@ -105,9 +105,9 @@ depending on the purpose of these columns. fields that Active Record will look for when you create associations between your models. * **Primary keys** - By default, Active Record will use an integer column named - `id` as the table's primary key. When using [Active Record - Migrations](active_record_migrations.html) to create your tables, this column will be - automatically created. + `id` as the table's primary key (`bigint` for Postgres and MYSQL, `integer` + for SQLite). When using [Active Record Migrations](active_record_migrations.html) + to create your tables, this column will be automatically created. There are also some optional column names that will add additional features to Active Record instances: -- cgit v1.2.3