Index
-
\com\setasign\SetaFramework
-
Database
-
Manager
-
Column
- AbstractBlob
- AbstractColumn
- AbstractFloat
- AbstractInteger
- AbstractLengthColumn
- AbstractNoDefault
- AbstractNumeric
- AbstractText
- BigInt
- Binary
- Blob
- Char
- Date
- DateTime
- Decimal
- Double
- EnumColumn
- FloatColumn
- HasCollation
- HasCollationTrait
- Integer
- LongBlob
- LongText
- MediumBlob
- MediumInt
- MediumText
- SmallInt
- Text
- Time
- TinyBlob
- TinyInt
- TinyText
- VarBinary
- VarChar
-
Column
-
Manager
-
Database
com\setasign\SetaFramework\Database\Manager\Column
SmallInt Class SmallInt
File: /SetaFramework/src/Database/Manager/Column/SmallInt.php
Class hierarchy
Summary
Methods
- __construct()
- addIndex()
- addPrimaryKey()
- addUnique()
- changeDataType()
- copy()
- getDefault()
- getIndexes()
- getLength()
- getName()
- getOldColumnName()
- hasChanged()
- isAllowedNull()
- isAutoIncrement()
- isUnsigned()
- removeAllIndexes()
- removeIndex()
- rename()
- setAllowNull()
- setAutoIncrement()
- setDefault()
- setLength()
- setOldColumnName()
- setUnsigned()
Constants
DEFAULT_CURRENT_TIMESTAMP
DEFAULT_NULL
Properties
$columnName
protected string AbstractColumn::$columnName
$default
protected mixed AbstractColumn::$default
$length
protected ?int AbstractLengthColumn::$length
$oldColumnName
protected ?string AbstractColumn::$oldColumnName
Methods
addIndex()
public AbstractColumn::addIndex (
string $type = \com\setasign\SetaFramework\Database\Manager\TableSchema::INDEX,
?string $indexName = null
): $this?string $indexName = null
Parameters
- $type : string
- $indexName : ?string
changeDataType()
Change the dataType of a column (with all possible attributes)
Parameters
- $newColumnObject : AbstractColumn
hasChanged()
Checks whether this column is the same as $compareColumn.
Parameters
- $compareColumn : AbstractColumn
- $compareDataType : bool
Check whether both dataTypes are equal.
- $compareName : bool
Check whether both columnNames are equal.
setAutoIncrement()
Note: If $isAutoIncrement === true then allowNull will be set to false by mysql after sync!
Note: InnoDB enforces if you have a primary key over multiple columns you can only use autoincrement on the first column.
Parameters
- $isAutoIncrement : bool
setDefault()
Note: If $isAutoIncrement === true then default will be set to null by mysql after sync!
Parameters
- $default : null|string|int
setOldColumnName()
Used for TableSchemaBuilder. Will be ignored for hasChanged
Parameters
- $oldColumnName : string
