@downgrades(1)
def _downgrade_v1(op):
 op.drop_index('ix_futures_contracts_root_symbol')
 op.drop_index('ix_futures_contracts_symbol')
 with op.batch_alter_table('futures_contracts') as batch_op:
  batch_op.alter_column(column_name='multiplier', new_column_name='contract_multiplier')
  batch_op.drop_column('tick_size')
 op.create_index('ix_futures_contracts_root_symbol', table_name='futures_contracts', columns=['root_symbol'])
 op.create_index('ix_futures_contracts_symbol', table_name='futures_contracts', columns=['symbol'], unique=True)

@ downgrades ( 1 ) def _downgrade_v1 ( op ) : op . drop_index ( 'ix_futures_contracts_root_symbol' ) op . drop_index ( 'ix_futures_contracts_symbol' ) with op . batch_alter_table ( 'futures_contracts' ) as batch_op : batch_op . alter_column ( column_name = 'multiplier' , new_column_name = 'contract_multiplier' ) batch_op . drop_column ( 'tick_size' ) op . create_index ( 'ix_futures_contracts_root_symbol' , table_name = 'futures_contracts' , columns = [ 'root_symbol' ] ) op . create_index ( 'ix_futures_contracts_symbol' , table_name = 'futures_contracts' , columns = [ 'symbol' ] , unique = True )
downgrade assets db by removing the tick_size column and renaming the multiplier column .