'Preparation before migration
@param moves     : List of dicts {tablename: [(fieldname, new_tablename, link_fieldname)]} to move a field from 1 table to another
- fieldname can be a tuple if the fieldname changes: (fieldname, new_fieldname)
@param news      : List of dicts {new_tablename: {\'lookup_field\': \'\',
\'tables\': [tablename: [fieldname]],
\'supers\': [tablename: [fieldname]],
} to create new records from 1 or more old tables (inc all instances of an SE)
- fieldname can be a tuple if the fieldname changes: (fieldname, new_fieldname)
@param ondeletes : List of tuples [(tablename, fieldname, reftable, ondelete)] to have the ondelete modified to
@param strbools  : List of tuples [(tablename, fieldname)] to convert from string/integer to bools
@param strints   : List of tuples [(tablename, fieldname)] to convert from string to integer
@param add_notnulls     : List of tuples [(tablename, fieldname)] to add notnull to
@param remove_foreigns  : List of tuples (tablename, fieldname) to have the foreign keys removed
- if tablename == "all" then all tables are checked
@param remove_uniques   : List of tuples [(tablename, fieldname)] to have the unique indices removed,'

def prep(self, moves=None, news=None, ondeletes=None, strbools=None, strints=None, add_notnulls=None, remove_foreigns=None, remove_uniques=None):

    self.moves = moves
    self.news = news
    self.strbools = strbools
    self.strints = strints
    self.backup()
    if add_notnulls:
        for (tablename, fieldname) in add_notnulls:
            self.add_notnull(tablename, fieldname)
    if remove_foreigns:
        for (tablename, fieldname) in remove_foreigns:
            self.remove_foreign(tablename, fieldname)
    if remove_uniques:
        for (tablename, fieldname) in remove_uniques:
            self.remove_unique(tablename, fieldname)
    if ondeletes:
        for (tablename, fieldname, reftable, ondelete) in ondeletes:
            self.ondelete(tablename, fieldname, reftable, ondelete)
    if strbools:
        for (tablename, fieldname) in strbools:
            self.drop_field(tablename, fieldname)
    if strints:
        for (tablename, fieldname) in strints:
            self.drop_field(tablename, fieldname)
    self.db.commit()
