public function isUpdateRequired(): bool
    {
        $history = $this->fetchHistory();

        if (!empty($history)) {
            $this->setDummyMigrationClass();

            foreach ($history as $migration => $time) {
                $migration = trim($migration, '\\');
                if (in_array($migration, $this->skipMigrations, true)) {
                    continue;
                }

                if (!$this->gatherChanges($this->extract($migration))) {
                    break;
                }
            }

            return $this->compareStructures();
        }

        return true;
    }