Gets the dropped columns according to the old/new tables.

@param \Fridge\DBAL\Schema\Table $oldTable The old table.
@param \Fridge\DBAL\Schema\Table $newTable The new table.

@return array The dropped columns.
558717
private function getDroppedColumns(Table $oldTable, Table $newTable)
    {
        $droppedColumns = array();

        foreach ($oldTable->getColumns() as $column) {
            if (!$newTable->hasColumn($column->getName())) {
                $droppedColumns[] = $column;
            }
        }

        return $droppedColumns;
    }
1148288
public function compare(Table $oldTable, Table $newTable)
    {
        $createdColumns = $this->getCreatedColumns($oldTable, $newTable);
        $alteredColumns = $this->getAlteredColumns($oldTable, $newTable);
        $droppedColumns = $this->getDroppedColumns($oldTable, $newTable);

        $this->detectRenamedColumns($createdColumns, $droppedColumns, $alteredColumns);

        return new TableDiff(
            $oldTable,
            $newTable,
            $createdColumns,
            $alteredColumns,
            $droppedColumns,
            $this->getCreatedPrimaryKey($oldTable, $newTable),
            $this->getDroppedPrimaryKey($oldTable, $newTable),
            $this->getCreatedForeignKeys($oldTable, $newTable),
            $this->getDroppedForeignKeys($oldTable, $newTable),
            $this->getCreatedIndexes($oldTable, $newTable),
            $this->getDroppedIndexes($oldTable, $newTable),
            $this->getCreatedChecks($oldTable, $newTable),
            $this->getDroppedChecks($oldTable, $newTable)
        );
    }
185050
public function getDropTableSql($table)
    {
        $table = $this->buildRealTableName($table);
        return $this->getSchema()->getDropTableSql($table);
    }
902635
public function renameTable($oldTableName, $newTableName)
    {
        if (!$this->hasTable($oldTableName)) {
            throw new LogicException('Table ' . $oldTableName . ' does not exist.');
        }

        return $this->query("ALTER TABLE \"$oldTableName\" RENAME \"$newTableName\"");
    }
901087
public function getTableCols(string $table): array
    {
        $schema = $this->conn->getSchemaManager();
        $tableCols = $schema->listTableColumns($table);
        $cols = [];
        foreach ($tableCols as $col) {
            $cols[$col->getName()] = [
                'length' => $col->getLength(),
                'type' => $col->getType(),
                'unsigned' => $col->getUnsigned(),
            ];
        }

        return $cols;
    }
13057
private function getCreatedColumns(Table $oldTable, Table $newTable)
    {
        $createdColumns = array();

        foreach ($newTable->getColumns() as $column) {
            if (!$oldTable->hasColumn($column->getName())) {
                $createdColumns[] = $column;
            }
        }

        return $createdColumns;
    }
562484
protected function getTableColumns()
    {
        if (!$this->model->getConnection()->isDoctrineAvailable()) {
            throw new \Exception(
                'You need to require doctrine/dbal: ~2.3 in your own composer.json to get database columns. '
            );
        }

        $table = $this->model->getConnection()->getTablePrefix().$this->model->getTable();
        /** @var \Doctrine\DBAL\Schema\MySqlSchemaManager $schema */
        $schema = $this->model->getConnection()->getDoctrineSchemaManager($table);

        // custom mapping the types that doctrine/dbal does not support
        $databasePlatform = $schema->getDatabasePlatform();

        foreach ($this->doctrineTypeMapping as $doctrineType => $dbTypes) {
            foreach ($dbTypes as $dbType) {
                $databasePlatform->registerDoctrineTypeMapping($dbType, $doctrineType);
            }
        }

        $database = null;
        if (strpos($table, '.')) {
            list($database, $table) = explode('.', $table);
        }

        return $schema->listTableColumns($table, $database);
    }
633676
protected function getTableColumns()
    {
        if (0 === count(self::$tableColumns)) {
            $table = $this->getTable();
            $connect = $this->getConnection();
            $builder = $connect->getSchemaBuilder();
            $columns = $builder->getColumnListing($table);

            self::$tableColumns = (array)$columns;
        }
        return self::$tableColumns;
    }
1351524
protected function newTable($table = null)
    {
        return new Table(
            static::$dbManager,
            $this->connectionName,
            $table ? : $this->tableName,
            static::$dbManager->getStructure($this->connectionName)
        );
    }
925752
private function getCreatedIndexes(Table $oldTable, Table $newTable)
    {
        $createdIndexes = array();

        foreach ($newTable->getFilteredIndexes() as $index) {
            if (!$oldTable->hasIndex($index->getName())
                || $this->compareIndexes($oldTable->getIndex($index->getName()), $index)) {
                $createdIndexes[] = $index;
            }
        }

        return $createdIndexes;
    }
74595
public function getOldTable(): TableStructure
    {
        if ($this->_oldTable === null) {
            $this->_oldTable = new TableStructure([
                'schema' => get_class($this->db->schema),
                'generalSchema' => $this->generalSchema,
                'usePrefix' => $this->useTablePrefix,
                'dbPrefix' => $this->db->tablePrefix,
            ]);

            $this->_oldTable->applyChanges(array_reverse($this->_appliedChanges));
        }

        return $this->_oldTable;
    }
1221834
public function getTableDumper()
    {
        if ($this->migrated) {
            return new TableDumper($this->getEntities());
        }

        if ($this->existing()) {
            return TableDumper::make($this->getEntities())
                ->except(['id', 'created_at', 'updated_at', 'deleted_at']);
        }

        return new FieldsDumper($fields);
    }
350994
public function get_columns($table) {
		$result = $this->get_table_definition($table);

		$columns = [];
		foreach ($result as $row) {
			$columns[] = &$row['Field'];
		}

		return $columns;
	}
384743
public function getColumns($table): ?array
	{
		return $this->driverQuery($this->getSql()->columnList($this->prefixTable($table)), FALSE);
	}
503012
private function getDroppedTables(Schema $oldSchema, Schema $newSchema)
    {
        $droppedTables = array();

        foreach ($oldSchema->getTables() as $table) {
            if (!$newSchema->hasTable($table->getName())) {
                $droppedTables[] = $table;
            }
        }

        return $droppedTables;
    }
258041
public function getTableColumns($table, $typeOnly=true)
	{
		$columns = $this->query($this->syntax->getColumnsQuery($table), 'rows');

		return $this->syntax->normalizeColumns($columns, $typeOnly);
	}
1228693
public function ExistingColumns() {
      if($this->_ExistingColumns === NULL) {
         if($this->TableExists())
            $this->_ExistingColumns = $this->Database->SQL()->FetchTableSchema($this->_TableName);
         else
            $this->_ExistingColumns = array();
      }
      return $this->_ExistingColumns;
   }