@RegisterMigration(1, FULL_MIGRATIONS)
def creature_remove_is_demon(db_conn):
+ """
+ Remove the is_demon field from the creature model. We don't need
+ it!
+ """
metadata = MetaData(bind=db_conn.engine)
creature_table = Table(
'creature', metadata,
@RegisterMigration(2, FULL_MIGRATIONS)
def creature_powers_new_table(db_conn):
+ """
+ Add a new table for creature powers. Nothing needs to go in it
+ yet though as there wasn't anything that previously held this
+ information
+ """
metadata = MetaData(bind=db_conn.engine)
creature_powers = Table(
'creature_power', metadata,
@RegisterMigration(3, FULL_MIGRATIONS)
def level_exits_new_table(db_conn):
+ """
+ Make a new table for level exits and move the previously pickled
+ stuff over to here (then drop the old unneeded table)
+ """
# First, create the table
# -----------------------
metadata = MetaData(bind=db_conn.engine)
def _insert_migration1_objects(session):
+ """
+ Test objects to insert for the first set of things
+ """
# Insert creatures
session.add_all(
[Creature1(name='centipede',
def _insert_migration2_objects(session):
+ """
+ Test objects to insert for the second set of things
+ """
# Insert creatures
session.add_all(
[Creature2(