Add constraint on pg tables