Skip to content

Commit

Permalink
Support large resource sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
marksparkza committed Nov 24, 2023
1 parent b091171 commit 9786ed7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""Support resources larger than 2gb
Revision ID: 0ab77b1f560e
Revises: 1eea59d91fea
Create Date: 2023-11-24 15:12:02.343016
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '0ab77b1f560e'
down_revision = '1eea59d91fea'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic ###
op.alter_column('archive_resource', 'size',
existing_type=sa.INTEGER(),
type_=sa.BigInteger(),
existing_nullable=True)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic ###
op.alter_column('archive_resource', 'size',
existing_type=sa.BigInteger(),
type_=sa.INTEGER(),
existing_nullable=True)
# ### end Alembic commands ###
4 changes: 2 additions & 2 deletions odp/db/models/archive.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import uuid

from sqlalchemy import Column, ForeignKey, Integer, String, TIMESTAMP, UniqueConstraint
from sqlalchemy import BigInteger, Column, ForeignKey, String, TIMESTAMP, UniqueConstraint
from sqlalchemy.orm import relationship

from odp.db import Base
Expand Down Expand Up @@ -39,7 +39,7 @@ class ArchiveResource(Base):
path = Column(String)
name = Column(String)
type = Column(String)
size = Column(Integer)
size = Column(BigInteger)
md5 = Column(String)
timestamp = Column(TIMESTAMP(timezone=True))

Expand Down

0 comments on commit 9786ed7

Please sign in to comment.