<s> from sqlalchemy import * <EOL> from migrate import * <EOL> from migrate . changeset import * <EOL> from raggregate . guid_recipe import GUID <EOL> from raggregate . models import Submission <EOL> from raggregate . models import User <EOL> from raggregate . models import Comment <EOL> from raggregate . models import Vote <EOL> from raggregate . models import Epistle <EOL> from raggregate . models import Stat <EOL> model_list = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> meta = MetaData ( ) <EOL> def upgrade ( migrate_engine ) : <EOL> meta . bind = migrate_engine <EOL> for m in model_list : <EOL> t = eval ( m ) . __table__ <EOL> t . metadata = meta <EOL> for col in t . c : <EOL> if type ( col . type ) == DateTime : <EOL> col . alter ( type = DateTime ( timezone = True ) ) <EOL> def downgrade ( migrate_engine ) : <EOL> meta . bind = migrate_engine <EOL> for m in model_list : <EOL> t = eval ( m ) . __table__ <EOL> t . metadata = meta <EOL> for col in t . c : <EOL> if type ( col . type ) == DateTime : <EOL> col . alter ( type = DateTime ( timezone = False ) ) </s>
