def rename_field():
 tablename = 'pr_person'
 print ('Testing table: %s' % tablename)
 table = db[tablename]
 for row in db((table.id > 0)).select():
  print ('id: %s, first_name: %s' % (row['id'], row['first_name']))
 attributes_to_copy = ['type', 'length', 'default', 'required', 'requires', 'ondelete', 'notnull', 'unique', 'uploadfield', 'widget', 'label', 'comment', 'writable', 'readable', 'update', 'authorize', 'autodelete', 'represent', 'uploadfolder', 'uploadseparate', 'uploadfs', 'compute', 'custom_store', 'custom_retrieve', 'custom_retrieve_file_properties', 'custom_delete', 'filter_in', 'filter_out']
 s3migrate.rename_field(tablename, 'first_name', 'first_name_test', attributes_to_copy)
 print 'Migrated data:'
 for row in db((table.id > 0)).select():
  print ('id: %s, first_name_test: %s' % (row['id'], row['first_name_test']))

def rename_field ( ) : tablename = 'pr_person' print ( 'Testing table: %s' % tablename ) table = db [ tablename ] for row in db ( ( table . id > 0 ) ) . select ( ) : print ( 'id: %s, first_name: %s' % ( row [ 'id' ] , row [ 'first_name' ] ) ) attributes_to_copy = [ 'type' , 'length' , 'default' , 'required' , 'requires' , 'ondelete' , 'notnull' , 'unique' , 'uploadfield' , 'widget' , 'label' , 'comment' , 'writable' , 'readable' , 'update' , 'authorize' , 'autodelete' , 'represent' , 'uploadfolder' , 'uploadseparate' , 'uploadfs' , 'compute' , 'custom_store' , 'custom_retrieve' , 'custom_retrieve_file_properties' , 'custom_delete' , 'filter_in' , 'filter_out' ] s3migrate . rename_field ( tablename , 'first_name' , 'first_name_test' , attributes_to_copy ) print 'Migrated data:' for row in db ( ( table . id > 0 ) ) . select ( ) : print ( 'id: %s, first_name_test: %s' % ( row [ 'id' ] , row [ 'first_name_test' ] ) )
test for s3migrate() .