Skip to content

Commit

Permalink
removed LargeBinary import
Browse files Browse the repository at this point in the history
  • Loading branch information
anishTP committed Oct 13, 2023
1 parent 23647ac commit 1e65624
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions funnel/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from collections.abc import Sequence

from pytz import utc
from sqlalchemy import LargeBinary
from sqlalchemy.orm import attribute_keyed_dict
from werkzeug.utils import cached_property

Expand Down Expand Up @@ -194,7 +193,7 @@ class Project(UuidMixin, BaseScopedNameMixin, Model):
)

thumbnail_image = with_roles(
sa.orm.mapped_column(LargeBinary, nullable=True),
sa.orm.mapped_column(sa.LargeBinary, nullable=True),
read={'all'},
datasets={'primary', 'without_parent', 'related'},
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"""Added thumbnail_image column to Project model
"""Added thumbnail_image column to Project model.
Revision ID: ce340b5b9d1e
Revision ID: cfe474af2a94
Revises: 017c60414c03
Create Date: 2023-10-13 19:38:30.010804
Create Date: 2023-10-13 19:54:45.395589
"""

import sqlalchemy as sa
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision: str = 'ce340b5b9d1e'
revision: str = 'cfe474af2a94'
down_revision: str = '017c60414c03'
branch_labels: str | tuple[str, ...] | None = None
depends_on: str | tuple[str, ...] | None = None
Expand All @@ -32,9 +32,7 @@ def upgrade_() -> None:
"""Upgrade default database."""
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('project', schema=None) as batch_op:
batch_op.add_column(
sa.Column('thumbnail_image', sa.LargeBinary(), nullable=True)
)
batch_op.add_column(sa.Column('thumbnail_image', sa.LargeBinary(), nullable=True))


def downgrade_() -> None:
Expand Down

0 comments on commit 1e65624

Please sign in to comment.