1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
From 5196792dfc74eb2d6d7f951225a4a1de6db2fc72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 11 Sep 2020 18:45:00 +0200
Origin: https://github.com/rails/activemodel-serializers-xml/commit/5196792dfc74eb2d6d7f951225a4a1de6db2fc72
Bug: https://github.com/rails/activemodel-serializers-xml/pull/18/
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964952
Description: `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 <top (required)>'
~~~
---
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 @@ def verify_default_timezone_config
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 @@ def verify_default_timezone_config
t.string :name
t.integer :age
t.binary :avatar
- t.datetime :created_at
t.boolean :awesome
t.string :preferences
t.integer :alternative_id
|