mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-21 20:54:27 +00:00
Add missing migration
This commit is contained in:
parent
254588f7c0
commit
0f1fdd3944
1 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
|||
"""Add support for quote URL
|
||||
|
||||
Revision ID: c3027d0e18dc
|
||||
Revises: 604d125ea2fb
|
||||
Create Date: 2022-09-21 07:08:24.568124+00:00
|
||||
|
||||
"""
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'c3027d0e18dc'
|
||||
down_revision = '604d125ea2fb'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('inbox', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('quoted_inbox_object_id', sa.Integer(), nullable=True))
|
||||
batch_op.create_foreign_key('fk_quoted_inbox_object_id', 'inbox', ['quoted_inbox_object_id'], ['id'])
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('inbox', schema=None) as batch_op:
|
||||
batch_op.drop_constraint('fk_quoted_inbox_object_id', type_='foreignkey')
|
||||
batch_op.drop_column('quoted_inbox_object_id')
|
||||
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in a new issue