+@RegisterMigration(8, FULL_MIGRATIONS)
+def creature_power_name_creature_unique(db_conn):
+ """
+ Add a unique constraint to name and creature on creature_power.
+
+ We don't want multiple creature powers with the same name per creature!
+ """
+ # Note: We don't actually check to see if this constraint is set
+ # up because at present there's no way to do so in sqlalchemy :\
+
+ metadata = MetaData(bind=db_conn.bind)
+
+ creature_power = Table(
+ 'creature_power', metadata,
+ autoload=True, autoload_with=db_conn.bind)
+
+ cons = changeset.constraint.UniqueConstraint(
+ 'name', 'creature', table=creature_power)
+
+ cons.create()
+
+