Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
avdata99 committed Nov 8, 2024
1 parent c525568 commit 60afd7f
Showing 1 changed file with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# import sqlalchemy as sa
# from sqlalchemy.dialects import postgresql


# revision identifiers, used by Alembic.
Expand All @@ -18,18 +18,20 @@


def upgrade():
op.create_table(
"tracking_usage",
sa.Column("id", sa.UnicodeText, primary_key=True),
sa.Column("timestamp", sa.DateTime, server_default=sa.func.current_timestamp()),
sa.Column("user_id", sa.UnicodeText, nullable=True),
sa.Column("tracking_type", sa.UnicodeText, nullable=True),
sa.Column("tracking_sub_type", sa.UnicodeText, nullable=True),
sa.Column("extras", postgresql.JSONB(astext_type=sa.Text()), nullable=True),
sa.Column("token_name", sa.UnicodeText, nullable=True),
sa.Column("object_id", sa.UnicodeText, nullable=True),
sa.Column("object_type", sa.UnicodeText, nullable=True),
)
# Skip first tima after renaming extension
# op.create_table(
# "tracking_usage",
# sa.Column("id", sa.UnicodeText, primary_key=True),
# sa.Column("timestamp", sa.DateTime, server_default=sa.func.current_timestamp()),
# sa.Column("user_id", sa.UnicodeText, nullable=True),
# sa.Column("tracking_type", sa.UnicodeText, nullable=True),
# sa.Column("tracking_sub_type", sa.UnicodeText, nullable=True),
# sa.Column("extras", postgresql.JSONB(astext_type=sa.Text()), nullable=True),
# sa.Column("token_name", sa.UnicodeText, nullable=True),
# sa.Column("object_id", sa.UnicodeText, nullable=True),
# sa.Column("object_type", sa.UnicodeText, nullable=True),
# )
pass


def downgrade():
Expand Down

0 comments on commit 60afd7f

Please sign in to comment.