Destroys a field on a source table and all associated entities

@param string $name
@param string $tableName
@param NodeTypeContract $nodeType
352803
public function destroyField($name, $tableName, NodeTypeContract $nodeType)
    {
        $this->modelBuilder->build($tableName, $nodeType->getFields());
        $this->formBuilder->build($tableName, $nodeType->getFields());

        $migration = $this->migrationBuilder
            ->getMigrationClassPathByKey($tableName, $name);

        $this->migrateDown($migration);

        $this->migrationBuilder->destroyFieldMigrationForTable($name, $tableName);
    }
638671
public function destroyMigrationData($module_name) {
    if (empty($module_name)) {
      return;
    }
    // Get config entities that are dependent on module.
    $dependencies = $this->configManager->findConfigEntityDependentsAsEntities('module', (array) $module_name);
    // Create array of dependent migrations for module.
    // That module should be listed in dependencies of migration config.
    foreach ($dependencies as $dependency) {
      /** @var \Drupal\migrate_plus\Entity\Migration $dependency */
      if ($dependency->getEntityTypeId() == 'migration') {
        $migration_list[] = $dependency->get('id');
      }
    }
    if (!empty($migration_list)) {
      $migrations = $this->migrationManager->createInstances($migration_list);
      /** @var \Drupal\migrate\Plugin\Migration $migration */
      foreach ($migrations as $migration) {
        // Remove migration data in DB for this migration.
        $migration->getIdMap()->destroy();
      }
    }
  }
1061962
function (name) {
        var scene = this._scene;
        if (scene) {
            var nodeRepository = scene._nodeRepository;
            delete nodeRepository[this.name];
            nodeRepository[name] = this;
        }
        this.name = name;
    }
544891
public void deleteProduct(final String name) {
        final DbProduct dbProduct = getProduct(name);
        repositoryHandler.deleteProduct(dbProduct.getName());
    }
1308357
public function cleanUpAutoCreatedChildNodes(NodeInterface $node, NodeType $oldNodeType)
    {
        $newNodeType = $node->getNodeType();
        $autoCreatedChildNodesForNewNodeType = $newNodeType->getAutoCreatedChildNodes();
        $autoCreatedChildNodesForOldNodeType = $oldNodeType->getAutoCreatedChildNodes();
        $removedChildNodesFromOldNodeType = array_diff(
            array_keys($autoCreatedChildNodesForOldNodeType),
            array_keys($autoCreatedChildNodesForNewNodeType)
        );
        /** @var NodeInterface $childNode */
        foreach ($node->getChildNodes() as $childNode) {
            if (in_array($childNode->getName(), $removedChildNodesFromOldNodeType)) {
                $childNode->remove();
            }
        }
    }
463444
public int deleteByTableName(String tableName) throws SQLException {
		DeleteBuilder<MetadataReference, Void> db = deleteBuilder();
		db.where().eq(MetadataReference.COLUMN_TABLE_NAME, tableName);
		PreparedDelete<MetadataReference> deleteQuery = db.prepare();
		int deleted = delete(deleteQuery);
		return deleted;
	}
825108
public function fromType(string $entityClass, string $tableName = null)
    {
        $this->from($this->orm->getEntityMapper($entityClass, $tableName));
    }
1166118
protected function _renderNode($type, $name, $data)
    {
        $typeAlias = str_replace(' ', '-', strtolower($type));
        ?>
        <li class="jbchild">
            <div class="jbelement">
                <span class="jbname"><?php echo $name; ?></span>
                (<span class="jbtype jbtype-<?php echo $typeAlias; ?>"><?php echo $type; ?></span>)
                <span class="jbvalue"><?php echo $data; ?></span>
            </div>
        </li>
    <?php
    }
544681
protected function transformNodeType(NodeType $nodeType)
    {
        $this->setNodeTypeByKey($nodeType->getKey());

        foreach ($this->translations as $translation)
        {
            $translation->source_type = $nodeType->getName();
        }
    }
971340
public function type($name, $value)
    {
        $schema = Config::table($this->name)->schema();
        if (array_key_exists($name, $schema) && $schema[$name] == gettype($value))
        {
            return true;
        }
        throw new dbException('Wrong data type');
    }
391162
public int del(String tableName, String field, Object value) throws SQLException {
		return del(Entity.create(tableName).set(field, value));
	}
343907
public function execute(NodeData $node)
    {
        $node->setProperty($this->newPropertyName, $node->getProperty($this->oldPropertyName));
        $node->removeProperty($this->oldPropertyName);
    }
346976
public function onSitemapNodeDelete(TreeNodeEvent $event)
    {
        $node = $event->getNode();
        if (TextNodeInterface::NODE_TYPE === $node->getType()) {
            $this->nodeHandler->onDeleteNode($node);
        }
    }
1294648
public function execDown(string $name): void{
        $this->down();
        DB::connection('default')->table('migrations')->where('name', $name)->delete();
    }
509337
public function markComponentSuccessfullyUninstalled($name)
    {
        try {
            Option::delete(self::getNameInOptionTable($name));
        } catch (\Exception $e) {
            // case when the option table is not yet created (before 0.2.10)
        }

        /**
         * Event triggered after a component has been uninstalled.
         *
         * @param string $name The component that has been uninstalled.
         */
        Piwik::postEvent('Updater.componentUninstalled', array($name));
    }
931154
public function clear($entityName = null)
    {
        if ($entityName === null) {
            $this->scheduledForDelete =
            $this->scheduledForPersist =
            $this->updatedIndexes = array();
        } else {
            //TODO: implement for named entity classes
        }

        if ($this->evm->hasListeners(Events::onClear)) {
            $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->sm, $entityName));
        }
    }
329549
@Override
	public void removeField(final String name) {

		template.execute(solrClient -> {

			try {
				UpdateResponse response = new SchemaRequest.DeleteField(name).process(solrClient, collection);
				if (hasErrors(response)) {
					throw new SchemaModificationException(
							String.format("Removing field with name %s from collection %s failed with status %s. Server returned %s.",
									name, collection, response.getStatus(), response));
				}

				return Integer.valueOf(response.getStatus());
			} catch (Exception e) {
				throw new SchemaModificationException(
						String.format("Removing field with name %s from collection %s failed.", name, collection));
			}
		});
	}