-
Notifications
You must be signed in to change notification settings - Fork 22.2k
Closed
Labels
Description
Steps to reproduce
When creating a new migration in Rails 6:
class CreateProducts < ActiveRecord::Migration[6.0]
def change
create_table :products do |t|
t.string :name
t.timestamps
end
end
end
A new option, precision is created:
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
The change was introduced in this PR:
Following this discussion:
It seems that, initially, the goal was to solve a problem with MySQL version updates, but for some reason, the subsequent PR targetted all Databases, including Postgres.
My question is: Is there any good reason to explicitly specify the precision of the timestamps by default in Postgres? If so, would it be possible to document the reasons somewhere?
System configuration
Rails version: 6.0
Ruby version: 2.6.3
Reactions are currently unavailable