"""icalendar_token

Revision: 0052
Revision ID: 7790b50d0be
Revises: 3e86e3d4ef11
Create Date: 2016-03-18 15:57:31.447805

"""

# revision identifiers, used by Alembic.
revision = '7790b50d0be'
down_revision = '3e86e3d4ef11'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('cards', sa.Column('icalendar_token', sa.Text(), nullable=True))
    op.create_index(op.f('ix_cards_icalendar_token'), 'cards', ['icalendar_token'], unique=True)
    op.create_index(op.f('ix_card_attributes_card_model_attribute_id'), 'card_attributes', ['card_model_attribute_id'], unique=False)


def downgrade():
    op.drop_index(op.f('ix_card_attributes_card_model_attribute_id'), table_name='card_attributes')
    op.drop_index(op.f('ix_cards_icalendar_token'), table_name='cards')
    op.drop_column('cards', 'icalendar_token')