vendor/pimcore/data-importer/src/Migrations/Version20210305134111.php line 1

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under two different licenses:
  6.  * - GNU General Public License version 3 (GPLv3)
  7.  * - Pimcore Commercial License (PCL)
  8.  * Full copyright and license information is available in
  9.  * LICENSE.md which is distributed with this source code.
  10.  *
  11.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  12.  *  @license    http://www.pimcore.org/license     GPLv3 and PCL
  13.  */
  14. namespace Pimcore\Bundle\DataImporterBundle\Migrations;
  15. use Doctrine\DBAL\Schema\Schema;
  16. use Pimcore\Bundle\DataImporterBundle\Installer;
  17. use Pimcore\Migrations\BundleAwareMigration;
  18. use Pimcore\Model\Tool\SettingsStore;
  19. class Version20210305134111 extends BundleAwareMigration
  20. {
  21.     protected function getBundleName(): string
  22.     {
  23.         return 'PimcoreDataImporterBundle';
  24.     }
  25.     protected function checkBundleInstalled(): bool
  26.     {
  27.         //need to always return true here, as the migration is setting the bundle installed
  28.         return true;
  29.     }
  30.     public function up(Schema $schema): void
  31.     {
  32.         SettingsStore::set('BUNDLE_INSTALLED__Pimcore\\Bundle\\DataImporterBundle\\PimcoreDataImporterBundle'true'bool''pimcore');
  33.         $this->addSql(sprintf("INSERT IGNORE INTO users_permission_definitions (`key`, `category`) VALUES('%s', '%s');"Installer::DATAHUB_ADAPTER_PERMISSION\Pimcore\Bundle\DataHubBundle\Installer::DATAHUB_PERMISSION_CATEGORY));
  34.     }
  35.     public function down(Schema $schema): void
  36.     {
  37.     }
  38. }