system/Database/Forge.php
public function addColumn(string $table, $field): bool
	{
		// Work-around for literal column definitions
		is_array($field) || $field = [$field];

		foreach (array_keys($field) as $k)
		{
			$this->addField([$k => $field[$k]]);
		}

		$sqls = $this->_alterTable('ADD', $this->db->DBPrefix . $table, $this->_processFields());
		$this->reset();
		if ($sqls === false)
		{
			if ($this->db->DBDebug)
			{
				throw new DatabaseException('This feature is not available for the database you are using.');
			}

			return false;
		}

		for ($i = 0, $c = count($sqls); $i < $c; $i++)
		{
			if ($this->db->query($sqls[$i]) === false)
			{
				return false;
			}
		}

		return true;
	}
public function addColumn(string $table, $field): bool
	{
		// Work-around for literal column definitions
		is_array($field) || $field = [$field];

		foreach (array_keys($field) as $k)
		{
			$this->addField([$k => $field[$k]]);
		}

		$sqls = $this->_alterTable('ADD', $this->db->DBPrefix . $table, $this->_processFields());
		$this->reset();
		if ($sqls === false)
		{
			if ($this->db->DBDebug)
			{
				throw new DatabaseException('This feature is not available for the database you are using.');
			}

			return false;
		}

		for ($i = 0, $c = count($sqls); $i < $c; $i++)
		{
			if ($this->db->query($sqls[$i]) === false)
			{
				return false;
			}
		}

		return true;
	}
Column Add

@param string        $table Table name
@param string|array  $field Column definition

@return boolean
@throws \CodeIgniter\Database\Exceptions\DatabaseException