Column Class
Aurora\Database\Schema Namespace
Constants
TYPE_BIGINT
—bigint
TYPE_BINARY
—binary
TYPE_BOOLEAN
—boolean
TYPE_CHAR
—char
TYPE_DATE
—date
TYPE_DATETIME
—datetime
TYPE_DECIMAL
—decimal
TYPE_DOUBLE
—double
TYPE_ENUM
—enum
TYPE_FLOAT
—float
TYPE_INT
—int
TYPE_JSON
—json
TYPE_LONGTEXT
—longtext
TYPE_MEDIUMINT
—mediumint
TYPE_MEDIUMTEXT
—mediumtext
TYPE_SMALLINT
—smallint
TYPE_STRING
—string
TYPE_TEXT
—text
TYPE_TIME
—time
TYPE_TIMESTAMP
—timestamp
TYPE_TINYINT
—tinyint
OPERATION_ADD
—add
OPERATION_MODIFY
—modify
OPERATION_RENAME
—rename
OPERATION_DROP
—drop
Properties
name
Column name
protected $name: mixed
type
Column type
protected $type: string
operation
Column operation
protected $operation: string
after
Column position
protected $after: string
length
Column length
protected $length = 0: mixed
precision
Column precision
protected $precision = 0: mixed
options
Column options
protected $options = 0: mixed
nullable
Nullable flag
protected $nullable = : bool
autoIncrement
Auto-increment flag
protected $autoIncrement = : bool
unsigned
Unsigned flag
protected $unsigned = : bool
default
Column default
protected $default: mixed
Constructor
__construct
Constructor
Parameters
string
$name
— Column name
Signature
public function __construct(string $name)
Methods
__construct
Constructor
Parameters
-
string
$name
— Column name
Signature
public function __construct(string $name)
name
Set column name
Parameters
-
string
$name
— Column name
Return Value
$this
Signature
public function name(string $name)
after
Set column position
Parameters
-
string
$after
— Name of the column after which this column is being inserted/moved
Return Value
$this
Signature
public function after(string $after)
type
Set column type
Parameters
-
string
$type
— Column type
Return Value
$this
Signature
public function type(string $type)
length
Set column length
Parameters
-
mixed
$length
— Column length
Return Value
$this
Signature
public function length(mixed $length)
precision
Set column precision
Parameters
-
mixed
$precision
— Column precision
Return Value
$this
Signature
public function precision(mixed $precision)
options
Set column options
Parameters
-
mixed
$options
— Column options
Return Value
$this
Signature
public function options(mixed $options)
nullable
Set column nullable flag
Parameters
-
bool
$nullable
— Column nullable flag
Return Value
$this
Signature
public function nullable(bool $nullable = 1)
unsigned
Set column unsigned flag
Parameters
-
bool
$unsigned
— Column unsigned flag
Return Value
$this
Signature
public function unsigned(bool $unsigned = 1)
autoIncrement
Set column auto increment flag
Parameters
-
bool
$autoIncrement
— Column auto increment flag
Return Value
$this
Signature
public function autoIncrement(bool $autoIncrement = 1)
default
Set column default, escaped
Parameters
-
mixed
$default
— Column default
Return Value
$this
Signature
public function default(mixed $default)
defaultRaw
Set column default, raw
Parameters
-
mixed
$default
— Column default
Return Value
$this
Signature
public function defaultRaw(mixed $default)
modify
Set column operation flag to modify
Return Value
$this
Signature
public function modify()
rename
Set column operation flag to rename
Parameters
-
mixed
$name
Return Value
$this
Signature
public function rename(mixed $name)
drop
Set column operation flag to drop
Return Value
$this
Signature
public function drop()
getName
Get column name
Return Value
string
Signature
public function getName(): string
getOldName
Get column old name, if a rename is pending
Return Value
string
Signature
public function getOldName(): string
getAfter
Get the column after which this column is being inserted/moved
Return Value
string
Signature
public function getAfter(): string
getType
Get column type
Return Value
string
Signature
public function getType(): string
getLength
Get column length
Return Value
mixed
Signature
public function getLength()
getPrecision
Get column precision
Return Value
mixed
Signature
public function getPrecision()
getOptions
Get column options
Return Value
mixed
Signature
public function getOptions()
getDefault
Get column default
Return Value
mixed
Signature
public function getDefault()
getOperation
Get column operation flag
Return Value
string
Signature
public function getOperation(): string
isNullable
Get column nullable flag
Return Value
bool
Signature
public function isNullable(): bool
isUnsigned
Get column unsigned flag
Return Value
bool
Signature
public function isUnsigned(): bool
isAutoIncrement
Get column auto-increment flag
Return Value
bool
Signature
public function isAutoIncrement(): bool