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
SchemaDumper mixes table comment and primary key comment #29966
Comments
I was checking against 5.1. |
Hey, I'm still having this issue with Rails 5.2.3 and also on master. I just had to modify the test to create pk with type Looks like if pk is type bigint it ignores all other options for column, including the |
The problem is that a rails/activerecord/lib/active_record/schema_dumper.rb Lines 127 to 130 in 1da0e25
Then another :comment option is added for the table in rails/activerecord/lib/active_record/schema_dumper.rb Lines 137 to 140 in 1da0e25
|
Before this fix it would either generate an invalid schema, passing `comment` option twice to `create_table`, or it move the comment from primary key column to the table if table had no comment when the dump was generated. The situation now is that a comment on primary key will be ignored (not present on schema). Fixes rails#29966
Steps to reproduce
Expected behavior
dumped schema should be:
Actual behavior
dumped schema is:
System configuration
Rails version: master
Ruby version: 2.4.0-p0
The text was updated successfully, but these errors were encountered: