## p_usrloc: location.sql missing columns
[location.sql](https://github.com/kamailio/kamailio/blob/6c01e2692d5ff56dda54d21469d32c4d3d...) should include columns corresponding to `RUID_COL` and `REG_ID_COL`) from [p_usrloc_mod.c](https://github.com/kamailio/kamailio/blob/6c01e2692d5ff56dda54d21469d32c4d3d...)
### Log Messages ``` kamailio: ERROR: db_mysql [km_dbase.c:127]: db_mysql_submit_query(): driver error on query: Unknown column 'reg_id' in 'field list' (1054) kamailio: ERROR: <core> [db_query.c:132]: db_do_query_internal(): error while submitting query kamailio: ERROR: p_usrloc [ul_db_query.c:110]: db_exec_query(): could not query table location. ``` ``` kamailio: ERROR: db_mysql [km_dbase.c:127]: db_mysql_submit_query(): driver error on query: Unknown column 'ruid' in 'field list' (1054) kamailio: ERROR: <core> [db_query.c:132]: db_do_query_internal(): error while submitting query kamailio: ERROR: p_usrloc [ul_db_query.c:110]: db_exec_query(): could not query table location. ``` ### Solutions Adding columns referenced by [p_usrloc_mod.c](https://github.com/kamailio/kamailio/blob/6c01e2692d5ff56dda54d21469d32c4d3d...) to match `kamdbctl`'s [usrloc-create.sql](https://github.com/kamailio/kamailio/blob/6c01e2692d5ff56dda54d21469d32c4d3d...)
`kamdbctl`'s [usrloc-create.sql](https://github.com/kamailio/kamailio/blob/6c01e2692d5ff56dda54d21469d32c4d3d...) already includes all of these columns plus others and indexes, is this file better completely removed?
Closed #1265 via 9be2a96651f743af0a22d0534ee9fc90e857d484.
Hello,
p_usrloc has not been kept up to date with latest usrloc and as such for now I cannot tell you if the seemingly superset of columns in the usrloc-create.sql does it. If we only had one sql, the patching would also have to be done in the unlikely case that usrloc would delete fields in the usrloc-create.sql imho.
Thanks