Skip to content

Conversation

voxik
Copy link
Contributor

@voxik voxik commented Sep 11, 2020

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)>'

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)>'
~~~
@kaspth kaspth merged commit 694f407 into rails:master Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants