Skip to content

Commit

Permalink
MongoDB: Fix indentation in prettified SQL output of migr8 translate
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Aug 14, 2024
1 parent 6c32d71 commit 135188b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- MongoDB: Strip single leading underscore character from all top-level fields
- MongoDB: Map OID types to CrateDB TEXT columns
- MongoDB: Make `migr8 extract` and `migr8 export` accept the `--limit` option
- MongoDB: Fix indentation in prettified SQL output of `migr8 translate`

## 2024/07/25 v0.0.16
- `ctk load table`: Added support for MongoDB Change Streams
Expand Down
2 changes: 1 addition & 1 deletion cratedb_toolkit/io/mongodb/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def indent_sql(query: str) -> str:
if len(line) >= 1:
if line[-1] == "(":
indent += 4
elif line[-1] == ")":
elif line[-1] == ")" or line[-2:] == "),":
indent -= 4
return "\n".join(lines)

Expand Down

0 comments on commit 135188b

Please sign in to comment.