Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldrian Harjati committed Sep 26, 2023
1 parent acdfdcc commit c71a0f3
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/db_revisions/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@
else:
load_dotenv()

INST_DB_USER = os.environ.get('INST_DB_USER')
INST_DB_PWD = os.environ.get('INST_DB_PWD')
INST_DB_HOST = os.environ.get('INST_DB_HOST')
INST_DB_NAME = os.environ.get('INST_DB_NAME')
INST_CONN = f'postgresql://{INST_DB_USER}:{INST_DB_PWD}@{INST_DB_HOST}/{INST_DB_NAME}'
config.set_main_option('sqlalchemy.url', INST_CONN)
INST_DB_USER = os.environ.get("INST_DB_USER")
INST_DB_PWD = os.environ.get("INST_DB_PWD")
INST_DB_HOST = os.environ.get("INST_DB_HOST")
INST_DB_NAME = os.environ.get("INST_DB_NAME")
INST_CONN = f"postgresql://{INST_DB_USER}:{INST_DB_PWD}@{INST_DB_HOST}/{INST_DB_NAME}"
config.set_main_option("sqlalchemy.url", INST_CONN)

# end specific SBL configuration


def run_migrations_offline() -> None:
"""Run migrations in 'offline' mode.
Expand Down Expand Up @@ -85,9 +86,7 @@ def run_migrations_online() -> None:
)

with connectable.connect() as connection:
context.configure(
connection=connection, target_metadata=target_metadata
)
context.configure(connection=connection, target_metadata=target_metadata)

with context.begin_transaction():
context.run_migrations()
Expand Down

0 comments on commit c71a0f3

Please sign in to comment.