New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ridgepole always changes datetime
columns after updating ActiveRecord to v7.0
#381
Comments
Can you post the results of |
Here is the result of pg_dump blog
|
I found adding diff a/Schemafile b/Schemafile
--- a/Schemafile
+++ b/Schemafile
@@ -1,5 +1,5 @@
create_table :articles do |t|
t.string :title
- t.datetime :published_at
- t.timestamps
+ t.datetime :published_at, precision: nil
+ t.timestamps precision: nil
end $ bundle exec ridgepole -c '{"adapter":"postgresql","database":"blog"}' -a
Apply `Schemafile`
No change Since the default precision of
ActiveRecord schema dump avoids this problem by adding the version to schema dump.
I think this is an incompatibility problem of ActiveRecord v7.0, not a Ridgepole problem. |
Also added note about datetime type to README. 6995092 |
Thank you 🙏 |
I'm sorry. Another problem on
datetime
columns of ActiveRecord v7.0 remains even after #380.After updating ActiveRecord from v6.1 to v7.0, the
ridgepole -a
command changesdatetime
columns every time.Steps to reproduce
First, with ActiveRecord v6.1:
It's OK, but after updating ActiveRecord to v7.0,
change_column
fordatetime
columns runs on everyridgepole -a
command.System configuration
The text was updated successfully, but these errors were encountered: