<s> revision = '<STR_LIT:5>' <EOL> down_revision = '<STR_LIT:4>' <EOL> from alembic import op <EOL> import sqlalchemy as sa <EOL> from sqlalchemy . ext . declarative import declarative_base <EOL> from sqlalchemy . orm import sessionmaker <EOL> def upgrade ( ) : <EOL> changeActivity ( old = '<STR_LIT>' , new = '<STR_LIT>' ) <EOL> def downgrade ( ) : <EOL> changeActivity ( old = '<STR_LIT>' , new = '<STR_LIT>' ) <EOL> def changeActivity ( old , new ) : <EOL> Base = declarative_base ( ) <EOL> Session = sessionmaker ( bind = op . get_bind ( ) ) <EOL> class Move ( Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> id = sa . Column ( sa . Integer , name = "<STR_LIT:id>" , primary_key = True ) <EOL> activity = sa . Column ( sa . String , name = '<STR_LIT>' ) <EOL> session = Session ( ) <EOL> session . query ( Move ) . filter ( Move . activity == old ) . update ( { '<STR_LIT>' : new } ) <EOL> session . commit ( ) </s>
