mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
increase length of ban reason
This commit is contained in:
parent
f8638cf98b
commit
d3825b68b5
2 changed files with 39 additions and 1 deletions
|
@ -2001,7 +2001,7 @@ class CommunityBan(db.Model):
|
|||
user_id = db.Column(db.Integer, db.ForeignKey('user.id'), primary_key=True) # person who is banned, not the banner
|
||||
community_id = db.Column(db.Integer, db.ForeignKey('community.id'), primary_key=True)
|
||||
banned_by = db.Column(db.Integer, db.ForeignKey('user.id'))
|
||||
reason = db.Column(db.String(50))
|
||||
reason = db.Column(db.String(256))
|
||||
created_at = db.Column(db.DateTime, default=utcnow)
|
||||
ban_until = db.Column(db.DateTime)
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
"""increase length of ban reason
|
||||
|
||||
Revision ID: 7f7dfd4d4f1b
|
||||
Revises: d2bd6281a8d3
|
||||
Create Date: 2024-11-23 18:47:41.698925
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '7f7dfd4d4f1b'
|
||||
down_revision = 'd2bd6281a8d3'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('community_ban', schema=None) as batch_op:
|
||||
batch_op.alter_column('reason',
|
||||
existing_type=sa.VARCHAR(length=50),
|
||||
type_=sa.String(length=256),
|
||||
existing_nullable=True)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('community_ban', schema=None) as batch_op:
|
||||
batch_op.alter_column('reason',
|
||||
existing_type=sa.String(length=256),
|
||||
type_=sa.VARCHAR(length=50),
|
||||
existing_nullable=True)
|
||||
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in a new issue