Removes the given index identified by its name from a table.

@param string $name Index name
@return \Phinx\Db\Table
169078
public function removeIndexByName($name)
    {
        $action = DropIndex::buildFromName($this->table, $name);
        $this->actions->addAction($action);

        return $this;
    }
717218
public function removeChildByName($name)
	{
		if(isset($this->name2index[$name]))
		{
			$tmp = $this->children[$this->name2index[$name]];
			if(isset($tmp->id))
				unset($this->id2index[$tmp->id]);
			unset($this->children[$this->name2index[$name]], $this->name2index[$name]);
			return $tmp;
		}
		return null;
	}
298844
public function dropPrimaryKey($name, $table = null)
    {
        return $this->db->alterTable($this->getTable($table))
                        ->dropConstraint($name)
                        ->execute();
    }
188658
public function removeMetadatum($name)
	{
		if (isset($this->metadata[$name]))
		{
			unset($this->metadata[$name]);
		}

		return $this;
	}
165557
public function removeAttr($name)
    {
        $remove_names = \is_array($name) ? $name : explode(' ', $name);

        foreach ($this->getElements() as $node) {
            foreach ($remove_names as $remove_name) {
                $node->removeAttribute($remove_name);
            }
        }

        return $this;
    }
811684
public function removeChild($name)
    {
        if (isset($this->children[$name])) {
            unset($this->children[$name]);
        }

        return $this;
    }
702591
public function dropColumn($name)
    {
        $column = new TextColumn($name);
        $column->setTable($this);

        $this->actions[] =  function () use ($column) {
             return $this->manipulation->drop($column);
        };

        return $this;
    }
1148255
public function removeName($nameIndex)
    {
        $removed = false;
        $positions = $this->positions;
        foreach ($positions as $position) {
            $source = $position->source;
            $ni = $source->nameIndex;
            if ($ni === $nameIndex) {
                $removed = true;
                $source->nameIndex = null;
                $source->name = null;
            } elseif ($ni > $nameIndex) {
                $source->nameIndex--;
            }
        }
        return $removed;
    }
659943
public function removeHeader($name)
    {
        $normalized = strtolower(trim($name));
        if (! isset($this->headerNames[$normalized])) {
            return $this;
        }
        $header = $this->headerNames[$normalized];
        unset($this->rawHeaders[$header]);
        unset($this->headerNames[$normalized]);

        return $this;
    }
1311260
public function removeProperty($name)
    {
        if($entity = $this->getIterator()->current()) {
            $entity->removeProperty($name);
        }

        return $this;
    }
355597
public function dropIndex($name)
    {
        if (is_array($name))
            $name = $this->name.'___'.implode('__', $name);
        elseif(!is_int(strpos($name,'___')))
            $name = $this->name.'___'.$name;
        $name = $this->db->quotekey($name);
        $table = $this->db->quotekey($this->name);
        $cmd = array(
            'pgsql|sqlite2?|ibm' =>
                "DROP INDEX $name;",
            'mssql|sybase|dblib|odbc|sqlsrv' =>
                "DROP INDEX $table.$name;",
            'mysql'=>
                "ALTER TABLE $table DROP INDEX $name;",
        );
        $query = $this->findQuery($cmd);
        $this->queries[] = $query;
    }
193315
public function removeFieldByName($name)
    {
        foreach ($this->fields as $i => $field) {
            if ($field->getName() == $name) {
                unset($this->fields[$i]);
                break;
            }
        }

        return $this;
    }
50104
public function rm($name) {
        $name  =  $this->options['prefix'].addslashes($name);
        return $this->handler->execute('DELETE FROM `'.$this->options['table'].'` WHERE `cachekey`=\''.$name.'\'');
    }
639671
public function delete( string $name ): Prop
	{
		$prop = new Prop([
			"action" => "delete",
			"deleted" => false
		]);

		// check old
		$row = self::getEventItem($name);
		if( !$row )
		{
			return $prop;
		}

		$this->permissible($row->module_id, $name);

		// dispatch event
		$event = new EventDeleteDriverEvent($this, $name);
		$dispatcher = EventManager::dispatcher($event->getName());
		$dispatcher->dispatch($event);

		$prop->set(
			"deleted",
			\DB::
				table("events")
					->whereId($row->id)
					->delete() > 0
		);

		$prop->get("deleted") && $this->addLogDebug(Text::createInstance("The %s event is successfully removed", $name));
		$dispatcher->complete($prop);
		return $prop;
	}
28849
public function removeField($name)
    {
        if (isset($this->fields[$name])) {
            unset($this->fields[$name]);
        }

        $this->prepareQuery();

        return $this;
    }
313089
public function withName(string $name) : Table
    {
        if ($this->name === $name) {
            return $this;
        }

        return new self($name, $this->columns, $this->indexes, $this->foreignKeys);
    }
176569
public function unregister($name)
    {
        $task = $parent::unregister($name);
        foreach ($this->slot[$task->getPluginSlot()] as $i => $check) {
            if ($check === $task) {
                unset($this->slot[$task->getPluginSlot()][$i]);
            }
        }

        return $task;
    }