"""resource attachments Revision ID: 9c24c609878a Revises: 903d7c66ff1d Create Date: 2018-10-18 17:14:25.566215 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '9c24c609878a' down_revision = 'c99026ab9918' branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column('attachments', sa.Column('resource', sa.String(), nullable=True)) op.add_column('attachments', sa.Column('resource_id', postgresql.UUID(as_uuid=True), nullable=True)) op.create_index(op.f('ix_attachments_resource_id'), 'attachments', ['resource_id'], unique=False) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_attachments_resource_id'), table_name='attachments') op.drop_column('attachments', 'resource_id') op.drop_column('attachments', 'resource') # ### end Alembic commands ###