Skip to content

Commit

Permalink
Undo hotfix
Browse files Browse the repository at this point in the history
Migration run twice because of the extension renam
  • Loading branch information
avdata99 committed Nov 8, 2024
1 parent 60afd7f commit ee76bbb
Showing 1 changed file with 14 additions and 16 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,20 +18,18 @@


def upgrade():
# 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
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),
)


def downgrade():
Expand Down

0 comments on commit ee76bbb

Please sign in to comment.