new db field

This commit is contained in:
rra 2024-04-22 19:53:12 +02:00
parent d204bf9663
commit ed449a8925
2 changed files with 33 additions and 0 deletions

View file

@ -1332,6 +1332,7 @@ class Site(db.Model):
log_activitypub_json = db.Column(db.Boolean, default=False)
default_theme = db.Column(db.String(20), default='')
contact_email = db.Column(db.String(255), default='')
about = db.Column(db.Text, default='')
@staticmethod
def admins() -> List[User]:

View file

@ -0,0 +1,32 @@
"""long instance about field
Revision ID: 46c170499e71
Revises: 7aee4cb7db24
Create Date: 2024-04-22 18:28:51.826149
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '46c170499e71'
down_revision = '7aee4cb7db24'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('site', schema=None) as batch_op:
batch_op.add_column(sa.Column('about', sa.Text(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('site', schema=None) as batch_op:
batch_op.drop_column('about')
# ### end Alembic commands ###