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 ###