<s> """<STR_LIT>""" <EOL> revision = '<STR_LIT>' <EOL> down_revision = None <EOL> import decimal <EOL> from alembic import op <EOL> from sqlalchemy . sql import column <EOL> from sqlalchemy . sql import table <EOL> from sqlalchemy import Numeric <EOL> from sqlalchemy import Integer <EOL> plan = table ( <EOL> '<STR_LIT>' , <EOL> column ( '<STR_LIT>' , Numeric ( <NUM_LIT:10> , <NUM_LIT:2> ) ) <EOL> ) <EOL> subscription = table ( <EOL> '<STR_LIT>' , <EOL> column ( '<STR_LIT>' , Numeric ( <NUM_LIT:10> , <NUM_LIT:2> ) ) <EOL> ) <EOL> transaction = table ( <EOL> '<STR_LIT>' , <EOL> column ( '<STR_LIT>' , Numeric ( <NUM_LIT:10> , <NUM_LIT:2> ) ) <EOL> ) <EOL> def upgrade ( ) : <EOL> op . execute ( <EOL> plan . update ( ) . values ( dict ( amount = plan . c . amount * <NUM_LIT:100> ) ) <EOL> ) <EOL> op . execute ( <EOL> subscription . update ( ) . values ( dict ( amount = subscription . c . amount * <NUM_LIT:100> ) ) <EOL> ) <EOL> op . execute ( <EOL> transaction . update ( ) . values ( dict ( amount = transaction . c . amount * <NUM_LIT:100> ) ) <EOL> ) <EOL> bind = op . get_bind ( ) <EOL> if bind is None or bind . engine . name != '<STR_LIT>' : <EOL> op . alter_column ( '<STR_LIT>' , '<STR_LIT>' , type_ = Integer ) <EOL> op . alter_column ( '<STR_LIT>' , '<STR_LIT>' , type_ = Integer ) <EOL> op . alter_column ( '<STR_LIT>' , '<STR_LIT>' , type_ = Integer ) <EOL> def downgrade ( ) : <EOL> bind = op . get_bind ( ) <EOL> if bind is None or bind . engine . name != '<STR_LIT>' : <EOL> op . alter_column ( '<STR_LIT>' , '<STR_LIT>' , type_ = Numeric ( <NUM_LIT:10> , <NUM_LIT:2> ) ) <EOL> op . alter_column ( '<STR_LIT>' , '<STR_LIT>' , type_ = Numeric ( <NUM_LIT:10> , <NUM_LIT:2> ) ) <EOL> op . alter_column ( '<STR_LIT>' , '<STR_LIT>' , type_ = Numeric ( <NUM_LIT:10> , <NUM_LIT:2> ) ) <EOL> num = decimal . Decimal ( '<STR_LIT:100>' ) <EOL> op . execute ( <EOL> plan . update ( ) . values ( dict ( amount = plan . c . amount / num ) ) <EOL> ) <EOL> op . execute ( <EOL> subscription . update ( ) . values ( dict ( amount = subscription . c . amount / num ) ) <EOL> ) <EOL> op . execute ( <EOL> transaction . update ( ) . values ( dict ( amount = transaction . c . amount / num ) ) <EOL> ) </s>
