<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_directory(self):
 """Check if migrations directory exists."""

        exists = os.path.exists(self.directory)
        if not exists:
            logger.error("No migrations directory found. Check your path or create a migration first.")
            logger.error("Directory: %s" % self.directory)
        return exists