"""add unique constraint for groups' titles

Revision ID: f9cfece8ecfe
Revises: e75876149b04
Create Date: 2016-08-29 12:15:13.675725

"""

# revision identifiers, used by Alembic.
revision = 'f9cfece8ecfe'
down_revision = 'e75876149b04'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint(None, 'grammar_section', ['title'])
    op.create_unique_constraint(None, 'theme', ['title'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'theme', type_='unique')
    op.drop_constraint(None, 'grammar_section', type_='unique')
    ### end Alembic commands ###
