<commit_before>"""Add more informations on ADS

Revision ID: 59e5faf237f8
Revises: 27df69f29c56
Create Date: 2015-04-08 16:34:22.387152

"""

# revision identifiers, used by Alembic.
revision = '59e5faf237f8'
down_revision = '27df69f29c56'

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

def upgrade():
    vehicle_type = postgresql.ENUM('sedan', 'mpv', 'station_wagon', 'normal',
            name='vehicle_type')
    op.add_column('ADS', sa.Column('AC_vehicle', sa.Boolean(), nullable=True))
    op.add_column('ADS', sa.Column('amex_accepted', sa.Boolean(), nullable=True))
    op.add_column('ADS', sa.Column('baby_seat', sa.Boolean(), nullable=True))
    op.add_column('ADS', sa.Column('bank_check_accepted', sa.Boolean(), nullable=True))
    op.add_column('ADS', sa.Column('bike_accepted', sa.Boolean(), nullable=True))<commit_msg>fix the creation of the vehicle_type enum by alembic<commit_after>"""Add more informations on ADS

Revision ID: 59e5faf237f8
Revises: 27df69f29c56
Create Date: 2015-04-08 16:34:22.387152

"""

# revision identifiers, used by Alembic.
revision = '59e5faf237f8'
down_revision = '27df69f29c56'

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

def upgrade():

    # enum are not automatically created, so we create it
    # workaround from: https://bitbucket.org/zzzeek/alembic/issue/89/opadd_column-and-opdrop_column-should
    vehicle_type = postgresql.ENUM('sedan', 'mpv', 'station_wagon', 'normal',
            name='vehicle_type')
    bind = op.get_bind()
    impl = vehicle_type.dialect_impl(bind.dialect)
    impl.create(bind, checkfirst=True)

    op.add_column('ADS', sa.Column('AC_vehicle', sa.Boolean(), nullable=True))
    op.add_column('ADS', sa.Column('amex_accepted', sa.Boolean(), nullable=True))
    op.add_column('ADS', sa.Column('baby_seat', sa.Boolean(), nullable=True))
    op.add_column('ADS', sa.Column('bank_check_accepted', sa.Boolean(), nullable=True))
    op.add_column('ADS', sa.Column('bike_accepted', sa.Boolean(), nullable=True))
{'fraction_non_alphanumeric': 0.14347616754935003, 'fraction_numerical': 0.04910929224843524, 'mean_word_length': 5.374233128834356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '3108749', 'n_tokens_mistral': 823, 'n_tokens_neox': 732, 'n_words': 151}