From f465ccb8b817af737e9892e467108805979b4ecb Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Mon, 9 Feb 2026 20:47:30 +0000 Subject: [PATCH] Fix alembic migration to rename buylisting.longtitude to longitude The migration was incorrectly changed to a no-op, leaving the typo in the buylisting table which caused OperationalError during scraping. --- .../e5f1bc4e3323_fix_typo_in_logitude_column.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/alembic/versions/e5f1bc4e3323_fix_typo_in_logitude_column.py b/alembic/versions/e5f1bc4e3323_fix_typo_in_logitude_column.py index f79c396..33baaed 100644 --- a/alembic/versions/e5f1bc4e3323_fix_typo_in_logitude_column.py +++ b/alembic/versions/e5f1bc4e3323_fix_typo_in_logitude_column.py @@ -19,12 +19,10 @@ depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: - """Upgrade schema - this migration is now a no-op since tables already have correct column name.""" - # The tables were created with 'longitude' (correct spelling) in the initial migration. - # This migration was incorrectly auto-generated and has been fixed to be a no-op. - pass + """Rename 'longtitude' to 'longitude' in buylisting table.""" + op.alter_column('buylisting', 'longtitude', new_column_name='longitude', existing_type=sa.Float(), existing_nullable=False) def downgrade() -> None: - """Downgrade schema - no-op since upgrade is no-op.""" - pass + """Rename 'longitude' back to 'longtitude' in buylisting table.""" + op.alter_column('buylisting', 'longitude', new_column_name='longtitude', existing_type=sa.Float(), existing_nullable=False)