From 0f1fdd3944d9e63193792fbcc6ab0dc5660a71d4 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Wed, 21 Sep 2022 19:19:12 +0200 Subject: [PATCH] Add missing migration --- ...-c3027d0e18dc_add_support_for_quote_url.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 alembic/versions/2022_09_21_0708-c3027d0e18dc_add_support_for_quote_url.py diff --git a/alembic/versions/2022_09_21_0708-c3027d0e18dc_add_support_for_quote_url.py b/alembic/versions/2022_09_21_0708-c3027d0e18dc_add_support_for_quote_url.py new file mode 100644 index 0000000..8991f0e --- /dev/null +++ b/alembic/versions/2022_09_21_0708-c3027d0e18dc_add_support_for_quote_url.py @@ -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 ###