Skip to content

Commit

Permalink
Merge pull request #48 from DalgoT4D/pass-yaml-in-args
Browse files Browse the repository at this point in the history
updated config to match PostgreClient
  • Loading branch information
fatchat authored Dec 4, 2023
2 parents a7bd8ad + 3b9d846 commit d9d0897
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/dbdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
parser.add_argument("--ref-schema", required=True)
parser.add_argument("--comp-schema", required=True)
parser.add_argument("--working-dir", required=True)
parser.add_argument("--config-yaml", default="connections.yaml")
args = parser.parse_args()

with open("connections.yaml", "r", encoding="utf-8") as connection_yaml:
with open(args.config_yaml, "r", encoding="utf-8") as connection_yaml:
connection_info = yaml.safe_load(connection_yaml)

working_dir = args.working_dir
Expand Down Expand Up @@ -46,11 +47,11 @@ def db2csv(
"-h",
connection["host"],
"-p",
connection.get("port", "5432"),
str(connection.get("port", "5432")),
"-d",
connection["name"],
connection["database"],
"-U",
connection["user"],
connection["username"],
"-f",
cmdfile,
]
Expand Down

0 comments on commit d9d0897

Please sign in to comment.