Skip to content

Commit d4de009

Browse files
committed
fix: dump arguments not passed as expected
1 parent 70b1c11 commit d4de009

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

padmy/run.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,9 @@ def dump_main(
178178
database: str = Option(..., "--db", help="Database to dump"),
179179
schemas: list[str] = Option(..., "--schemas", help="Schemas to dump"),
180180
with_grants: bool = Option(False, "--with-grants", help="Include owner and privileges"),
181-
with_comments: bool = Option(True, "--with-comments", help="Include comments"),
182-
schema_only: bool = Option(True, "--schema-only", help="Dump only schema, no data"),
181+
with_comments: bool = Option(False, "--with-comments", help="Include comments"),
182+
schema_only: bool = Option(False, "--schema-only", help="Dump only schema, no data"),
183+
no_owner: bool = Option(False, "--no-owner", help="Exclude ownership statements"),
183184
):
184185
"""
185186
Convenience wrapper around pg_dump. Dumps schema only without owner/privileges by default.
@@ -189,6 +190,8 @@ def dump_main(
189190
options = []
190191
if schema_only:
191192
options.append("--schema-only")
193+
if no_owner:
194+
options.append("--no-owner")
192195

193196
with pg_infos.temp_env(include_database=False):
194197
result = pg_dump(

0 commit comments

Comments
 (0)