public function unApply($state, $schemaEditor)
    {
        // we
        $itemsToRun = [];

        // Phase 1 --
        /* @var $operation Operation */
        /** @var $newState ProjectState */
        $newState = $state;
        // we need to reverse the operations so that foreignkeys are removed
        // before model is destroyed
        foreach ($this->operations as $operation) {
            //Preserve new state from previous run to not tamper the same
            // state over all operations
            $newState = $newState->deepClone();
            $oldState = $newState->deepClone();
            $operation->updateState($newState);
            $operation->setAppLabel($this->getAppLabel());
            /*
             * we insert them in the reverse order so the last operation is
             * run first
             */
            array_unshift(
                $itemsToRun,
                [
                    'operation' => $operation,
                    'oldState' => $oldState,
                    'newState' => $newState,
                ]
            );
        }

        // Phase 2 -- Since we are un applying the old state is where we want
        // to go back to
        //   and the new state is where we are moving away from i.e
        //   we are moving from $newState to $oldState

        foreach ($itemsToRun as $runItem) {
            $schemaEditor->connection->beginTransaction();
            try {
                /** @var $operation Operation */
                $operation = $runItem['operation'];

                if (!$operation->isReducibleToSql()) {
                    $schemaEditor->addSql(
                        '-- MIGRATION NOW PERFORMS'.
                        ' OPERATION THAT CANNOT BE WRITTEN AS SQL:'
                    );
                }
                $schemaEditor->addSql(
                    sprintf(
                        '<fg=yellow>-- %s </>',
                        ucfirst($operation->getDescription())
                    )
                );

                if ($operation->isReducibleToSql()) {
                    $operation->databaseBackwards(
                        $schemaEditor,
                        $runItem['newState'],
                        $runItem['oldState']
                    );
                }
                $schemaEditor->connection->commit();
            } catch (\Exception $exception) {
                $schemaEditor->connection->rollBack();
                throw new CommandError($exception->getMessage());
            }
        }

        return $state;
    }