Skip to content

Commit

Permalink
Feat/update tools length (#7141)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywoola authored Aug 9, 2024
1 parent 425174e commit f667ef9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""update tools original_url length
Revision ID: 1787fbae959a
Revises: eeb2e349e6ac
Create Date: 2024-08-09 08:01:12.817620
"""
import sqlalchemy as sa
from alembic import op

import models as models

# revision identifiers, used by Alembic.
revision = '1787fbae959a'
down_revision = 'eeb2e349e6ac'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('tool_files', schema=None) as batch_op:
batch_op.alter_column('original_url',
existing_type=sa.VARCHAR(length=255),
type_=sa.String(length=2048),
existing_nullable=True)

# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('tool_files', schema=None) as batch_op:
batch_op.alter_column('original_url',
existing_type=sa.String(length=2048),
type_=sa.VARCHAR(length=255),
existing_nullable=True)

# ### end Alembic commands ###
2 changes: 1 addition & 1 deletion api/models/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,4 @@ class ToolFile(db.Model):
# mime type
mimetype = db.Column(db.String(255), nullable=False)
# original url
original_url = db.Column(db.String(255), nullable=True)
original_url = db.Column(db.String(2048), nullable=True)

0 comments on commit f667ef9

Please sign in to comment.