Skip to content

Commit ba7d684

Browse files
authored
Remove duplicate code that runs migration twice
There is no need to run migration twice since it's already been run at line 91
1 parent 8d62ea9 commit ba7d684

File tree

1 file changed

+0
-9
lines changed
  • examples/prod_fastapi_demo/migrations

1 file changed

+0
-9
lines changed

examples/prod_fastapi_demo/migrations/env.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@ def run_migrations_online():
9090
with context.begin_transaction():
9191
context.run_migrations()
9292

93-
with connectable.connect() as connection:
94-
context.configure(
95-
connection=connection, target_metadata=target_metadata
96-
)
97-
98-
with context.begin_transaction():
99-
context.run_migrations()
100-
101-
10293
if context.is_offline_mode():
10394
run_migrations_offline()
10495
else:

0 commit comments

Comments
 (0)