Skip to content
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

Fix invalid schema dump when primary key column has a comment #36384

Merged

Conversation

guigs
Copy link
Contributor

@guigs guigs commented Jun 3, 2019

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). I've submitted a proposal to fix this on #36385.

Fixes #29966

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
@guigs guigs force-pushed the fix-invalid-schema-when-pk-column-has-comment branch from 5ebb9ef to 49f3104 Compare June 3, 2019 11:36
@kamipo kamipo merged commit c926ca4 into rails:master Jun 3, 2019
@guigs
Copy link
Contributor Author

guigs commented Jun 3, 2019

Thanks @kamipo! Should we backport #36373 and this to 5.2?

kamipo added a commit that referenced this pull request Jun 3, 2019
…n-has-comment

Fix invalid schema dump when primary key column has a comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SchemaDumper mixes table comment and primary key comment
2 participants