-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[9.x] Add ability to add table comments for MySQL and Postgres #42401
Conversation
Will this be accepted into 8.x as well if I raise a PR to that branch too? |
@andrewbroberg 8.x is closed for new features. |
@andrewbroberg This is great...! And funny. At work today while reviewing a colleague's PR, we started to talk about how it would be nice to be able to add comments to tables and that it was a surprise that it wasn't already in the framework. 🤣 Thanks for this contribution...! You save me a little work in trying to do it myself...and gave me and my team a few laughs, too. 🤓 |
@telkins sounds like perfect timing! |
Interestingly this has been proposed and rejected in numerous PRs in the past. Happy to finally see it merged though! |
What happens if I create a Migration with Does this create an exception, or is the comment call ignored? Are there tests for this boundary condition? P.S. My vote is that comments on tables or columns should be ignored if the database doesn't support it, but I recognise that others may believe the opposite. |
@Sophist-UK if I am reading it correctly, it will be silently ignored if it doesn't exist on the driver. |
@andrewbroberg That is exactly what I would hope would happen. 😃 |
This PR adds the ability to add a comment to a table in MySQL and Postgres
This feature is useful for us so that our Business Intelligence team can better understand our database schema. We can already add comments on columns, adding comments on the table itself will also be beneficial in helping describe it.