Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Zbuddy13 committed Sep 5, 2024
1 parent 8a93793 commit 85c64a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
location = os.environ.get("config", None)

def main():
# import config, print config, connect to db, get the list of tables, remove unwanted, dump each table
conf = config.importConfig(location)
print(json.dumps(conf, indent=4))
dbOBJ = pg.connectDB(conf["databases"]["postgres"]["uri"])
Expand Down
1 change: 1 addition & 0 deletions modules/schemas/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
def connectDB(mySQLURL):
return psycopg.connect(f"{mySQLURL}")

# Return a list of tables in the database
def getTableList(dbObject):
# row_factory outputs data as a dictionary
with dbObject.cursor(row_factory=psycopg.rows.dict_row) as cur:
Expand Down

0 comments on commit 85c64a9

Please sign in to comment.