def define_ua_schema(session):
 uaserver_tables = [{'name': dbconstants.APPS_TABLE, 'schema': dbconstants.APPS_SCHEMA}, {'name': dbconstants.USERS_TABLE, 'schema': dbconstants.USERS_SCHEMA}]
 for table in uaserver_tables:
  key = bytearray('/'.join([dbconstants.SCHEMA_TABLE, table['name']]))
  columns = bytearray(':'.join(table['schema']))
  define_schema = '\n        INSERT INTO "{table}" ({key}, {column}, {value})\n        VALUES (%(key)s, %(column)s, %(value)s)\n      '.format(table=dbconstants.SCHEMA_TABLE, key=ThriftColumn.KEY, column=ThriftColumn.COLUMN_NAME, value=ThriftColumn.VALUE)
  values = {'key': key, 'column': dbconstants.SCHEMA_TABLE_SCHEMA[0], 'value': columns}
  session.execute(define_schema, values)

def define_ua_schema ( session ) : uaserver_tables = [ { 'name' : dbconstants . APPS_TABLE , 'schema' : dbconstants . APPS_SCHEMA } , { 'name' : dbconstants . USERS_TABLE , 'schema' : dbconstants . USERS_SCHEMA } ] for table in uaserver_tables : key = bytearray ( '/' . join ( [ dbconstants . SCHEMA_TABLE , table [ 'name' ] ] ) ) columns = bytearray ( ':' . join ( table [ 'schema' ] ) ) define_schema = '\n        INSERT INTO "{table}" ({key}, {column}, {value})\n        VALUES (%(key)s, %(column)s, %(value)s)\n      ' . format ( table = dbconstants . SCHEMA_TABLE , key = ThriftColumn . KEY , column = ThriftColumn . COLUMN_NAME , value = ThriftColumn . VALUE ) values = { 'key' : key , 'column' : dbconstants . SCHEMA_TABLE_SCHEMA [ 0 ] , 'value' : columns } session . execute ( define_schema , values )
populate the schema table for the uaserver .