Create a new integer (4-byte) column on the table.

@param string $column
@param bool   $autoIncrement
@param bool   $unsigned

@return \Doctrine\DBAL\Schema\Column
542237
public function integer($column, $autoIncrement = false, $unsigned = false)
    {
        return $this->table->addColumn($column, Type::INTEGER, compact('autoIncrement', 'unsigned'));
    }
505300
protected function _getIntegerColumn(Column\Integer $column)
    {

        if ($column->getAutoIncrement()) {
            $this->_disablePrimaryConstraint = true;
            return $column->getName().' INTEGER PRIMARY KEY AUTOINCREMENT';
        }

        $type = 'INTEGER';

        $default = '';
        if ($column->getDefault()) {
            $default = ' DEFAULT '.$column->getDefault();
        }

        return sprintf(
            '%s %s%s%s%s',
            $column->getName(),
            $type,
            $this->_columnLength($column),
            $this->_nullableColumn($column),
            $default
        );
    }
349990
public function setAutoIncrement($autoIncrement)
    {
        if (!is_bool($autoIncrement)) {
            throw new \InvalidArgumentException('The attribute autoIncrement on the class Attribute has to be boolean (' . gettype($autoIncrement) . ('object' === gettype($autoIncrement) ? ' ' . get_class($autoIncrement) : '') . ' given).');
        }

        $this->autoIncrement = $autoIncrement;

        return $this;
    }
936339
def add_auto_increment(self, table, name):
        """"""
        # Get current column definition and add auto_incrementing
        definition = self.get_column_definition(table, name) + ' AUTO_INCREMENT'

        # Concatenate and execute modify statement
        self.execute("ALTER TABLE {0} MODIFY {1}".format(table, definition))
        self._printer('\tAdded AUTO_INCREMENT to column {0}'.format(name))
        return True
160459
public function prepareSchemaAppend(bool $primaryKey, bool $autoIncrement): ?string
    {
        switch ($this->schema) {
            case TableStructure::SCHEMA_MSSQL:
                $append = $primaryKey ? 'IDENTITY PRIMARY KEY' : '';
                break;

            case TableStructure::SCHEMA_OCI:
            case TableStructure::SCHEMA_PGSQL:
                $append = $primaryKey ? 'PRIMARY KEY' : '';
                break;

            case TableStructure::SCHEMA_SQLITE:
                $append = trim(($primaryKey ? 'PRIMARY KEY ' : '') . ($autoIncrement ? 'AUTOINCREMENT' : ''));
                break;

            case TableStructure::SCHEMA_CUBRID:
            case TableStructure::SCHEMA_MYSQL:
            default:
                $append = trim(($autoIncrement ? 'AUTO_INCREMENT ' : '') . ($primaryKey ? 'PRIMARY KEY' : ''));
        }

        return empty($append) ? null : $append;
    }
851481
public function getAutoIncrementValue(string $table, string $column = 'id')
    {
        $databaseServer = $this->connection->getDatabasePlatform()->getName();
        if (isset($this->databaseSpecificHelpers[$databaseServer])) {
            return $this->databaseSpecificHelpers[$databaseServer]
                ->getAutoIncrementValue($table, $column);
        }

        return 'null';
    }
127444
public int getAutoIncrementIncrement() throws SQLException {
    if (autoIncrementIncrement == 0) {
      lock.lock();
      try {
        Results results = new Results();
        executeQuery(true, results, "select @@auto_increment_increment");
        results.commandEnd();
        ResultSet rs = results.getResultSet();
        rs.next();
        autoIncrementIncrement = rs.getInt(1);
      } catch (SQLException e) {
        if (e.getSQLState().startsWith("08")) {
          throw e;
        }
        autoIncrementIncrement = 1;
      } finally {
        lock.unlock();
      }
    }
    return autoIncrementIncrement;
  }
451783
public function setAutoIncrement(int $value)
    {
        if (!$key = $this->autoIncrement()) {
            throw new \Exception('Autoincrement not defined for table `' . $this->name() . '`.');
        }

        $this[$key] = $value;

        return $this;
    }
1078384
public function bigInteger($column, $autoIncrement = false, $unsigned = false)
    {
        return $this->table->addColumn($column, Type::BIGINT, compact('autoIncrement', 'unsigned'));
    }
402950
public function addColumn(Column $column)
    {
        $this->columns[] = $column;

        if ($column instanceof ColumnInput) {
            $this->append_empty_row = true;
            $this->setWidth('100%');
        } elseif ($column instanceof ColumnOrder && $column->isDragable()) {
            $this->dragable = true;
        } elseif ($column instanceof ColumnTree && !$this->tree) {
            $this->tree_node_id = \count($this->columns) - 1;
            $this->tree = true;
        } elseif ($column instanceof ColumnTree && $this->tree) {
            throw new LogicException('May be only one ColumnTree');
        }

        return $this;
    }
666883
public function unsignedDecimal($column, $total = 8, $places = 2)
    {
        return $this->addColumn('decimal', $column, [
            'total' => $total, 'places' => $places, 'unsigned' => true,
        ]);
    }
675948
private function incrementAction($column, $step = 1, $sign = '')
    {
        $sql = 'update `' . $this->table . '` set `'.$column.'` = `'.$column.'` '.$sign.' '.$step;

        if (!is_null($this->where)) {
            $sql .= ' ' . $this->where;

            $this->where = null;
        }

        $stmt = $this->connection->prepare($sql);

        $this->bind($stmt, $this->where_data_binding);

        $stmt->execute();

        return (int) $stmt->rowCount();
    }
707218
final public function insertIntoJunction($table, $masterValue, array $slaves, $masterColumn = self::PARAM_JUNCTION_MASTER_COLUMN, $slaveColumn = self::PARAM_JUNCTION_SLAVE_COLUMN)
    {
        // Avoid executing empty query
        if (!empty($slaves)) {
            return $this->db->insertIntoJunction($table, array($masterColumn, $slaveColumn), $masterValue, $slaves)
                            ->execute();
        } else {
            return false;
        }
    }
399265
public function addColumn(Column $column)
    {
        $this->columns[] = $column;

        if ($column instanceof ColumnInterface) {
            $column->initialize($this);
        }

        return $this;
    }
1564
public function createIntegerColumn(string $name, int $size, bool $signed = true): IntegerColumn {
		$column = new SqliteIntegerColumn($name);
		$this->table->addColumn($column);
		return $column;
	}
891192
protected function incrementOrDecrement($column, $amount, $extra, $method)
    {
        $query = $this->newQuery();

        if (!$this->exists) {
            return $query->{$method}($column, $amount, $extra);
        }

        $this->incrementOrDecrementAttributeValue($column, $amount, $method);

        return $query->where(
            $this->getKeyName(),
            $this->getKey()
        )->{$method}($column, $amount, $extra);
    }
1346132
public function increments($column)
    {
        $result = parent::increments($column);
        $this->addCachePrimary($column);

        return $result;
    }