system/Database/Forge.php
public function dropTable(string $table_name, bool $if_exists = false, bool $cascade = false)
	{
		if ($table_name === '')
		{
			if ($this->db->DBDebug)
			{
				throw new DatabaseException('A table name is required for that operation.');
			}

			return false;
		}

		// If the prefix is already starting the table name, remove it...
		if (! empty($this->db->DBPrefix) && strpos($table_name, $this->db->DBPrefix) === 0)
		{
			$table_name = substr($table_name, strlen($this->db->DBPrefix));
		}

		if (($query = $this->_dropTable($this->db->DBPrefix . $table_name, $if_exists, $cascade)) === true)
		{
			return true;
		}

		$query = $this->db->query($query);

		// Update table list cache
		if ($query && ! empty($this->db->dataCache['table_names']))
		{
			$key = array_search(strtolower($this->db->DBPrefix . $table_name),
				array_map('strtolower', $this->db->dataCache['table_names']), true);
			if ($key !== false)
			{
				unset($this->db->dataCache['table_names'][$key]);
			}
		}

		return $query;
	}
public function dropTable(string $table_name, bool $if_exists = false, bool $cascade = false)
	{
		if ($table_name === '')
		{
			if ($this->db->DBDebug)
			{
				throw new DatabaseException('A table name is required for that operation.');
			}

			return false;
		}

		// If the prefix is already starting the table name, remove it...
		if (! empty($this->db->DBPrefix) && strpos($table_name, $this->db->DBPrefix) === 0)
		{
			$table_name = substr($table_name, strlen($this->db->DBPrefix));
		}

		if (($query = $this->_dropTable($this->db->DBPrefix . $table_name, $if_exists, $cascade)) === true)
		{
			return true;
		}

		$query = $this->db->query($query);

		// Update table list cache
		if ($query && ! empty($this->db->dataCache['table_names']))
		{
			$key = array_search(strtolower($this->db->DBPrefix . $table_name),
				array_map('strtolower', $this->db->dataCache['table_names']), true);
			if ($key !== false)
			{
				unset($this->db->dataCache['table_names'][$key]);
			}
		}

		return $query;
	}
Drop Table

@param string  $table_name Table name
@param boolean $if_exists  Whether to add an IF EXISTS condition
@param boolean $cascade    Whether to add an CASCADE condition

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