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

310-postgres-add-comment-in-change #312

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

itsumura-h
Copy link
Owner

@itsumura-h itsumura-h commented Feb 8, 2025

Add support for null column comments and improve schema generation error handling

  • Extend the Column model by adding a new field isCommentNull to indicate when a column comment is intended to be null.
  • Update the JSON schema output in the toSchema proc to include the isCommentNull flag.
  • Overload the comment proc to handle a nil argument by setting isCommentNull to true.
  • Introduce new PostgreSQL query procs (addCommentColumn and addNullCommentColumn) to generate appropriate COMMENT queries based on whether a comment is provided or set to null.
  • Modify add and change column query functions to conditionally include comment queries using commentContent and isCommentNull.
  • Enhance schema generation in both PostgreSQL and SQLite by accepting a configurable schema file path (defaulting to the current directory) and adding robust error handling.
  • Update tests to verify the new behavior for column comments and schema generation.

…ror handling

- Extend the Column model by adding a new field `isCommentNull` to indicate when a column comment is intended to be null.
- Update the JSON schema output in the `toSchema` proc to include the `isCommentNull` flag.
- Overload the `comment` proc to handle a nil argument by setting `isCommentNull` to true.
- Introduce new PostgreSQL query procs (`addCommentColumn` and `addNullCommentColumn`) to generate appropriate COMMENT queries based on whether a comment is provided or set to null.
- Modify add and change column query functions to conditionally include comment queries using `commentContent` and `isCommentNull`.
- Enhance schema generation in both PostgreSQL and SQLite by accepting a configurable schema file path (defaulting to the current directory) and adding robust error handling.
- Update tests to verify the new behavior for column comments and schema generation.
@itsumura-h itsumura-h linked an issue Feb 8, 2025 that may be closed by this pull request
@itsumura-h itsumura-h changed the title Add support for null column comments and improve schema generation er… 310-postgres-add-comment-in-change Feb 8, 2025
@itsumura-h itsumura-h merged commit 14b6d7c into main Feb 8, 2025
5 checks passed
@itsumura-h itsumura-h deleted the 310-postgres-add-comment-in-change branch February 8, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgres add comment in change
1 participant