'This function adds a new _unique_ field into the table, while keeping all the rest of
the properties of the table unchanged
@param db : database instance'

@staticmethod
def _add_new_fields(db, new_unique_field, tablename):

    new_field = Field(new_unique_field, 'integer')
    table = db[tablename]
    if hasattr(table, '_primarykey'):
        primarykey = table._primarykey
    else:
        primarykey = None
    db.define_table(tablename, table, new_field, primarykey=primarykey)
