[WIP] Add conditions manager

$autogroups_type_name needs to be sql_escaped