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

Add change_column_comment and change_table_comment table schema definition #51661

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mechnicov
Copy link
Contributor

Motivation / Background

This Pull Request has been created because these methods are missing, but could be helpful for bulk changes of the table. This will allow you to add comment(s) to the table and/or to the column(s) using single block, improving readability and performance because of single query

Detail

This Pull Request adds change_column_comment and change_table_comment for change_table definition

change_table :users, bulk: true do |t|
  t.change_column_comment :login, "Username"
  t.change_table_comment "Usual users"
end

Additional information

This was intended as non-breaking change

Checklist

  • This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@mechnicov
Copy link
Contributor Author

May be t.column_comment (or just t.comment) and t.table_comment is better

@mechnicov mechnicov force-pushed the add-change-comment-schema-definition branch 4 times, most recently from 332dc6e to 81b37be Compare April 27, 2024 09:42
@mechnicov mechnicov force-pushed the add-change-comment-schema-definition branch from 81b37be to 93bb278 Compare May 2, 2024 05:04
@mechnicov
Copy link
Contributor Author

Hello @rafaelfranca

I see you merged similar commit

f84e1eb

Please review my PR as well. Thank you

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.

None yet

1 participant