Moved constraint to migration