dropTable

@param string $name
@param bool   $ifExists

@return  string
481685
public static function dropDatabase($name, $ifExists = null)
    {
        $query = static::getQuery();

        return static::build(
            'DROP DATABASE',
            $ifExists ? 'IF EXISTS' : null,
            $query->quoteName($name)
        );
    }
52571
public function dropIndex($name)
    {
        if (strtolower($name) === 'identity') {
            throw new \LogicException('Unable to remove identity.');
        }

        if (strtolower($name) === 'primary') {
            $sql = <<<SQL
DECLARE @table NVARCHAR(512), @sql NVARCHAR(MAX);

SELECT @table = N%q;

SELECT @sql = 'ALTER TABLE ' + @table 
    + ' DROP CONSTRAINT ' + name + ';'
    FROM sys.key_constraints
    WHERE [type] = 'PK'
    AND [parent_object_id] = OBJECT_ID(@table);

EXEC sp_executeSQL @sql;
SQL;

            $this->db->execute(
                $this->db->getQuery(true)->format($sql, $this->db->replacePrefix($this->getName()))
            );

            return $this->reset();
        }

        if (!$this->hasIndex($name)) {
            return $this;
        }

        $this->db->execute(SqlsrvGrammar::build(
            'DROP INDEX',
            $this->db->getQuery(true)
                ->quoteName($this->getName() . '.' . $name)
        ));

        return $this->reset();
    }
1100593
public static function table($name)
    {
        Validate::table($name)->exists();

        $self                  = new self();
        $self->tables['local'] = $name;

        return $self;
    }
844662
public function createTable($name, $fields, array $constraints=[], $ifNotExists=TRUE)
	{
		$existsStr = $ifNotExists ? ' IF NOT EXISTS ' : ' ';

		// Reorganize into an array indexed with column information
		// Eg $columnArray[$colname] = array(
		// 		'type' => ...,
		// 		'constraint' => ...,
		// 		'index' => ...,
		// )
		$columnArray = \arrayZipper([
			'type' => $fields,
			'constraint' => $constraints
		]);

		// Join column definitions together
		$columns = [];
		foreach($columnArray as $n => $props)
		{
			$str = $this->getDriver()->quoteIdent($n);
			$str .= isset($props['type']) ? " {$props['type']}" : "";
			$str .= isset($props['constraint']) ? " {$props['constraint']}" : "";

			$columns[] = $str;
		}

		// Generate the sql for the creation of the table
		$sql = 'CREATE TABLE'.$existsStr.$this->getDriver()->quoteTable($name).' (';
		$sql .= implode(', ', $columns);
		$sql .= ')';

		return $sql;
	}
80003
public function isExists($name)
    {
        try {
            $this->getQueueId($name);
            $result = true;
        } catch (RuntimeException $e) {
            $result = false;
        }

        return $result;
    }
1114501
public function drop($ifExists = true, $option = '')
    {
        $builder = $this->db->getQuery(true)->getGrammar();

        $query = $builder::dropTable($this->getName(), $ifExists, $option);

        $this->db->setQuery($query)->execute();

        return $this->reset();
    }
356836
public function getTable($name)
    {
        if (!$this->hasTable($name)) {
            throw SchemaException::schemaTableDoesNotExist($this->getName(), $name);
        }

        return $this->tables[$name];
    }
755532
public static function dropConstraint($table, $name, $ifExists = false, $action = null)
    {
        $query = static::getQuery();

        return static::build(
            'ALTER TABLE',
            $query->quoteName($table),
            'DROP CONSTRAINT',
            $ifExists ? 'IF EXISTS' : null,
            $query->quoteName($name),
            $action
        );
    }
1249156
public function drop($name)
    {
        // check if a valid name and sequence exists
        if (! $name || ! $this->exists($name)) {
            return false;
        }

        return $this->connection->statement("
            declare
                e exception;
                pragma exception_init(e,-02289);
            begin
                execute immediate 'drop sequence {$name}';
            exception
            when e then
                null;
            end;");
    }
8064
public static function dropIndex($table, $name)
    {
        $query = static::getQuery();

        return static::build(
            'DROP INDEX',
            $query->quoteName($name),
            'ON',
            $query->quoteName($table)
        );
    }
1324794
public function dropColumn($name)
    {
        if (!$this->hasColumn($name)) {
            throw SchemaException::tableColumnDoesNotExist($this->getName(), $name);
        }

        unset($this->columns[$name]);
    }
141453
public function dropForeignKey($name)
    {
        if (!$this->hasForeignKey($name)) {
            throw SchemaException::tableForeignKeyDoesNotExist($this->getName(), $name);
        }

        unset($this->foreignKeys[$name]);
    }
607040
public function createTable($name)
    {
        $cloudTable = null;

        try {
            $this->_tableProxy->createTable($name);
            $cloudTable = new CloudTable($name, $this->_tableProxy);
        } catch (\Exception $e) {
            if ($e->getCode() == WindowsAzureErrorCodes::TABLE_ALREADY_EXISTS) {
                $cloudTable = new CloudTable($name, $this->_tableProxy);
            }
        }

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

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

        return $this;
    }
241077
public function dropColumn( $table, $name )
    {
        try
        {
            $tmpTable = $table . '_old';

            $this->startTransaction();

            $this->copyTable( $table, $tmpTable, [ $name ] );

            $this->dropTable( $tmpTable );

            $this->commitTransaction();
        }
        catch ( Exception $e )
        {
            $this->rollbackTransaction();

            return FALSE;
        }

        return TRUE;
    }
987915
public function deleteTable($name)
    {
        try {
            $this->_tableProxy->deleteTable($name);

            return true;
        } catch (\Exception $ex) {
            return false;
        }
    }
420769
private function getExtList($name, PaginationInterface $pagination, array $extList = [])
    {
        $ext = $this->extensionRegistry->getExtension($name);
        $deps = $ext->getDependency();
        foreach ($deps as $dep) {
            $extList = $this->getExtList($dep, $pagination, $extList);
        }
        if ($ext->supportPagination($pagination)) {
            $extList[$name] = $ext;
        }

        return $extList;
    }