check constraint in key