mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
user extra field - increase label field length
This commit is contained in:
parent
b98e866a14
commit
2aa0d50404
2 changed files with 39 additions and 1 deletions
|
@ -2124,7 +2124,7 @@ class UserNote(db.Model):
|
|||
class UserExtraField(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
user_id = db.Column(db.Integer, db.ForeignKey('user.id'), index=True)
|
||||
label = db.Column(db.String(50))
|
||||
label = db.Column(db.String(1024))
|
||||
text = db.Column(db.String(1024))
|
||||
|
||||
|
||||
|
|
38
migrations/versions/7f163d621f13_increase_field_length.py
Normal file
38
migrations/versions/7f163d621f13_increase_field_length.py
Normal file
|
@ -0,0 +1,38 @@
|
|||
"""increase field length
|
||||
|
||||
Revision ID: 7f163d621f13
|
||||
Revises: 03258111eef1
|
||||
Create Date: 2025-01-22 08:59:50.114846
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '7f163d621f13'
|
||||
down_revision = '03258111eef1'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user_extra_field', schema=None) as batch_op:
|
||||
batch_op.alter_column('label',
|
||||
existing_type=sa.VARCHAR(length=50),
|
||||
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('user_extra_field', schema=None) as batch_op:
|
||||
batch_op.alter_column('label',
|
||||
existing_type=sa.String(length=1024),
|
||||
type_=sa.VARCHAR(length=50),
|
||||
existing_nullable=True)
|
||||
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in a new issue