"""add environment_role provisioning fields

Revision ID: e3d93f9caba7
Revises: 691b04ecd85e
Create Date: 2019-09-18 16:35:47.554060

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'e3d93f9caba7' # pragma: allowlist secret
down_revision = '691b04ecd85e' # pragma: allowlist secret
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('environment_roles', sa.Column('claimed_until', sa.TIMESTAMP(timezone=True), nullable=True))
    op.add_column('environment_roles', sa.Column('csp_user_id', sa.String(), nullable=True))
    op.add_column('environment_roles', sa.Column('status', sa.Enum('PENDING', 'COMPLETED', 'PENDING_DELETE', name='status', native_enum=False), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('environment_roles', 'csp_user_id')
    op.drop_column('environment_roles', 'claimed_until')
    op.drop_column('environment_roles', 'status')
    # ### end Alembic commands ###
