From 01ce5343adc9bb5e8fcb4a2fad04bf24f758a04b Mon Sep 17 00:00:00 2001 From: Anton Sidarevich Date: Sat, 11 Nov 2023 20:30:12 +0400 Subject: [PATCH] Fixed adding a duplicate column to the alembic table --- clickhouse_sqlalchemy/alembic/dialect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clickhouse_sqlalchemy/alembic/dialect.py b/clickhouse_sqlalchemy/alembic/dialect.py index ea5b36c3..35c2a57d 100644 --- a/clickhouse_sqlalchemy/alembic/dialect.py +++ b/clickhouse_sqlalchemy/alembic/dialect.py @@ -43,7 +43,7 @@ def patch_alembic_version(context, **kwargs): dt = Column('dt', types.DateTime, server_default=func.now()) version_num = Column('version_num', types.String, primary_key=True) version.append_column(dt) - version.append_column(version_num) + version.append_column(version_num, replace_existing=True) if 'cluster' in kwargs: cluster = kwargs['cluster']