From e5edf6203cce098b09f4fb4ae89a5c9bd414cc3d Mon Sep 17 00:00:00 2001 From: Anderson Shindy Oki Date: Sun, 4 Aug 2024 21:30:13 +0900 Subject: [PATCH] Fixed postgresql database migrations not applied (#2601) --- migrations/env.py | 2 -- migrations/versions/452dd0f0b578_.py | 4 ++-- migrations/versions/{b183a2ac0dd1 => b183a2ac0dd1_.py} | 0 3 files changed, 2 insertions(+), 4 deletions(-) rename migrations/versions/{b183a2ac0dd1 => b183a2ac0dd1_.py} (100%) diff --git a/migrations/env.py b/migrations/env.py index beddf9710..e591f1a9f 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -110,8 +110,6 @@ def run_migrations_online(): elif bind.engine.name == 'postgresql': bind.execute(text("SET CONSTRAINTS ALL IMMEDIATE;")) - bind.close() - if context.is_offline_mode(): run_migrations_offline() diff --git a/migrations/versions/452dd0f0b578_.py b/migrations/versions/452dd0f0b578_.py index 13e623988..a4e7b2966 100644 --- a/migrations/versions/452dd0f0b578_.py +++ b/migrations/versions/452dd0f0b578_.py @@ -1,7 +1,7 @@ """empty message Revision ID: 452dd0f0b578 -Revises: 30f37e2e15e1 +Revises: b183a2ac0dd1 Create Date: 2024-05-06 20:27:15.618027 """ @@ -11,7 +11,7 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '452dd0f0b578' -down_revision = '30f37e2e15e1' +down_revision = 'b183a2ac0dd1' branch_labels = None depends_on = None diff --git a/migrations/versions/b183a2ac0dd1 b/migrations/versions/b183a2ac0dd1_.py similarity index 100% rename from migrations/versions/b183a2ac0dd1 rename to migrations/versions/b183a2ac0dd1_.py