/** * @inheritdoc * @throws \Exception */ public function update() { try { $this->connection->executeQuery('ALTER TABLE s_import_export_profile ADD UNIQUE (`name`);'); $defaultProfileInstaller = new DefaultProfileInstaller($this->setupContext, $this->connection); $defaultProfileInstaller->install(); } catch (DBALException $exception) { if (!$this->isDuplicateNameError($exception)) { throw $exception; } throw new DuplicateNameException($this->snippetManager->getNamespace('backend/swag_importexport/default_profiles')->get('update/duplicate_names')); } }