com\setasign\SetaFramework\Database\Manager\Column

MediumText Class MediumText

File: /SetaFramework/src/Database/Manager/Column/MediumText.php

Class hierarchy

Implements

Summary

Constants

DEFAULT_CURRENT_TIMESTAMP

public const AbstractColumn::DEFAULT_CURRENT_TIMESTAMP = 'current_timestamp()'

DEFAULT_NULL

public const AbstractColumn::DEFAULT_NULL = 'NULL'

Properties

$allowNull

protected bool AbstractColumn::$allowNull = false

$collation

protected ?string HasCollationTrait::$collation

$columnName

protected string AbstractColumn::$columnName

$default

protected mixed AbstractColumn::$default

$indexes

protected array AbstractColumn::$indexes = array()

$oldColumnName

protected ?string AbstractColumn::$oldColumnName

Methods

__construct()

public AbstractColumn::__construct (
string $columnName
)
Parameters
$columnName : string
 

addIndex()

Parameters
$type : string
 
$indexName : ?string
 

addPrimaryKey()

addUnique()

public AbstractColumn::addUnique (
?string $indexName = null
): $this
Parameters
$indexName : ?string
 

changeDataType()

Parameters
$newColumnObject : AbstractColumn
 

copy()

This method clones this object, removes the tableSchema and returns the clone.

getCollation()

public HasCollationTrait::getCollation (
void
): ?string

getDefault()

public AbstractColumn::getDefault (
void
): mixed

getIndexes()

public AbstractColumn::getIndexes (
void
): array

getName()

public AbstractColumn::getName (
void
): string

getOldColumnName()

public AbstractColumn::getOldColumnName (
void
): ?string

hasChanged()

public AbstractText::hasChanged (
AbstractColumn $compareColumn,
bool $compareDataType = true,
bool $compareName = true
): bool
Parameters
$compareColumn : AbstractColumn
 
$compareDataType : bool

Check whether both dataTypes are equal.

$compareName : bool

Check whether both columnNames are equal.

isAllowedNull()

public AbstractColumn::isAllowedNull (
void
): bool

removeAllIndexes()

removeIndex()

public AbstractColumn::removeIndex (
?string $indexName = null
): $this
Parameters
$indexName : ?string
 

rename()

public AbstractColumn::rename (
string $newName
): $this
Parameters
$newName : string
 
Exceptions

Throws \com\setasign\SetaFramework\Exception

setAllowNull()

public AbstractColumn::setAllowNull (
bool $allowNull = true
): $this
Parameters
$allowNull : bool
 

setCollation()

public HasCollationTrait::setCollation (
?string $collation
): $this
Parameters
$collation : ?string
 

setDefault()

public AbstractNoDefault::setDefault (
null|string|int $default
): $this

Method is disabled

Parameters
$default : null|string|int
 
Exceptions

Throws \BadMethodCallException Method is disabled

setOldColumnName()

public AbstractColumn::setOldColumnName (
string $oldColumnName
): $this

Used for TableSchemaBuilder. Will be ignored for hasChanged

Parameters
$oldColumnName : string