migrateDatabase example

$ioService->cls();
            $ioService->printBanner();
            $ioService->writeln('<info>Welcome to the Shopware updater </info>');
            $ioService->writeln(sprintf('Shopware Version %s', $version));
            $ioService->writeln('');
            $ioService->ask('Press return to start the update.');
            $ioService->cls();
        }

        $this->unpackFiles();
        $this->updateHtaccess();
        $this->migrateDatabase();
        $this->importSnippets();
        $this->cleanup();
        $this->synchronizeThemes();
        $this->writeLockFile();

        $ioService->cls();
        $ioService->writeln('');
        $ioService->writeln('');
        $ioService->writeln('<info>The update has been finished succesfuly.</info>');
        $ioService->writeln('Your shop is currently in maintenance mode.');
        $ioService->writeln(sprintf('Please delete <question>%s</question> to finish the update.', UPDATE_ASSET_PATH));
        

    protected function setUpMigrate()
    {
        if ($this->migrateOnce === false || self::$doneMigration === false) {
            if ($this->refresh === true) {
                $this->regressDatabase();

                // Reset counts on faked items                 Fabricator::resetCounts();
            }

            $this->migrateDatabase();
        }
    }

    /** * Regress migrations as defined by the class */
    protected function regressDatabase()
    {
        if ($this->migrate === false) {
            return;
        }

        
Home | Imprint | This part of the site doesn't use cookies.