mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
longer source_url field
This commit is contained in:
parent
820af0ada2
commit
77a02dc6ed
2 changed files with 39 additions and 1 deletions
|
@ -83,7 +83,7 @@ class File(db.Model):
|
||||||
width = db.Column(db.Integer)
|
width = db.Column(db.Integer)
|
||||||
height = db.Column(db.Integer)
|
height = db.Column(db.Integer)
|
||||||
alt_text = db.Column(db.String(256))
|
alt_text = db.Column(db.String(256))
|
||||||
source_url = db.Column(db.String(256))
|
source_url = db.Column(db.String(1024))
|
||||||
thumbnail_path = db.Column(db.String(255))
|
thumbnail_path = db.Column(db.String(255))
|
||||||
thumbnail_width = db.Column(db.Integer)
|
thumbnail_width = db.Column(db.Integer)
|
||||||
thumbnail_height = db.Column(db.Integer)
|
thumbnail_height = db.Column(db.Integer)
|
||||||
|
|
38
migrations/versions/62cbf0bf515a_longer_file_source_url.py
Normal file
38
migrations/versions/62cbf0bf515a_longer_file_source_url.py
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
"""longer file source_url
|
||||||
|
|
||||||
|
Revision ID: 62cbf0bf515a
|
||||||
|
Revises: d37fe77e043c
|
||||||
|
Create Date: 2024-02-13 06:50:03.712804
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '62cbf0bf515a'
|
||||||
|
down_revision = 'd37fe77e043c'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('file', schema=None) as batch_op:
|
||||||
|
batch_op.alter_column('source_url',
|
||||||
|
existing_type=sa.VARCHAR(length=256),
|
||||||
|
type_=sa.String(length=1024),
|
||||||
|
existing_nullable=True)
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('file', schema=None) as batch_op:
|
||||||
|
batch_op.alter_column('source_url',
|
||||||
|
existing_type=sa.String(length=1024),
|
||||||
|
type_=sa.VARCHAR(length=256),
|
||||||
|
existing_nullable=True)
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
Loading…
Add table
Reference in a new issue