def after_table_create(event, target, bind, tables=None, **kw):
 if tables:
  with flexget.manager.manager.acquire_lock(event=False):
   tables = [table.name for table in tables]
   for (plugin, info) in plugin_schemas.items():
    if all(((table in tables) for table in info[u'tables'])):
     set_version(plugin, info[u'version'])

def after_table_create ( event , target , bind , tables = None , ** kw ) : if tables : with flexget . manager . manager . acquire_lock ( event = False ) : tables = [ table . name for table in tables ] for ( plugin , info ) in plugin_schemas . items ( ) : if all ( ( ( table in tables ) for table in info [ u'tables' ] ) ) : set_version ( plugin , info [ u'version' ] )
sets the schema version to most recent for a plugin when its tables are freshly created .