remove CodeName use ID and UniqueKey constrain

Signed-off-by: chavp <my.parinya@gmail.com>