def has_migration_started(self,):
        from region_migration.models import DatabaseRegionMigrationDetail
        try:
            migration = self.migration.get()
        except __HOLE__:
            return False

        if migration.is_migration_finished():
            return False

        if migration.current_step > 0:
            return True

        status_to_check = [DatabaseRegionMigrationDetail.WAITING,
                           DatabaseRegionMigrationDetail.RUNNING]

        details = migration.details.filter(status__in=status_to_check)
        if details:
            return True

        return False
dataset/ETHPy150Open globocom/database-as-a-service/dbaas/logical/models.py/Database.has_migration_started