def createTables(tables, ifNotExists=True):
 for table in tables:
  _dbschema_logger.info('creating table %s', table._imdbpyName)
  table.createTable(ifNotExists)
  if table._imdbpySchema.values:
   _dbschema_logger.info('inserting values into table %s', table._imdbpyName)
   for key in table._imdbpySchema.values:
    for value in table._imdbpySchema.values[key]:
     table(**{key: unicode(value)})

def createTables ( tables , ifNotExists = True ) : for table in tables : _dbschema_logger . info ( 'creating table %s' , table . _imdbpyName ) table . createTable ( ifNotExists ) if table . _imdbpySchema . values : _dbschema_logger . info ( 'inserting values into table %s' , table . _imdbpyName ) for key in table . _imdbpySchema . values : for value in table . _imdbpySchema . values [ key ] : table ( ** { key : unicode ( value ) } )
create the tables and insert default values .