/**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     $this->configManager->flushAllCaches();
     if ($schema instanceof ExtendSchema) {
         $queries->addQuery(new RefreshExtendConfigMigrationQuery($this->commandExecutor, $this->dataStorageExtension->get('initial_entity_config_state', []), $this->initialEntityConfigStatePath));
         $queries->addQuery(new RefreshExtendCacheMigrationQuery($this->commandExecutor));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     if ($schema instanceof ExtendSchema) {
         $queries->addQuery(new UpdateExtendConfigMigrationQuery($schema->getExtendOptions(), $this->commandExecutor, $this->configProcessorOptionsPath));
         $queries->addQuery(new RefreshExtendConfigMigrationQuery($this->commandExecutor, $this->dataStorageExtension->get('initial_entity_config_state', []), $this->initialEntityConfigStatePath));
         $queries->addQuery(new RefreshExtendCacheMigrationQuery($this->commandExecutor));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     $existingEnumTables = $this->getExistingEnumTables($schema);
     $optionSets = $this->dataStorageExtension->get('existing_option_sets');
     foreach ($optionSets as &$optionSet) {
         $entityTableName = $this->extendExtension->getTableNameByEntityClass($optionSet['class_name']);
         $data = $optionSet['data'];
         $enumCode = $this->buildEnumCode($optionSet['class_name'], $optionSet['field_name'], $existingEnumTables);
         $enumTable = $this->extendExtension->addEnumField($schema, $entityTableName, $optionSet['field_name'], $enumCode, $data['extend']['set_expanded'], false, ['extend' => ['owner' => $data['extend']['owner']]]);
         $existingEnumTables[] = $enumTable->getName();
         $optionSet['table_name'] = $entityTableName;
         $optionSet['enum_class_name'] = ExtendHelper::buildEnumValueClassName($enumCode);
         $optionSet['enum_table_name'] = $enumTable->getName();
     }
     $this->fillEnumValues($queries, $optionSets);
     $this->assignEnumValues($queries, $optionSets);
     $this->removeOptionSetAttributes($queries, $optionSets);
 }
 public function testHas()
 {
     $dataStorage = new DataStorageExtension();
     $dataStorage->put('test', ['test1' => 'test1']);
     $this->assertTrue($dataStorage->has('test'));
 }