"""user api tokens

Revision ID: <KEY>
Revises: 60617b0388ba
Create Date: 2019-07-30 16:07:05.435099

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '132fde0b<PASSWORD>b'
down_revision = '60617b0388ba'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('api_token', sa.String(length=32), nullable=True))
    op.add_column('user', sa.Column('api_token_expiration', sa.DateTime(), nullable=True))
    op.create_index(op.f('ix_user_api_token'), 'user', ['api_token'], unique=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_user_api_token'), table_name='user')
    op.drop_column('user', 'api_token_expiration')
    op.drop_column('user', 'api_token')
    # ### end Alembic commands ###

"""user api tokens

Revision ID: <KEY>
Revises: 60617b0388ba
Create Date: 2019-07-30 16:07:05.435099

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '132fde0b<PASSWORD>b'
down_revision = '60617b0388ba'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('api_token', sa.String(length=32), nullable=True))
    op.add_column('user', sa.Column('api_token_expiration', sa.DateTime(), nullable=True))
    op.create_index(op.f('ix_user_api_token'), 'user', ['api_token'], unique=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_user_api_token'), table_name='user')
    op.drop_column('user', 'api_token_expiration')
    op.drop_column('user', 'api_token')
    # ### end Alembic commands ###

user api tokens  Revision ID: <KEY> Revises: 60617b0388ba Create Date: 2019-07-30 16:07:05.435099 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###