def add_new_field():
 field_to_update = 'new_field2'
 tablename = 'org_organisation'
 s3migrate.migrate_to_unique_field(tablename, field_to_update, mapping_function(), ['org_organisation_type', 'org_sector'])
 table = db[tablename]
 for row in db((table.id > 0)).select(['id'], table[field_to_update]):
  print 'id = ', row['id'], field_to_update, ' = ', row[field_to_update]

def add_new_field ( ) : field_to_update = 'new_field2' tablename = 'org_organisation' s3migrate . migrate_to_unique_field ( tablename , field_to_update , mapping_function ( ) , [ 'org_organisation_type' , 'org_sector' ] ) table = db [ tablename ] for row in db ( ( table . id > 0 ) ) . select ( [ 'id' ] , table [ field_to_update ] ) : print 'id = ' , row [ 'id' ] , field_to_update , ' = ' , row [ field_to_update ]
test for s3migrate() .