Skip to content

Commit bd658b9

Browse files
committed
Update sqlalchemy.url in alembic.ini
1 parent cbb8147 commit bd658b9

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

alembic.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ version_path_separator = os # default: use os.pathsep
5050
# are written from script.py.mako
5151
# output_encoding = utf-8
5252

53-
sqlalchemy.url = postgresql://%(DB_USERNAME)s:%(DB_PASSWORD)s@%(DB_HOST)s/%(DB_DATABASE)s
53+
sqlalchemy.url = postgresql+psycopg://%(DB_USERNAME)s:%(DB_PASSWORD)s@%(DB_HOST)s/%(DB_DATABASE)s
5454

5555
[post_write_hooks]
5656
# post_write_hooks defines scripts or Python functions that are run

env.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def run_migrations_offline() -> None:
5151
5252
Calls to context.execute() here emit the given string to the
5353
script output.
54-
5554
"""
5655
url = config.get_main_option("sqlalchemy.url")
5756
context.configure(
@@ -60,17 +59,14 @@ def run_migrations_offline() -> None:
6059
literal_binds=True,
6160
dialect_opts={"paramstyle": "named"},
6261
)
63-
6462
with context.begin_transaction():
6563
context.run_migrations()
6664

67-
6865
def run_migrations_online() -> None:
6966
"""Run migrations in 'online' mode.
7067
7168
In this scenario we need to create an Engine
7269
and associate a connection with the context.
73-
7470
"""
7571
connectable = engine_from_config(
7672
config.get_section(config.config_ini_section, {}),
@@ -82,11 +78,9 @@ def run_migrations_online() -> None:
8278
context.configure(
8379
connection=connection, target_metadata=target_metadata
8480
)
85-
8681
with context.begin_transaction():
8782
context.run_migrations()
8883

89-
9084
if context.is_offline_mode():
9185
run_migrations_offline()
9286
else:

0 commit comments

Comments
 (0)