<commit_before>"""empty message

Revision ID: 0081_add_job_stats
Revises: 0080_fix_rate_start_date
Create Date: 2017-05-09 11:21:06.959075

"""

# revision identifiers, used by Alembic.
revision = '0081_add_job_stats'
down_revision = '0080_fix_rate_start_date'

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('job_statistics',
    sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('job_id', postgresql.UUID(as_uuid=True), nullable=True),
    sa.Column('emails_sent', sa.BigInteger(), nullable=False),
    sa.Column('emails_delivered', sa.BigInteger(), nullable=False),
    sa.Column('emails_failed', sa.BigInteger(), nullable=False),
    sa.Column('sms_sent', sa.BigInteger(), nullable=False),
    sa.Column('sms_delivered', sa.BigInteger(), nullable=False),
    sa.Column('sms_failed', sa.BigInteger(), nullable=False),
    sa.Column('letters_sent', sa.BigInteger(), nullable=False),
    sa.Column('letters_failed', sa.BigInteger(), nullable=False),
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_job_statistics_job_id'), 'job_statistics', ['job_id'], unique=True)
    op.alter_column('notification_history', 'international',
               existing_type=sa.BOOLEAN(),
               nullable=False)
    op.alter_column('notifications', 'international',
               existing_type=sa.BOOLEAN(),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('notifications', 'international',
               existing_type=sa.BOOLEAN(),
               nullable=True)
    op.alter_column('notification_history', 'international',
               existing_type=sa.BOOLEAN(),
               nullable=True)
    op.drop_index(op.f('ix_job_statistics_job_id'), table_name='job_statistics')
    op.drop_table('job_statistics')
    # ### end Alembic commands ###
<commit_msg>removed the reference to internation numbers from migration script<commit_after>"""empty message

Revision ID: 0081_add_job_stats
Revises: 0080_fix_rate_start_date
Create Date: 2017-05-09 11:21:06.959075

"""

# revision identifiers, used by Alembic.
revision = '0081_add_job_stats'
down_revision = '0080_fix_rate_start_date'

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    op.create_table('job_statistics',
    sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('job_id', postgresql.UUID(as_uuid=True), nullable=True),
    sa.Column('emails_sent', sa.BigInteger(), nullable=False),
    sa.Column('emails_delivered', sa.BigInteger(), nullable=False),
    sa.Column('emails_failed', sa.BigInteger(), nullable=False),
    sa.Column('sms_sent', sa.BigInteger(), nullable=False),
    sa.Column('sms_delivered', sa.BigInteger(), nullable=False),
    sa.Column('sms_failed', sa.BigInteger(), nullable=False),
    sa.Column('letters_sent', sa.BigInteger(), nullable=False),
    sa.Column('letters_failed', sa.BigInteger(), nullable=False),
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_job_statistics_job_id'), 'job_statistics', ['job_id'], unique=True)


def downgrade():
    op.drop_index(op.f('ix_job_statistics_job_id'), table_name='job_statistics')
    op.drop_table('job_statistics')

{'fraction_non_alphanumeric': 0.14649147330164944, 'fraction_numerical': 0.020128599384959464, 'mean_word_length': 4.914049586776859, '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': '2127270', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1190, 'n_words': 198}