From 5196792dfc74eb2d6d7f951225a4a1de6db2fc72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 11 Sep 2020 18:45:00 +0200 Subject: [PATCH] `timestamps` creates `created_at` field. The `t.timestamps`, available since Rails 2.3, already creates the `created_at` column. Therefore, since Rails 6.0+ the test suite fails with the following error: ~~~ /usr/share/gems/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:372:in `column': you can't define an already defined column 'created_at'. (ArgumentError) from /usr/share/gems/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:411:in `timestamps' from /builddir/build/BUILD/test/helper.rb:114:in `block (2 levels) in ' ~~~ --- test/helper.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index cbe4374..fe1ef5a 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -106,7 +106,6 @@ ActiveRecord::Schema.define do t.string :name t.integer :age t.binary :avatar - t.datetime :created_at t.boolean :awesome t.string :preferences t.integer :alternative_id @@ -119,7 +118,6 @@ ActiveRecord::Schema.define do t.string :name t.integer :age t.binary :avatar - t.datetime :created_at t.boolean :awesome t.string :preferences t.integer :alternative_id -- 2.27.0