<commit_before>"""empty message

Revision ID: 32b1afcf724d
Revises: <KEY>
Create Date: 2016-12-30 14:01:24.416473

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<KEY>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('check', sa.Column('parent_check_id', sa.Integer(), nullable=True))
    op.add_column('check', sa.Column('read_only', sa.Boolean(), nullable=False, default=False))
    op.add_column('data_source', sa.Column('parent_data_source_id', sa.Integer(), nullable=True))
    op.add_column('data_source', sa.Column('read_only', sa.Boolean(), nullable=False, default=False))
    op.add_column('job_template', sa.Column('parent_job_template_id', sa.Integer(), nullable=True))
    op.add_column('job_template', sa.Column('read_only', sa.Boolean(), nullable=False, default=False))
    op.add_column('rule', sa.Column('parent_rule_id', sa.Integer(), nullable=True))
    op.add_column('rule', sa.Column('read_only', sa.Boolean(), nullable=False, default=False))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('rule', 'read_only')
    op.drop_column('rule', 'parent_rule_id')
    op.drop_column('job_template', 'read_only')
    op.drop_column('job_template', 'parent_job_template_id')
    op.drop_column('data_source', 'read_only')
    op.drop_column('data_source', 'parent_data_source_id')
    op.drop_column('check', 'read_only')
    op.drop_column('check', 'parent_check_id')
    # ### end Alembic commands ###<commit_msg>further hotfix to column default<commit_after>"""empty message

Revision ID: <KEY>
Revises: <KEY>
Create Date: 2016-12-30 14:01:24.416473

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<KEY>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('check', sa.Column('parent_check_id', sa.Integer(), nullable=True))
    op.add_column('check', sa.Column('read_only', sa.Boolean()))
    op.execute('update check set read_only = false')
    op.alter_column('check', 'read_only', nullable=False)
    op.add_column('data_source', sa.Column('parent_data_source_id', sa.Integer(), nullable=True))
    op.add_column('data_source', sa.Column('read_only', sa.Boolean()))
    op.execute('update data_source set read_only = false')
    op.alter_column('data_source', 'read_only', nullable=False)
    op.add_column('job_template', sa.Column('parent_job_template_id', sa.Integer(), nullable=True))
    op.add_column('job_template', sa.Column('read_only', sa.Boolean()))
    op.execute('update job_template set read_only = false')
    op.alter_column('job_template', 'read_only', nullable=False)
    op.add_column('rule', sa.Column('parent_rule_id', sa.Integer(), nullable=True))
    op.add_column('rule', sa.Column('read_only', sa.Boolean()))
    op.execute('update rule set read_only = false')
    op.alter_column('rule', 'read_only', nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('rule', 'read_only')
    op.drop_column('rule', 'parent_rule_id')
    op.drop_column('job_template', 'read_only')
    op.drop_column('job_template', 'parent_job_template_id')
    op.drop_column('data_source', 'read_only')
    op.drop_column('data_source', 'parent_data_source_id')
    op.drop_column('check', 'read_only')
    op.drop_column('check', 'parent_check_id')
    # ### end Alembic commands ###
{'fraction_non_alphanumeric': 0.16310160427807488, 'fraction_numerical': 0.01229946524064171, 'mean_word_length': 5.461139896373057, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '5814316', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1250, 'n_words': 244}