"""empty message

Revision ID: 5ade3d942429
Revises:
Create Date: 2015-04-17 10:23:56.546052

"""

# revision identifiers, used by Alembic.
revision = '5ade3d942429'
down_revision = None
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils


def upgrade():
    TYPES = (
        ('repo.push', 'Repository Push'),
    )

    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('webhooks',
    sa.Column('uuid', sqlalchemy_utils.types.uuid.UUIDType(binary=False), nullable=False),
    sa.Column('owner', sa.UnicodeText(), nullable=True),
    sa.Column('url', sqlalchemy_utils.types.url.URLType(), nullable=False),
    sa.Column('event_type', sqlalchemy_utils.types.choice.ChoiceType(TYPES), nullable=False),
    sa.Column('active', sa.Boolean(), nullable=False),
    sa.PrimaryKeyConstraint('uuid'),
    sa.UniqueConstraint('owner', 'uuid')
    )

def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('webhooks')
    ### end Alembic commands ###
