"""empty message

Revision ID: 45faee087b6e
Revises: 9<PASSWORD>
Create Date: 2019-03-23 10:09:18.462448

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '45faee087b6e'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('api_logs',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('name', sa.String(length=128), nullable=True),
    sa.Column('ts_created', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.add_column('licenses', sa.Column('token', sa.String(length=128), nullable=True))
    op.add_column('licenses', sa.Column('user_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'licenses', 'users', ['user_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'licenses', type_='foreignkey')
    op.drop_column('licenses', 'user_id')
    op.drop_column('licenses', 'token')
    op.drop_table('api_logs')
    # ### end Alembic commands ###

"""empty message

Revision ID: 45faee087b6e
Revises: 9<PASSWORD>
Create Date: 2019-03-23 10:09:18.462448

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '45faee087b6e'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('api_logs',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('name', sa.String(length=128), nullable=True),
    sa.Column('ts_created', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.add_column('licenses', sa.Column('token', sa.String(length=128), nullable=True))
    op.add_column('licenses', sa.Column('user_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'licenses', 'users', ['user_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'licenses', type_='foreignkey')
    op.drop_column('licenses', 'user_id')
    op.drop_column('licenses', 'token')
    op.drop_table('api_logs')
    # ### end Alembic commands ###

empty message  Revision ID: 45faee087b6e Revises: 9<PASSWORD> Create Date: 2019-03-23 10:09:18.462448 # 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 ###