From 58cfa9259d1e236231c2d8c6b338306d9dc3c06c Mon Sep 17 00:00:00 2001 From: Sam Bostock Date: Tue, 10 Aug 2021 17:05:40 -0400 Subject: [PATCH] Add precision: 6 to books.{created,updated}_at test table Some tests will require precision. --- activerecord/test/schema/schema.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 87bdf91ba4..3fbd8570d4 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -119,8 +119,13 @@ ActiveRecord::Schema.define do t.index :isbn, where: "published_on IS NOT NULL", unique: true t.index "(lower(external_id))", unique: true if supports_expression_index? - t.datetime :created_at - t.datetime :updated_at + if supports_datetime_with_precision? + t.datetime :created_at, precision: 6 + t.datetime :updated_at, precision: 6 + else + t.datetime :created_at + t.datetime :updated_at + end t.date :updated_on end