Skip to content

Commit

Permalink
Update frontend/packages/db-structure/src/parser/sql/postgresql/conve…
Browse files Browse the repository at this point in the history
…rter.ts

Co-authored-by: Ryota Sasazawa <[email protected]>
  • Loading branch information
hoshinotsuyoshi and sasamuku authored Dec 5, 2024
1 parent f1eb274 commit e5a04a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export const convertToDBStructure = (ast: RawStmtWrapper[]): DBStructure => {
if (!isList(objectNode)) return

// Handles statements like `COMMENT ON TABLE <table_name> IS '<comment>';`.
// NOTE: As far as I know, PostgreSQL only allows adding a comment to one table per statement,
// NOTE: PostgreSQL allows only one comment to be added to one table per statement,
// so we can reasonably assume the number of `<table_name>` elements is 1.
const item = objectNode.List?.items?.[0]
if (!item) return
Expand Down

0 comments on commit e5a04a4

Please sign in to comment.