From 8e359e0affa3359ccca1d58174aea4859c89c9d8 Mon Sep 17 00:00:00 2001 From: "Pawla Abdul (Bot)" Date: Sat, 4 Apr 2026 18:32:36 +0000 Subject: [PATCH] fix(api): widen alembic version_table column to 128 chars Default varchar(32) alembic_version column truncates long revision IDs like 003_make_users_hashed_password_nullable (39 chars) on fresh databases. Set version_table_column_width=128 in both context.configure() calls. Co-Authored-By: Paperclip --- alembic/env.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alembic/env.py b/alembic/env.py index b781b2f..38d7156 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -31,6 +31,7 @@ def run_migrations_offline() -> None: target_metadata=target_metadata, literal_binds=True, dialect_opts={"paramstyle": "named"}, + version_table_column_width=128, ) with context.begin_transaction(): context.run_migrations() @@ -44,7 +45,7 @@ def run_migrations_online() -> None: poolclass=pool.NullPool, ) with connectable.connect() as connection: - context.configure(connection=connection, target_metadata=target_metadata) + context.configure(connection=connection, target_metadata=target_metadata, version_table_column_width=128) with context.begin_transaction(): context.run_migrations() # Create any tables defined in models but not yet created by migrations.