<commit_before>"""add signed code support

Revision ID: 510d2db2b008
Revises: 74770336785
Create Date: 2016-07-22 01:28:29.552964

"""

# revision identifiers, used by Alembic.
revision = '510d2db2b008'
down_revision = '74770336785'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.drop_column('discount_policy', 'discount_code_base')
    op.add_column('discount_policy', sa.Column('discount_code_base', sa.Unicode(length=50), nullable=True))
    op.create_unique_constraint('discount_policy_discount_code_base_key', 'discount_policy', ['discount_code_base'])
    op.add_column('discount_policy', sa.Column('secret', sa.Unicode(length=50), nullable=True))

    op.alter_column('discount_coupon', 'code', existing_type=sa.VARCHAR(length=20), type_=sa.VARCHAR(length=100))


def downgrade():
    op.drop_column('discount_policy', 'secret')
    op.drop_constraint('discount_policy_discount_code_base_key', 'discount_policy', type_='unique')
    op.drop_column('discount_policy', 'discount_code_base')
    op.add_column('discount_policy', sa.Column('discount_code_base', sa.Unicode(length=20), nullable=True))<commit_msg>rm drop and add for discount_code_base<commit_after>"""add signed code support

Revision ID: 510d2db2b008
Revises: 74770336785
Create Date: 2016-07-22 01:28:29.552964

"""

# revision identifiers, used by Alembic.
revision = '510d2db2b008'
down_revision = '74770336785'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_unique_constraint('discount_policy_discount_code_base_key', 'discount_policy', ['discount_code_base'])
    op.add_column('discount_policy', sa.Column('secret', sa.Unicode(length=50), nullable=True))
    op.alter_column('discount_coupon', 'code', existing_type=sa.VARCHAR(length=20), type_=sa.VARCHAR(length=100))


def downgrade():
    op.drop_column('discount_policy', 'secret')
    op.drop_constraint('discount_policy_discount_code_base_key', 'discount_policy', type_='unique')
{'fraction_non_alphanumeric': 0.13109756097560976, 'fraction_numerical': 0.06808943089430894, 'mean_word_length': 7.523809523809524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '413123', 'n_tokens_mistral': 777, 'n_tokens_neox': 695, 'n_words': 116}