atst/alembic/versions/07e0598199f6_add_applications_claimed_until.py
dandds a10d733fb7 Fix test and LGTM warnings.
- Fixes LGTM warnings for an unused import and equality comparisons to
  None in SQLAlchemy filters.
- Removes part of a unit test asserting that the claimed_until locking
  mechanism works correctly. If I recall correctly, this does not work
  in unit tests because the test takes place inside a transaction, and
  the database provider does evaluate the current time until the
  transaction is written.
2020-01-27 06:27:18 -05:00

30 lines
895 B
Python

"""add applications.claimed_until
Revision ID: 07e0598199f6
Revises: 26319c44a8d5
Create Date: 2020-01-25 13:33:17.711548
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '07e0598199f6' # pragma: allowlist secret
down_revision = '26319c44a8d5' # pragma: allowlist secret
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('applications', sa.Column('claimed_until', sa.TIMESTAMP(timezone=True), nullable=True))
op.add_column('applications', sa.Column('cloud_id', sa.String(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('applications', 'claimed_until')
op.drop_column('applications', 'cloud_id')
# ### end Alembic commands ###