Exemple #1
0
def downgrade_account():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('service_usage',
                    'cost',
                    existing_type=sa.DECIMAL(precision=28, scale=20),
                    type_=mysql.DECIMAL(precision=20, scale=6),
                    existing_nullable=True)
    op.alter_column('service_price',
                    'price',
                    existing_type=sa.DECIMAL(precision=28, scale=20),
                    type_=mysql.DECIMAL(precision=20, scale=6),
                    existing_nullable=True)
    op.drop_constraint(None, 'customer', type_='foreignkey')
    op.alter_column('account_history',
                    'delta',
                    existing_type=sa.DECIMAL(precision=28, scale=20),
                    type_=mysql.DECIMAL(precision=20, scale=6),
                    existing_nullable=True)
    op.alter_column('account',
                    'withdraw',
                    existing_type=sa.DECIMAL(precision=28, scale=20),
                    type_=mysql.DECIMAL(precision=20, scale=6),
                    existing_nullable=True)
    op.alter_column('account',
                    'balance',
                    existing_type=sa.DECIMAL(precision=28, scale=20),
                    type_=mysql.DECIMAL(precision=20, scale=6),
                    existing_nullable=True)
Exemple #2
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        't_tdtc_orders',
        sa.Column('should_pay_amt',
                  mysql.DECIMAL(precision=12, scale=2),
                  nullable=True))
    op.add_column('t_tdtc_orders',
                  sa.Column('pay_time', mysql.DATETIME(), nullable=True))
    op.add_column(
        't_tdtc_orders',
        sa.Column('real_pay_amt',
                  mysql.DECIMAL(precision=12, scale=2),
                  nullable=True))
    op.add_column('t_tdtc_orders',
                  sa.Column('status', mysql.VARCHAR(length=24), nullable=True))
    op.drop_constraint(None, 't_tdtc_orders', type_='unique')
    op.drop_column('t_tdtc_orders', 'year')
    op.drop_column('t_tdtc_orders', 'refund_amt')
    op.drop_column('t_tdtc_orders', 'paid_amt')
    op.drop_column('t_tdtc_orders', 'loan_amt')
    op.drop_column('t_tdtc_orders', 'fee_no')
    op.drop_column('t_tdtc_orders', 'fee_desc')
    op.drop_column('t_tdtc_orders', 'detect_amt')
    op.drop_column('t_tdtc_orders', 'begin_time')
    op.drop_column('t_tdtc_orders', 'amt')
Exemple #3
0
def downgrade_ganglia():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        'ram',
        sa.Column('time_date',
                  mysql.DECIMAL(precision=13, scale=6),
                  server_default=sa.text(u"'0.000000'"),
                  nullable=False))
    op.drop_column('ram', 'timestamp')
    op.add_column(
        'monitor',
        sa.Column('time_date',
                  mysql.DECIMAL(precision=13, scale=6),
                  nullable=True))
    op.drop_column('monitor', 'timestamp')
    op.add_column(
        'iostat',
        sa.Column('time_date',
                  mysql.DECIMAL(precision=13, scale=6),
                  server_default=sa.text(u"'0.000000'"),
                  nullable=False))
    op.drop_column('iostat', 'timestamp')
    op.add_column(
        'filesystem',
        sa.Column('time_date', mysql.BIGINT(display_width=20), nullable=False))
    op.drop_column('filesystem', 'timestamp')
    op.add_column(
        'cpu',
        sa.Column('time_date',
                  mysql.DECIMAL(precision=13, scale=6),
                  server_default=sa.text(u"'0.000000'"),
                  nullable=False))
    op.drop_column('cpu', 'timestamp')
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('grid_cellx',
                    sa.Column('id',
                              mysql.INTEGER(display_width=11),
                              nullable=False),
                    sa.Column('north_latitude',
                              mysql.DECIMAL(precision=12, scale=8),
                              nullable=False),
                    sa.Column('south_latitude',
                              mysql.DECIMAL(precision=12, scale=8),
                              nullable=False),
                    sa.Column('east_longitude',
                              mysql.DECIMAL(precision=12, scale=8),
                              nullable=False),
                    sa.Column('west_longitude',
                              mysql.DECIMAL(precision=12, scale=8),
                              nullable=False),
                    sa.PrimaryKeyConstraint('id'),
                    mysql_default_charset=u'utf8',
                    mysql_engine=u'InnoDB')
    op.drop_table('result')
    op.drop_table('grid_cell')
    op.drop_table('experiment')
    op.drop_table('city')
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('trade',
                    sa.Column('id',
                              mysql.INTEGER(display_width=4, unsigned=True),
                              nullable=False),
                    sa.Column('name', mysql.VARCHAR(length=6), nullable=False),
                    sa.Column('account',
                              mysql.VARCHAR(length=11),
                              nullable=False),
                    sa.Column('saving',
                              mysql.DECIMAL(unsigned=True,
                                            precision=8,
                                            scale=2),
                              server_default=sa.text("'0.00'"),
                              nullable=False),
                    sa.Column('expend',
                              mysql.DECIMAL(unsigned=True,
                                            precision=8,
                                            scale=2),
                              server_default=sa.text("'0.00'"),
                              nullable=False),
                    sa.Column('income',
                              mysql.DECIMAL(unsigned=True,
                                            precision=8,
                                            scale=2),
                              server_default=sa.text("'0.00'"),
                              nullable=False),
                    sa.PrimaryKeyConstraint('id'),
                    mysql_default_charset='utf8',
                    mysql_engine='InnoDB')
    op.drop_table('article')
Exemple #6
0
def upgrade_account():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('account',
                    'balance',
                    existing_type=mysql.DECIMAL(precision=20, scale=6),
                    type_=sa.DECIMAL(precision=28, scale=20),
                    existing_nullable=True)
    op.alter_column('account',
                    'withdraw',
                    existing_type=mysql.DECIMAL(precision=20, scale=6),
                    type_=sa.DECIMAL(precision=28, scale=20),
                    existing_nullable=True)
    op.alter_column('account_history',
                    'delta',
                    existing_type=mysql.DECIMAL(precision=20, scale=6),
                    type_=sa.DECIMAL(precision=28, scale=20),
                    existing_nullable=True)
    op.create_foreign_key(None, 'customer', 'tenant', ['os_tenant_id'],
                          ['tenant_id'])
    op.alter_column('service_price',
                    'price',
                    existing_type=mysql.DECIMAL(precision=20, scale=6),
                    type_=sa.DECIMAL(precision=28, scale=20),
                    existing_nullable=True)
    op.alter_column('service_usage',
                    'cost',
                    existing_type=mysql.DECIMAL(precision=20, scale=6),
                    type_=sa.DECIMAL(precision=28, scale=20),
                    existing_nullable=True)
Exemple #7
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'sell_order', type_='unique')
    op.alter_column('sell_order', 'status',
               existing_type=mysql.SMALLINT(display_width=6),
               nullable=False)
    op.drop_column('sell_order', 'side')
    op.drop_column('sell_order', 'number')
    op.drop_column('sell_order', 'amount')
    op.add_column('order', sa.Column('payment_amount', mysql.DECIMAL(precision=24, scale=8), nullable=False))
    op.add_column('order', sa.Column('proof_img', mysql.TEXT(), nullable=True))
    op.add_column('order', sa.Column('match_user_id', mysql.VARCHAR(length=36), nullable=True))
    op.add_column('order', sa.Column('current_price', mysql.DECIMAL(precision=24, scale=8), nullable=False))
    op.add_column('order', sa.Column('hold_amount', mysql.DECIMAL(precision=24, scale=8), nullable=False))
    op.add_column('order', sa.Column('details', mysql.VARCHAR(length=255), nullable=True))
    op.add_column('order', sa.Column('match_at', mysql.DATETIME(), nullable=True))
    op.add_column('order', sa.Column('payment_id', mysql.VARCHAR(length=36), nullable=True))
    op.add_column('order', sa.Column('fee', mysql.DECIMAL(precision=24, scale=8), nullable=False))
    op.drop_constraint(None, 'order', type_='foreignkey')
    op.create_foreign_key('order_ibfk_1', 'order', 'user', ['match_user_id'], ['id'])
    op.create_foreign_key('order_ibfk_3', 'order', 'payment', ['payment_id'], ['id'])
    op.drop_constraint(None, 'order', type_='unique')
    op.create_index('number', 'order', ['number'], unique=True)
    op.drop_column('order', 'side')
    op.drop_column('order', 'priority')
    op.drop_column('order', 'match_order_id')
    op.drop_column('assets', 'community_today_balance')
    op.drop_table('match_order_task')
    op.drop_table('match_order')
    op.drop_table('confirm_order')
    op.drop_table('buy_order')
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        'funds',
        sa.Column('unitNav',
                  mysql.DECIMAL(precision=14, scale=10),
                  nullable=True))
    op.add_column(
        'funds',
        sa.Column('annualizedRate',
                  mysql.DECIMAL(precision=22, scale=18),
                  nullable=True))
    op.add_column('funds', sa.Column('navDate',
                                     mysql.DATETIME(),
                                     nullable=True))
    op.add_column(
        'funds', sa.Column('acquisitionTime', mysql.DATETIME(), nullable=True))
    op.create_index('ix_id_code_acquisitionTime',
                    'funds', ['id', 'code', 'acquisitionTime'],
                    unique=False)
    op.create_index('ix_acquisitionTime',
                    'funds', ['acquisitionTime'],
                    unique=False)
    op.drop_index('ix_mechanismCode', table_name='funds')
    op.drop_index('ix_id_code_createTime', table_name='funds')
    op.drop_index('ix_createTime', table_name='funds')
    op.drop_column('funds', 'createTime')
    op.drop_index('ix_navDate', table_name='fundsnetvalue')
    op.drop_index('ix_id_navDate', table_name='fundsnetvalue')
    op.drop_index('ix_createTime', table_name='fundsnetvalue')
    op.drop_table('fundsnetvalue')
def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('event', 'lat',
               existing_type=mysql.DECIMAL(precision=11, scale=8),
               type_=sa.Numeric(precision=11, scale=6),
               existing_nullable=True)
    op.alter_column('event', 'long',
               existing_type=mysql.DECIMAL(precision=11, scale=8),
               type_=sa.Numeric(precision=11, scale=6),
               existing_nullable=True)
Exemple #10
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        'products',
        sa.Column('Special_price',
                  mysql.DECIMAL(precision=15, scale=2),
                  nullable=True))
    op.add_column(
        'products',
        sa.Column('Original_price',
                  mysql.DECIMAL(precision=15, scale=2),
                  nullable=True))
Exemple #11
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        'shaker',
        sa.Column('win_value',
                  mysql.DECIMAL(precision=20, scale=18),
                  nullable=True))
    op.add_column(
        'handshake',
        sa.Column('win_value',
                  mysql.DECIMAL(precision=20, scale=18),
                  nullable=True))
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index('user_id_UNIQUE', 'vote', ['user_id'], unique=True)
    op.create_index('event_id_UNIQUE', 'vote', ['event_id'], unique=True)
    op.alter_column('event', 'long',
               existing_type=sa.Numeric(precision=11, scale=6),
               type_=mysql.DECIMAL(precision=11, scale=8),
               existing_nullable=True)
    op.alter_column('event', 'lat',
               existing_type=sa.Numeric(precision=11, scale=6),
               type_=mysql.DECIMAL(precision=11, scale=8),
               existing_nullable=True)
Exemple #13
0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('transaction',
                    'amount',
                    existing_type=sa.DECIMAL(precision=19, scale=2),
                    type_=mysql.DECIMAL(precision=19, scale=4),
                    existing_nullable=True)
    op.alter_column('recurring_group',
                    'amount',
                    existing_type=sa.DECIMAL(precision=19, scale=2),
                    type_=mysql.DECIMAL(precision=19, scale=4),
                    existing_nullable=True)
Exemple #14
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('t_tdtc_orders',
                    sa.Column('id',
                              mysql.INTEGER(display_width=11),
                              nullable=False),
                    sa.Column('order_no',
                              mysql.VARCHAR(length=32),
                              nullable=True),
                    sa.Column('fee_name',
                              mysql.VARCHAR(length=32),
                              nullable=True),
                    sa.Column('student_no',
                              mysql.VARCHAR(length=24),
                              nullable=True),
                    sa.Column('create_time', mysql.DATETIME(), nullable=False),
                    sa.Column('update_time', mysql.DATETIME(), nullable=False),
                    sa.Column('remark',
                              mysql.VARCHAR(length=128),
                              nullable=True),
                    sa.Column('amt',
                              mysql.DECIMAL(precision=12, scale=2),
                              nullable=True),
                    sa.Column('begin_time', mysql.DATETIME(), nullable=True),
                    sa.Column('detect_amt',
                              mysql.DECIMAL(precision=12, scale=2),
                              nullable=True),
                    sa.Column('fee_desc',
                              mysql.VARCHAR(length=128),
                              nullable=True),
                    sa.Column('fee_no',
                              mysql.VARCHAR(length=32),
                              nullable=True),
                    sa.Column('loan_amt',
                              mysql.DECIMAL(precision=12, scale=2),
                              nullable=True),
                    sa.Column('paid_amt',
                              mysql.DECIMAL(precision=12, scale=2),
                              nullable=True),
                    sa.Column('refund_amt',
                              mysql.DECIMAL(precision=12, scale=2),
                              nullable=True),
                    sa.Column('year', mysql.VARCHAR(length=8), nullable=True),
                    sa.PrimaryKeyConstraint('id'),
                    mysql_default_charset=u'utf8',
                    mysql_engine=u'InnoDB')
    op.create_index('order_no', 't_tdtc_orders', ['order_no'], unique=True)
    op.create_index('fee_no', 't_tdtc_orders', ['fee_no'], unique=True)
    op.drop_table('t_tdtc_fees')
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('users', sa.Column('location', mysql.VARCHAR(length=64), nullable=True))
    op.add_column('users', sa.Column('about_me', mysql.TEXT(), nullable=True))
    op.add_column('users', sa.Column('avatar_hash', mysql.VARCHAR(length=32), nullable=True))
    op.create_table('douban_movie_profile_copy',
    sa.Column('id', mysql.INTEGER(display_width=11, unsigned=True), nullable=False),
    sa.Column('movie_title', mysql.VARCHAR(length=80), nullable=False),
    sa.Column('year', mysql.VARCHAR(length=8), nullable=False),
    sa.Column('intro', mysql.TEXT(), nullable=True),
    sa.Column('credit', mysql.DECIMAL(precision=2, scale=1), nullable=True),
    sa.Column('judge_crowd', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('img_src', mysql.VARCHAR(length=255), nullable=True),
    sa.Column('status', mysql.VARCHAR(length=5), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    mysql_default_charset='utf8',
    mysql_engine='InnoDB'
    )
    op.drop_index(op.f('ix_short_comments_timestamp'), table_name='short_comments')
    op.drop_table('short_comments')
    op.drop_index(op.f('ix_movie_comments_timestamp'), table_name='movie_comments')
    op.drop_table('movie_comments')
    op.drop_index(op.f('ix_reviews_timestamp'), table_name='reviews')
    op.drop_table('reviews')
    op.drop_table('douban_movie_profile')
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        'produto',
        sa.Column('preco', mysql.DECIMAL(precision=10, scale=2),
                  nullable=True))
    op.drop_column('produto', 'preco_un')
Exemple #17
0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(u'post',
                    'price',
                    existing_type=mysql.DECIMAL(precision=10, scale=2),
                    nullable=False)
    op.drop_column(u'post', 'type_code')
Exemple #18
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('country',
                    sa.Column('country_id',
                              mysql.INTEGER(display_width=11),
                              autoincrement=True,
                              nullable=False),
                    sa.Column('country_name',
                              mysql.VARCHAR(length=100),
                              nullable=False),
                    sa.Column('country_code',
                              mysql.VARCHAR(length=2),
                              nullable=False),
                    sa.Column('nationality',
                              mysql.VARCHAR(length=50),
                              nullable=False),
                    sa.PrimaryKeyConstraint('country_id'),
                    mysql_collate='utf8mb4_0900_ai_ci',
                    mysql_default_charset='utf8mb4',
                    mysql_engine='InnoDB')
    op.create_index('ix_country_country_code',
                    'country', ['country_code'],
                    unique=False)
    op.create_table('temp',
                    sa.Column('id',
                              mysql.DECIMAL(precision=10, scale=0),
                              nullable=True),
                    sa.Column('data', mysql.VARCHAR(length=100),
                              nullable=True),
                    mysql_collate='utf8mb4_0900_ai_ci',
                    mysql_default_charset='utf8mb4',
                    mysql_engine='InnoDB')
Exemple #19
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('submission',
                    'score',
                    existing_type=sa.Text(),
                    type_=mysql.DECIMAL(precision=6, scale=2),
                    existing_nullable=True)
Exemple #20
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        'run',
        sa.Column('distance',
                  mysql.DECIMAL(precision=10, scale=0),
                  nullable=True))
Exemple #21
0
def upgrade():
    op.add_column(
        'price__list',
        sa.Column('discount_amount_2_weeks',
                  mysql.DECIMAL(precision=10, scale=2),
                  nullable=True))
    op.add_column(
        'price__list',
        sa.Column('discount_amount_3_weeks',
                  mysql.DECIMAL(precision=10, scale=2),
                  nullable=True))
    op.add_column(
        'price__list',
        sa.Column('discount_amount_4_weeks',
                  mysql.DECIMAL(precision=10, scale=2),
                  nullable=True))
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('CashNotes',
                    sa.Column('isdelete',
                              mysql.TINYINT(display_width=1),
                              autoincrement=False,
                              nullable=True),
                    sa.Column('createtime', mysql.DATETIME(), nullable=True),
                    sa.Column('updatetime', mysql.DATETIME(), nullable=True),
                    sa.Column('CNid', mysql.VARCHAR(length=64),
                              nullable=False),
                    sa.Column('USid', mysql.VARCHAR(length=64), nullable=True),
                    sa.Column('CNbankName', mysql.TEXT(), nullable=True),
                    sa.Column('CNbankDetail', mysql.TEXT(), nullable=True),
                    sa.Column('CNcardNo',
                              mysql.VARCHAR(length=32),
                              nullable=True),
                    sa.Column('CNcashNum',
                              mysql.DECIMAL(precision=28, scale=2),
                              nullable=True),
                    sa.Column('CNstatus',
                              mysql.INTEGER(display_width=11),
                              autoincrement=False,
                              nullable=True),
                    sa.PrimaryKeyConstraint('CNid'),
                    mysql_default_charset='utf8',
                    mysql_engine='InnoDB')
    op.drop_table('cash_notes')
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('progressive_payments',
                    sa.Column('price_list_id',
                              mysql.INTEGER(),
                              autoincrement=False,
                              nullable=True),
                    sa.Column('due_by', sa.DATE(), nullable=True),
                    sa.Column('amount_due',
                              mysql.DECIMAL(precision=10, scale=2),
                              nullable=True),
                    sa.Column('first_payment',
                              mysql.TINYINT(display_width=1),
                              autoincrement=False,
                              nullable=True),
                    sa.Column('id',
                              mysql.INTEGER(),
                              autoincrement=False,
                              nullable=False),
                    sa.CheckConstraint('(`first_payment` in (0,1))',
                                       name='progressive_payments_chk_1'),
                    sa.ForeignKeyConstraint(
                        ['price_list_id'], ['price__list.id'],
                        name='progressive_payments_ibfk_1'),
                    mysql_collate='utf8_bin',
                    mysql_default_charset='utf8',
                    mysql_engine='InnoDB')
    op.drop_table('progressive__payment')
Exemple #24
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('user', 'is_superuser',
               existing_type=sa.Boolean(),
               type_=mysql.TINYINT(display_width=1),
               existing_nullable=False)
    op.alter_column('user', 'is_active',
               existing_type=sa.Boolean(),
               type_=mysql.TINYINT(display_width=1),
               existing_nullable=False)
    op.drop_constraint(None, 'product', type_='foreignkey')
    op.drop_index(op.f('ix_product_department_id'), table_name='product')
    op.alter_column('product', 'physical_count',
               existing_type=mysql.INTEGER(display_width=11),
               nullable=False)
    op.alter_column('product', 'expiration_count',
               existing_type=mysql.INTEGER(display_width=11),
               nullable=False)
    op.alter_column('product', 'cost',
               existing_type=mysql.DECIMAL(precision=10, scale=2),
               nullable=False)
    op.alter_column('product', 'category_id',
               existing_type=mysql.INTEGER(display_width=11),
               nullable=False)
    op.drop_column('product', 'department_id')
    op.drop_index(op.f('ix_department_id'), table_name='department')
    op.drop_table('department')
Exemple #25
0
def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('department',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=255), nullable=False),
    sa.Column('description', sa.String(length=255), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('name')
    )
    op.create_index(op.f('ix_department_id'), 'department', ['id'], unique=False)
    op.add_column('product', sa.Column('department_id', sa.Integer(), nullable=True))
    op.alter_column('product', 'category_id',
               existing_type=mysql.INTEGER(display_width=11),
               nullable=True)
    op.alter_column('product', 'cost',
               existing_type=mysql.DECIMAL(precision=10, scale=2),
               nullable=True)
    op.alter_column('product', 'expiration_count',
               existing_type=mysql.INTEGER(display_width=11),
               nullable=True)
    op.alter_column('product', 'physical_count',
               existing_type=mysql.INTEGER(display_width=11),
               nullable=True)
    op.create_index(op.f('ix_product_department_id'), 'product', ['department_id'], unique=False)
    op.create_foreign_key(None, 'product', 'department', ['department_id'], ['id'])
    op.alter_column('user', 'is_active',
               existing_type=mysql.TINYINT(display_width=1),
               type_=sa.Boolean(),
               existing_nullable=False)
    op.alter_column('user', 'is_superuser',
               existing_type=mysql.TINYINT(display_width=1),
               type_=sa.Boolean(),
               existing_nullable=False)
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('mf_goods', 'price',
               existing_type=mysql.DECIMAL(precision=7, scale=2),
               comment='商品价格',
               existing_comment='商品价格[余额]',
               existing_nullable=True)
    op.drop_column('mf_goods', 'credit')
Exemple #27
0
def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column(u'post',
                  sa.Column('type_code', sa.SmallInteger(), nullable=True))
    op.alter_column(u'post',
                    'price',
                    existing_type=mysql.DECIMAL(precision=10, scale=2),
                    nullable=True)
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        'pay_mode',
        sa.Column('name',
                  mysql.VARCHAR(collation=u'utf8_unicode_ci', length=100),
                  nullable=False))
    op.drop_column('pay_mode', 'names')
    op.alter_column('document',
                    'url',
                    existing_type=mysql.VARCHAR(collation=u'utf8_unicode_ci',
                                                length=200),
                    nullable=False)
    op.alter_column('document',
                    'name',
                    existing_type=mysql.VARCHAR(collation=u'utf8_unicode_ci',
                                                length=100),
                    nullable=False)
    op.alter_column('commodity',
                    'unit_price',
                    existing_type=mysql.DECIMAL(precision=10, scale=4),
                    nullable=False)
    op.alter_column('commodity',
                    'total_price',
                    existing_type=mysql.DECIMAL(precision=10, scale=2),
                    nullable=False)
    op.alter_column('commodity',
                    'quantity_and_unit',
                    existing_type=mysql.VARCHAR(collation=u'utf8_unicode_ci',
                                                length=100),
                    nullable=False)
    op.alter_column('commodity',
                    'hs_code',
                    existing_type=mysql.VARCHAR(collation=u'utf8_unicode_ci',
                                                length=10),
                    nullable=False)
    op.alter_column('commodity',
                    'commodity_type',
                    existing_type=mysql.VARCHAR(collation=u'utf8_unicode_ci',
                                                length=200),
                    nullable=False)
    op.alter_column('commodity',
                    'commodity_name',
                    existing_type=mysql.VARCHAR(collation=u'utf8_unicode_ci',
                                                length=200),
                    nullable=False)
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        'delete__price__list',
        sa.Column('no_discount_price_3_weeks',
                  mysql.DECIMAL(precision=10, scale=2),
                  nullable=True))
    op.add_column(
        'delete__price__list',
        sa.Column('no_discount_price_2_weeks',
                  mysql.DECIMAL(precision=10, scale=2),
                  nullable=True))
    op.add_column(
        'delete__price__list',
        sa.Column('no_discount_price_4_weeks',
                  mysql.DECIMAL(precision=10, scale=2),
                  nullable=True))
Exemple #30
0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        'salary',
        sa.Column('base_wage',
                  mysql.DECIMAL(precision=10, scale=2),
                  nullable=True))
    op.drop_column('salary', 'base_salary')