<s> from sqlalchemy import * <EOL> from migrate import * <EOL> from migrate . changeset . constraint import UniqueConstraint <EOL> def upgrade ( migrate_engine ) : <EOL> meta = MetaData ( bind = migrate_engine ) <EOL> submissions = Table ( '<STR_LIT>' , meta , autoload = True ) <EOL> slugc = Column ( '<STR_LIT>' , UnicodeText ) <EOL> slugc . create ( submissions ) <EOL> slugu = UniqueConstraint ( slugc ) <EOL> slugu . create ( ) <EOL> def downgrade ( migrate_engine ) : <EOL> meta = MetaData ( bind = migrate_engine ) <EOL> submissions = Table ( '<STR_LIT>' , meta , autoload = True ) <EOL> slugu = UniqueConstraint ( submissions . c . slug ) <EOL> slugu . drop ( ) <EOL> submissions . c . slug . drop ( ) </s>
