<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def up(self, migration_id=None, fake=False):
 """Executes migrations."""

        if not self.check_directory():
            return

        for migration in self.get_migrations_to_up(migration_id):
            logger.info('Executing migration: %s' % migration.filename)

            migration_module = self.load_migration_file(migration.filename)
            if not fake:
                if hasattr(migration_module, 'up'):
                    migration_module.up(self.db)
                else:
                    logger.error('No up method on migration %s' % migration.filename)

            record = migration.as_dict()
            record['date'] = datetime.utcnow()
            self.collection.insert(record)