Fixed cabinet compatibility for postgres
 - load new ID by DB type
 - properly store and load from column locked (type char)