src/Migration/Repository/SqlMigrationRepository.php
public function repositoryExists(): bool
    {
        switch ($this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME)) {
            case 'pgsql':
                $sql = 'select count(*) from information_schema.tables 
                        where table_schema = current_schema() 
                        and table_name = ?';
                break;
            case 'mysql':
                $sql = 'select count(*) from information_schema.tables 
                        where table_schema = database() 
                        and table_name = ?';
                break;
            case 'sqlsrv':
                $sql = "select count(*) from sysobjects where type = 'U' and name = ?";
                break;
            case 'sqlite':
                $sql = "select count(*) from sqlite_master where type = 'table' and name = ?";
                break;
            default:
                throw InvalidArgumentException::forDatabaseNotSupported();
        }

        $stmt = $this->pdo->prepare($sql);
        $stmt->bindParam(1, $this->table);
        $stmt->execute();

        return $stmt->fetch(PDO::FETCH_COLUMN) > 0;
    }
public function repositoryExists(): bool
    {
        switch ($this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME)) {
            case 'pgsql':
                $sql = 'select count(*) from information_schema.tables 
                        where table_schema = current_schema() 
                        and table_name = ?';
                break;
            case 'mysql':
                $sql = 'select count(*) from information_schema.tables 
                        where table_schema = database() 
                        and table_name = ?';
                break;
            case 'sqlsrv':
                $sql = "select count(*) from sysobjects where type = 'U' and name = ?";
                break;
            case 'sqlite':
                $sql = "select count(*) from sqlite_master where type = 'table' and name = ?";
                break;
            default:
                throw InvalidArgumentException::forDatabaseNotSupported();
        }

        $stmt = $this->pdo->prepare($sql);
        $stmt->bindParam(1, $this->table);
        $stmt->execute();

        return $stmt->fetch(PDO::FETCH_COLUMN) > 0;
    }
Determine if the migration repository exists.

@return bool