Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
fix: updateComments()
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Kloubert committed Feb 21, 2024
1 parent e0b1bd7 commit fd62da6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log (@egomobile/orm-pg)

## 0.22.0
## 0.22.1

- add `updateComments()` function
- update to version `^0.15.0` of [node-orm](https://github.com/egomobile/node-orm)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egomobile/orm-pg",
"version": "0.22.0",
"version": "0.22.1",
"description": "A PostgreSQL data adapter and other utilities for @egomobile/orm module.",
"main": "lib/index.js",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/updateComments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ export async function updateComments(options: IUpdateCommentsOptions) {
if (tableColumnComment !== "") {
const escapedTableColumnComment = escapeStringForQuery(tableColumnComment);

updateTableColumnCommentQuery = `COMMENT ON TABLE ${fullColumnName} IS '${escapedTableColumnComment}';`;
updateTableColumnCommentQuery = `COMMENT ON COLUMN ${fullColumnName} IS '${escapedTableColumnComment}';`;
}
else {
updateTableColumnCommentQuery = `COMMENT ON TABLE ${fullColumnName} IS NULL;`;
updateTableColumnCommentQuery = `COMMENT ON COLUMN ${fullColumnName} IS NULL;`;
}

await context.query(updateTableColumnCommentQuery);
Expand Down

0 comments on commit fd62da6

Please sign in to comment.