TableSchema

Type
Class
Namespace
craft\db
Inherits
craft\db\TableSchema » yii\db\TableSchema (opens new window) » yii\base\BaseObject (opens new window)
Implements
yii\base\Configurable (opens new window)
Since
3.0.0

View source (opens new window)

# Public Properties

Property Description
columnNames (opens new window) array (opens new window) – List of column names.
columns (opens new window) yii\db\ColumnSchema (opens new window) – Column metadata of this table.
extendedForeignKeys array (opens new window)
foreignKeys (opens new window) array (opens new window) – Foreign keys of this table.
fullName (opens new window) string (opens new window) – The full name of this table, which includes the schema name prefix, if any.
name (opens new window) string (opens new window) – The name of this table.
primaryKey (opens new window) string (opens new window)[] – Primary keys of this table.
schemaName (opens new window) string (opens new window) – The name of the schema that this table belongs to.
sequenceName (opens new window) string (opens new window), null (opens new window) – Sequence name for the primary key.

# extendedForeignKeys

Type
array (opens new window)
Default value
null
Access
Read-only

View source (opens new window)

# Public Methods

Method Description
__call() (opens new window) Calls the named method which is not a class method.
__construct() (opens new window) Constructor.
__get() (opens new window) Returns the value of an object property.
__isset() (opens new window) Checks if a property is set, i.e. defined and not null.
__set() (opens new window) Sets value of an object property.
__unset() (opens new window) Sets an object property to null.
addExtendedForeignKey() Adds an extended foreign key to the internal array.
canGetProperty() (opens new window) Returns a value indicating whether a property can be read.
canSetProperty() (opens new window) Returns a value indicating whether a property can be set.
className() (opens new window) Returns the fully qualified name of this class.
fixPrimaryKey() (opens new window) Manually specifies the primary key for this table.
getColumn() (opens new window) Gets the named column metadata.
getColumnNames() (opens new window) Returns the names of all columns in this table.
getExtendedForeignKeys() Returns the array of extended foreign keys.
hasMethod() (opens new window) Returns a value indicating whether a method is defined.
hasProperty() (opens new window) Returns a value indicating whether a property is defined.
init() (opens new window) Initializes the object.

# addExtendedForeignKey()

Adds an extended foreign key to the internal array.

View source (opens new window)

Arguments

# getExtendedForeignKeys()

Returns the array of extended foreign keys.

View source (opens new window)

Returns

array (opens new window)