Skip to content

Commit

Permalink
fix: add username to user_profile serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Oct 31, 2024
1 parent bdf4058 commit ed71f06
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from alembic import op
import sqlalchemy as sa

revision = "0040"
down_revision = "0039"
branch_labels = None
depends_on = None
on_cluster = " ON CLUSTER '{{CLICKHOUSE_CLUSTER_NAME}}' " if "{{CLICKHOUSE_CLUSTER_NAME}}" else ""
engine = (
"ReplicatedReplacingMergeTree"
if "{{CLICKHOUSE_CLUSTER_NAME}}"
else "ReplacingMergeTree"
)



def upgrade():
op.execute(
f"""
ALTER TABLE {{ ASPECTS_EVENT_SINK_DATABASE }}.user_profile
{on_cluster}
ADD COLUMN IF NOT EXISTS username String DEFAULT ''
AFTER name;
"""
)


def downgrade():
op.execute(
f"""
ALTER TABLE {{ ASPECTS_EVENT_SINK_DATABASE }}.user_profile
{on_cluster}
DROP COLUMN IF EXISTS username;
"""
)

0 comments on commit ed71f06

Please sign in to comment.