mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
new db field
This commit is contained in:
parent
d204bf9663
commit
ed449a8925
2 changed files with 33 additions and 0 deletions
|
@ -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]:
|
||||
|
|
|
@ -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 ###
|
Loading…
Reference in a new issue