#165766 by hswong3i: node SQL fixes - primary keys have indexes themselfs, unique columns should not allow NULL