"""empty message

Revision ID: 448b2618f5d3
Revises: 1582ca34b636
Create Date: 2015-11-03 17:03:01.276126

"""

# revision identifiers, used by Alembic.
revision = '448b2618f5d3'
down_revision = '1582ca34b636'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('user_lock',
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('lock_id', sa.Integer(), nullable=False),
    sa.Column('is_owner', sa.Boolean(), nullable=True),
    sa.ForeignKeyConstraint(['lock_id'], ['lock.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('user_id', 'lock_id')
    )
    op.drop_table('user_locks')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('user_locks',
    sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=False),
    sa.Column('lock_id', sa.INTEGER(), autoincrement=False, nullable=False),
    sa.Column('is_owner', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['lock_id'], [u'lock.id'], name=u'user_locks_lock_id_fkey'),
    sa.ForeignKeyConstraint(['user_id'], [u'user.id'], name=u'user_locks_user_id_fkey'),
    sa.PrimaryKeyConstraint('user_id', 'lock_id', name=u'user_locks_pkey')
    )
    op.drop_table('user_lock')
    ### end Alembic commands ###
