<commit_before>"""empty message

Revision ID: 44fe26926437
Revises: 171b15035012
Create Date: 2016-03-23 16:41:49.660096

"""

# revision identifiers, used by Alembic.
revision = '44fe26926437'
down_revision = '171b15035012'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()





def upgrade_():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###


def downgrade_():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###


def upgrade_stats():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('activity_stream_events_daily',
    sa.Column('client_id', sa.String(length=64), nullable=False),
    sa.Column('tab_id', sa.String(length=64), nullable=False),
    sa.Column('addon_version', sa.String(length=16), nullable=False),
    sa.Column('source', sa.String(length=64), nullable=False),
    sa.Column('page', sa.String(length=16), nullable=False),
    sa.Column('action_position', sa.String(length=16), nullable=False),
    sa.Column('event', sa.String(length=16), nullable=False),
    sa.Column('receive_at', sa.DateTime(), nullable=False),
    sa.Column('date', sa.Date(), nullable=False),
    sa.Column('locale', sa.String(length=14), nullable=False),
    sa.Column('country_code', sa.String(length=5), nullable=False),
    sa.Column('os', sa.String(length=64), nullable=False),
    sa.Column('browser', sa.String(length=64), nullable=False),
    sa.Column('version', sa.String(length=64), nullable=False),
    sa.Column('device', sa.String(length=64), nullable=False)
    )
    op.add_column(u'activity_stream_stats_daily', sa.Column('page', sa.String(length=16), nullable=False))
    op.add_column('activity_stream_stats_daily', sa.Column('date', sa.Date(), nullable=False))
    op.drop_column(u'activity_stream_stats_daily', 'click_position')
    op.drop_column(u'activity_stream_stats_daily', 'source')
    ### end Alembic commands ###


def downgrade_stats():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column(u'activity_stream_stats_daily', sa.Column('source', sa.VARCHAR(length=64), autoincrement=False, nullable=False))
    op.add_column(u'activity_stream_stats_daily', sa.Column('click_position', sa.INTEGER(), autoincrement=False, nullable=False))
    op.drop_column('activity_stream_stats_daily', 'date')
    op.drop_column(u'activity_stream_stats_daily', 'page')
    op.drop_table('activity_stream_events_daily')
    ### end Alembic commands ###<commit_msg>update alembic migration to respect ignore redshift option<commit_after>"""empty message

Revision ID: 44fe26926437
Revises: <PASSWORD>
Create Date: 2016-03-23 16:41:49.660096

"""

# revision identifiers, used by Alembic.
revision = '44fe26926437'
down_revision = '171b15035012'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()





def upgrade_():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###


def downgrade_():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###


def upgrade_stats():
    import os
    if os.environ.get("SPLICE_IGNORE_REDSHIFT", "") == "true":
        return
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('activity_stream_events_daily',
    sa.Column('client_id', sa.String(length=64), nullable=False),
    sa.Column('tab_id', sa.String(length=64), nullable=False),
    sa.Column('addon_version', sa.String(length=16), nullable=False),
    sa.Column('source', sa.String(length=64), nullable=False),
    sa.Column('page', sa.String(length=16), nullable=False),
    sa.Column('action_position', sa.String(length=16), nullable=False),
    sa.Column('event', sa.String(length=16), nullable=False),
    sa.Column('receive_at', sa.DateTime(), nullable=False),
    sa.Column('date', sa.Date(), nullable=False),
    sa.Column('locale', sa.String(length=14), nullable=False),
    sa.Column('country_code', sa.String(length=5), nullable=False),
    sa.Column('os', sa.String(length=64), nullable=False),
    sa.Column('browser', sa.String(length=64), nullable=False),
    sa.Column('version', sa.String(length=64), nullable=False),
    sa.Column('device', sa.String(length=64), nullable=False)
    )
    op.add_column(u'activity_stream_stats_daily', sa.Column('page', sa.String(length=16), nullable=False))
    op.add_column('activity_stream_stats_daily', sa.Column('date', sa.Date(), nullable=False))
    op.drop_column(u'activity_stream_stats_daily', 'click_position')
    op.drop_column(u'activity_stream_stats_daily', 'source')
    ### end Alembic commands ###


def downgrade_stats():
    import os
    if os.environ.get("SPLICE_IGNORE_REDSHIFT", "") == "true":
        return
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column(u'activity_stream_stats_daily', sa.Column('source', sa.VARCHAR(length=64), autoincrement=False, nullable=False))
    op.add_column(u'activity_stream_stats_daily', sa.Column('click_position', sa.INTEGER(), autoincrement=False, nullable=False))
    op.drop_column('activity_stream_stats_daily', 'date')
    op.drop_column(u'activity_stream_stats_daily', 'page')
    op.drop_table('activity_stream_events_daily')
    ### end Alembic commands ###
{'fraction_non_alphanumeric': 0.15679381262084724, 'fraction_numerical': 0.03005800667955704, 'mean_word_length': 5.350446428571429, 'pattern_counts': {'":': 2, '<': 4, '<?xml version=': 0, '>': 4, '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': '5546921', 'n_tokens_mistral': 2008, 'n_tokens_neox': 1876, 'n_words': 345}