upgrade sql_register()