donatj / mysql-schema
Object Hierarchy Representing MySQL Schema
v0.4.0
2026-02-13 18:31 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- donatj/drop: *
- phpunit/phpunit: 3.7.*
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-09 23:26:36 UTC
README
An intentionally small PHP object model for describing MySQL tables and rendering CREATE TABLE statements. Define columns, keys, foreign keys, and table options in PHP, then call toString() to produce SQL for your application or migration tool to execute.
Requirements
- php: >=7.4
Installing
Install the latest version with:
composer require 'donatj/mysql-schema'
Example
The following example defines a users table with an auto-increment primary key and a unique email index:
<?php require __DIR__ . '/../vendor/autoload.php'; use donatj\MySqlSchema\Columns\Numeric\Integers\IntColumn; use donatj\MySqlSchema\Columns\String\Character\VarcharColumn; use donatj\MySqlSchema\Table; $users = new Table('users'); $id = new IntColumn('id'); $users->addAutoIncrement($id); $email = new VarcharColumn('email', 255); $users->addColumn($email); $users->addKeyColumn('email_unique', $email, null, 'UNIQUE'); echo $users->toString();
It renders:
CREATE TABLE `users` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `email` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `email_unique` (`email`) );
Documentation
Class: donatj\MySqlSchema\Columns\AbstractColumn
Method: AbstractColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: AbstractColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: AbstractColumn->getComment
function getComment()
Return Value
- string
Method: AbstractColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: AbstractColumn->isNullable
function isNullable()
Return Value
- bool
Method: AbstractColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: AbstractColumn->getName
function getName()
Return Value
- string
Method: AbstractColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: AbstractColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: AbstractColumn->getTypeName
function getTypeName()
Return Value
- string
Method: AbstractColumn->getDefault
function getDefault()
Return Value
- mixed
Method: AbstractColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Class: donatj\MySqlSchema\Columns\Interfaces\CharsetColumnInterface
Method: CharsetColumnInterface->getCharset
function getCharset()
Return Value
- string | null
Method: CharsetColumnInterface->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: CharsetColumnInterface->getCollation
function getCollation()
Return Value
- string | null
Method: CharsetColumnInterface->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Class: donatj\MySqlSchema\Columns\Interfaces\DecimalPlacesInterface
Method: DecimalPlacesInterface->getDecimalPlaces
function getDecimalPlaces()
Return Value
- int
Method: DecimalPlacesInterface->setDecimalPlaces
function setDecimalPlaces($decimalPlaces)
Parameters
- int
$decimalPlaces
Return Value
- void
Class: donatj\MySqlSchema\Columns\Interfaces\MaxDigitsInterface
Method: MaxDigitsInterface->getMaxDigits
function getMaxDigits()
Return Value
- int
Method: MaxDigitsInterface->setMaxDigits
function setMaxDigits($maxDigits)
Parameters
- int
$maxDigits
Return Value
- void
Class: donatj\MySqlSchema\Columns\Interfaces\OptionalLengthInterface
Method: OptionalLengthInterface->getLength
function getLength()
Return Value
- int | null
Method: OptionalLengthInterface->setLength
function setLength($length = null)
Parameters
- int | null
$length
Return Value
- void
Class: donatj\MySqlSchema\Columns\Interfaces\PrecisionInterface
Method: PrecisionInterface->getPrecision
function getPrecision()
Return Value
- int
Method: PrecisionInterface->setPrecision
function setPrecision($precision)
Parameters
- int
$precision
Return Value
- void
Class: donatj\MySqlSchema\Columns\Interfaces\RequiredLengthInterface
Method: RequiredLengthInterface->getLength
function getLength()
Return Value
- int
Method: RequiredLengthInterface->setLength
function setLength($length)
Parameters
- int
$length
Return Value
- void
Class: donatj\MySqlSchema\Columns\Interfaces\SignedInterface
Method: SignedInterface->isSigned
function isSigned()
Return Value
- bool
Method: SignedInterface->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Return Value
- void
Class: donatj\MySqlSchema\Columns\Json\JsonColumn
Method: JsonColumn->getTypeName
function getTypeName(): string
Return Value
- string
Method: JsonColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: JsonColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: JsonColumn->getComment
function getComment()
Return Value
- string
Method: JsonColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: JsonColumn->isNullable
function isNullable()
Return Value
- bool
Method: JsonColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: JsonColumn->getName
function getName()
Return Value
- string
Method: JsonColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: JsonColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: JsonColumn->getDefault
function getDefault()
Return Value
- mixed
Method: JsonColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Class: donatj\MySqlSchema\Columns\Numeric\AbstractFloatingColumn
Method: AbstractFloatingColumn->__construct
function __construct($name, $precision)
Parameters
- string
$name - int
$precision
Method: AbstractFloatingColumn->getPrecision
function getPrecision()
Return Value
- int
Method: AbstractFloatingColumn->setPrecision
function setPrecision($precision)
Parameters
- int
$precision
Return Value
- void
Method: AbstractFloatingColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: AbstractFloatingColumn->getComment
function getComment()
Return Value
- string
Method: AbstractFloatingColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: AbstractFloatingColumn->isNullable
function isNullable()
Return Value
- bool
Method: AbstractFloatingColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: AbstractFloatingColumn->getName
function getName()
Return Value
- string
Method: AbstractFloatingColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: AbstractFloatingColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: AbstractFloatingColumn->getTypeName
function getTypeName()
Return Value
- string
Method: AbstractFloatingColumn->getDefault
function getDefault()
Return Value
- mixed
Method: AbstractFloatingColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: AbstractFloatingColumn->isSigned
function isSigned()
Return Value
- bool
Method: AbstractFloatingColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Class: donatj\MySqlSchema\Columns\Numeric\AbstractIntegerColumn
Method: AbstractIntegerColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: AbstractIntegerColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: AbstractIntegerColumn->getComment
function getComment()
Return Value
- string
Method: AbstractIntegerColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: AbstractIntegerColumn->isNullable
function isNullable()
Return Value
- bool
Method: AbstractIntegerColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: AbstractIntegerColumn->getName
function getName()
Return Value
- string
Method: AbstractIntegerColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: AbstractIntegerColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: AbstractIntegerColumn->getTypeName
function getTypeName()
Return Value
- string
Method: AbstractIntegerColumn->getDefault
function getDefault()
Return Value
- mixed
Method: AbstractIntegerColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: AbstractIntegerColumn->isSigned
function isSigned()
Return Value
- bool
Method: AbstractIntegerColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Method: AbstractIntegerColumn->getLength
function getLength()
Return Value
- int | null
Method: AbstractIntegerColumn->setLength
function setLength($length = null)
Parameters
- int | null
$length
Class: donatj\MySqlSchema\Columns\Numeric\AbstractNumberColumn
Method: AbstractNumberColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: AbstractNumberColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: AbstractNumberColumn->getComment
function getComment()
Return Value
- string
Method: AbstractNumberColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: AbstractNumberColumn->isNullable
function isNullable()
Return Value
- bool
Method: AbstractNumberColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: AbstractNumberColumn->getName
function getName()
Return Value
- string
Method: AbstractNumberColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: AbstractNumberColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: AbstractNumberColumn->getTypeName
function getTypeName()
Return Value
- string
Method: AbstractNumberColumn->getDefault
function getDefault()
Return Value
- mixed
Method: AbstractNumberColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: AbstractNumberColumn->isSigned
function isSigned()
Return Value
- bool
Method: AbstractNumberColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Class: donatj\MySqlSchema\Columns\Numeric\FixedPoint\DecimalColumn
Method: DecimalColumn->__construct
function __construct($name, $maxDigits, $decimalPlaces)
Parameters
- string
$name - int
$maxDigits - int
$decimalPlaces
Method: DecimalColumn->getTypeName
function getTypeName()
Return Value
- string
Method: DecimalColumn->getMaxDigits
function getMaxDigits()
Return Value
- int
Method: DecimalColumn->setMaxDigits
function setMaxDigits($maxDigits)
Parameters
- int
$maxDigits
Return Value
- void
Method: DecimalColumn->getDecimalPlaces
function getDecimalPlaces()
Return Value
- int
Method: DecimalColumn->setDecimalPlaces
function setDecimalPlaces($decimalPlaces)
Parameters
- int
$decimalPlaces
Return Value
- void
Method: DecimalColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: DecimalColumn->getComment
function getComment()
Return Value
- string
Method: DecimalColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: DecimalColumn->isNullable
function isNullable()
Return Value
- bool
Method: DecimalColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: DecimalColumn->getName
function getName()
Return Value
- string
Method: DecimalColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: DecimalColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: DecimalColumn->getDefault
function getDefault()
Return Value
- mixed
Method: DecimalColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: DecimalColumn->isSigned
function isSigned()
Return Value
- bool
Method: DecimalColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Class: donatj\MySqlSchema\Columns\Numeric\FloatingPoint\DoubleColumn
Method: DoubleColumn->getTypeName
function getTypeName()
Return Value
- string
Method: DoubleColumn->__construct
function __construct($name, $precision)
Parameters
- string
$name - int
$precision
Method: DoubleColumn->getPrecision
function getPrecision()
Return Value
- int
Method: DoubleColumn->setPrecision
function setPrecision($precision)
Parameters
- int
$precision
Return Value
- void
Method: DoubleColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: DoubleColumn->getComment
function getComment()
Return Value
- string
Method: DoubleColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: DoubleColumn->isNullable
function isNullable()
Return Value
- bool
Method: DoubleColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: DoubleColumn->getName
function getName()
Return Value
- string
Method: DoubleColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: DoubleColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: DoubleColumn->getDefault
function getDefault()
Return Value
- mixed
Method: DoubleColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: DoubleColumn->isSigned
function isSigned()
Return Value
- bool
Method: DoubleColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Class: donatj\MySqlSchema\Columns\Numeric\FloatingPoint\FloatColumn
Method: FloatColumn->getTypeName
function getTypeName()
Return Value
- string
Method: FloatColumn->__construct
function __construct($name, $precision)
Parameters
- string
$name - int
$precision
Method: FloatColumn->getPrecision
function getPrecision()
Return Value
- int
Method: FloatColumn->setPrecision
function setPrecision($precision)
Parameters
- int
$precision
Return Value
- void
Method: FloatColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: FloatColumn->getComment
function getComment()
Return Value
- string
Method: FloatColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: FloatColumn->isNullable
function isNullable()
Return Value
- bool
Method: FloatColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: FloatColumn->getName
function getName()
Return Value
- string
Method: FloatColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: FloatColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: FloatColumn->getDefault
function getDefault()
Return Value
- mixed
Method: FloatColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: FloatColumn->isSigned
function isSigned()
Return Value
- bool
Method: FloatColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Class: donatj\MySqlSchema\Columns\Numeric\Integers\BigIntColumn
Method: BigIntColumn->getTypeName
function getTypeName()
Return Value
- string
Method: BigIntColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: BigIntColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: BigIntColumn->getComment
function getComment()
Return Value
- string
Method: BigIntColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: BigIntColumn->isNullable
function isNullable()
Return Value
- bool
Method: BigIntColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: BigIntColumn->getName
function getName()
Return Value
- string
Method: BigIntColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: BigIntColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: BigIntColumn->getDefault
function getDefault()
Return Value
- mixed
Method: BigIntColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: BigIntColumn->isSigned
function isSigned()
Return Value
- bool
Method: BigIntColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Method: BigIntColumn->getLength
function getLength()
Return Value
- int | null
Method: BigIntColumn->setLength
function setLength($length = null)
Parameters
- int | null
$length
Class: donatj\MySqlSchema\Columns\Numeric\Integers\IntColumn
Method: IntColumn->getTypeName
function getTypeName()
Return Value
- string
Method: IntColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: IntColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: IntColumn->getComment
function getComment()
Return Value
- string
Method: IntColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: IntColumn->isNullable
function isNullable()
Return Value
- bool
Method: IntColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: IntColumn->getName
function getName()
Return Value
- string
Method: IntColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: IntColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: IntColumn->getDefault
function getDefault()
Return Value
- mixed
Method: IntColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: IntColumn->isSigned
function isSigned()
Return Value
- bool
Method: IntColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Method: IntColumn->getLength
function getLength()
Return Value
- int | null
Method: IntColumn->setLength
function setLength($length = null)
Parameters
- int | null
$length
Class: donatj\MySqlSchema\Columns\Numeric\Integers\MediumIntColumn
Method: MediumIntColumn->getTypeName
function getTypeName()
Return Value
- string
Method: MediumIntColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: MediumIntColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: MediumIntColumn->getComment
function getComment()
Return Value
- string
Method: MediumIntColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: MediumIntColumn->isNullable
function isNullable()
Return Value
- bool
Method: MediumIntColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: MediumIntColumn->getName
function getName()
Return Value
- string
Method: MediumIntColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: MediumIntColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: MediumIntColumn->getDefault
function getDefault()
Return Value
- mixed
Method: MediumIntColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: MediumIntColumn->isSigned
function isSigned()
Return Value
- bool
Method: MediumIntColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Method: MediumIntColumn->getLength
function getLength()
Return Value
- int | null
Method: MediumIntColumn->setLength
function setLength($length = null)
Parameters
- int | null
$length
Class: donatj\MySqlSchema\Columns\Numeric\Integers\SmallIntColumn
Method: SmallIntColumn->getTypeName
function getTypeName()
Return Value
- string
Method: SmallIntColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: SmallIntColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: SmallIntColumn->getComment
function getComment()
Return Value
- string
Method: SmallIntColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: SmallIntColumn->isNullable
function isNullable()
Return Value
- bool
Method: SmallIntColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: SmallIntColumn->getName
function getName()
Return Value
- string
Method: SmallIntColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: SmallIntColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: SmallIntColumn->getDefault
function getDefault()
Return Value
- mixed
Method: SmallIntColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: SmallIntColumn->isSigned
function isSigned()
Return Value
- bool
Method: SmallIntColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Method: SmallIntColumn->getLength
function getLength()
Return Value
- int | null
Method: SmallIntColumn->setLength
function setLength($length = null)
Parameters
- int | null
$length
Class: donatj\MySqlSchema\Columns\Numeric\Integers\TinyIntColumn
Method: TinyIntColumn->getTypeName
function getTypeName()
Return Value
- string
Method: TinyIntColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: TinyIntColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: TinyIntColumn->getComment
function getComment()
Return Value
- string
Method: TinyIntColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: TinyIntColumn->isNullable
function isNullable()
Return Value
- bool
Method: TinyIntColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: TinyIntColumn->getName
function getName()
Return Value
- string
Method: TinyIntColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: TinyIntColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: TinyIntColumn->getDefault
function getDefault()
Return Value
- mixed
Method: TinyIntColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: TinyIntColumn->isSigned
function isSigned()
Return Value
- bool
Method: TinyIntColumn->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Method: TinyIntColumn->getLength
function getLength()
Return Value
- int | null
Method: TinyIntColumn->setLength
function setLength($length = null)
Parameters
- int | null
$length
Class: donatj\MySqlSchema\Columns\String\AbstractCharacterColumn
Method: AbstractCharacterColumn->__construct
function __construct($name, $length)
Parameters
- string
$name - int
$length
Method: AbstractCharacterColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: AbstractCharacterColumn->getComment
function getComment()
Return Value
- string
Method: AbstractCharacterColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: AbstractCharacterColumn->isNullable
function isNullable()
Return Value
- bool
Method: AbstractCharacterColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: AbstractCharacterColumn->getName
function getName()
Return Value
- string
Method: AbstractCharacterColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: AbstractCharacterColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: AbstractCharacterColumn->getTypeName
function getTypeName()
Return Value
- string
Method: AbstractCharacterColumn->getDefault
function getDefault()
Return Value
- mixed
Method: AbstractCharacterColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: AbstractCharacterColumn->getCharset
function getCharset()
Return Value
- string | null
Method: AbstractCharacterColumn->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: AbstractCharacterColumn->getCollation
function getCollation()
Return Value
- string | null
Method: AbstractCharacterColumn->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Method: AbstractCharacterColumn->getLength
function getLength()
Return Value
- int
Method: AbstractCharacterColumn->setLength
function setLength($length)
Parameters
- int
$length
Class: donatj\MySqlSchema\Columns\String\AbstractStringColumn
Method: AbstractStringColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: AbstractStringColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: AbstractStringColumn->getComment
function getComment()
Return Value
- string
Method: AbstractStringColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: AbstractStringColumn->isNullable
function isNullable()
Return Value
- bool
Method: AbstractStringColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: AbstractStringColumn->getName
function getName()
Return Value
- string
Method: AbstractStringColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: AbstractStringColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: AbstractStringColumn->getTypeName
function getTypeName()
Return Value
- string
Method: AbstractStringColumn->getDefault
function getDefault()
Return Value
- mixed
Method: AbstractStringColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: AbstractStringColumn->getCharset
function getCharset()
Return Value
- string | null
Method: AbstractStringColumn->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: AbstractStringColumn->getCollation
function getCollation()
Return Value
- string | null
Method: AbstractStringColumn->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Class: donatj\MySqlSchema\Columns\String\AbstractTextColumn
Method: AbstractTextColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: AbstractTextColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: AbstractTextColumn->getComment
function getComment()
Return Value
- string
Method: AbstractTextColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: AbstractTextColumn->isNullable
function isNullable()
Return Value
- bool
Method: AbstractTextColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: AbstractTextColumn->getName
function getName()
Return Value
- string
Method: AbstractTextColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: AbstractTextColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: AbstractTextColumn->getTypeName
function getTypeName()
Return Value
- string
Method: AbstractTextColumn->getDefault
function getDefault()
Return Value
- mixed
Method: AbstractTextColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: AbstractTextColumn->getCharset
function getCharset()
Return Value
- string | null
Method: AbstractTextColumn->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: AbstractTextColumn->getCollation
function getCollation()
Return Value
- string | null
Method: AbstractTextColumn->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Class: donatj\MySqlSchema\Columns\String\Character\CharColumn
Method: CharColumn->getTypeName
function getTypeName()
Return Value
- string
Method: CharColumn->__construct
function __construct($name, $length)
Parameters
- string
$name - int
$length
Method: CharColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: CharColumn->getComment
function getComment()
Return Value
- string
Method: CharColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: CharColumn->isNullable
function isNullable()
Return Value
- bool
Method: CharColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: CharColumn->getName
function getName()
Return Value
- string
Method: CharColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: CharColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: CharColumn->getDefault
function getDefault()
Return Value
- mixed
Method: CharColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: CharColumn->getCharset
function getCharset()
Return Value
- string | null
Method: CharColumn->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: CharColumn->getCollation
function getCollation()
Return Value
- string | null
Method: CharColumn->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Method: CharColumn->getLength
function getLength()
Return Value
- int
Method: CharColumn->setLength
function setLength($length)
Parameters
- int
$length
Class: donatj\MySqlSchema\Columns\String\Character\VarcharColumn
Method: VarcharColumn->getTypeName
function getTypeName()
Return Value
- string
Method: VarcharColumn->__construct
function __construct($name, $length)
Parameters
- string
$name - int
$length
Method: VarcharColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: VarcharColumn->getComment
function getComment()
Return Value
- string
Method: VarcharColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: VarcharColumn->isNullable
function isNullable()
Return Value
- bool
Method: VarcharColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: VarcharColumn->getName
function getName()
Return Value
- string
Method: VarcharColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: VarcharColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: VarcharColumn->getDefault
function getDefault()
Return Value
- mixed
Method: VarcharColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: VarcharColumn->getCharset
function getCharset()
Return Value
- string | null
Method: VarcharColumn->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: VarcharColumn->getCollation
function getCollation()
Return Value
- string | null
Method: VarcharColumn->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Method: VarcharColumn->getLength
function getLength()
Return Value
- int
Method: VarcharColumn->setLength
function setLength($length)
Parameters
- int
$length
Class: donatj\MySqlSchema\Columns\String\Text\LongTextColumn
Method: LongTextColumn->getTypeName
function getTypeName()
Return Value
- string
Method: LongTextColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: LongTextColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: LongTextColumn->getComment
function getComment()
Return Value
- string
Method: LongTextColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: LongTextColumn->isNullable
function isNullable()
Return Value
- bool
Method: LongTextColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: LongTextColumn->getName
function getName()
Return Value
- string
Method: LongTextColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: LongTextColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: LongTextColumn->getDefault
function getDefault()
Return Value
- mixed
Method: LongTextColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: LongTextColumn->getCharset
function getCharset()
Return Value
- string | null
Method: LongTextColumn->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: LongTextColumn->getCollation
function getCollation()
Return Value
- string | null
Method: LongTextColumn->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Class: donatj\MySqlSchema\Columns\String\Text\MediumTextColumn
Method: MediumTextColumn->getTypeName
function getTypeName()
Return Value
- string
Method: MediumTextColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: MediumTextColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: MediumTextColumn->getComment
function getComment()
Return Value
- string
Method: MediumTextColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: MediumTextColumn->isNullable
function isNullable()
Return Value
- bool
Method: MediumTextColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: MediumTextColumn->getName
function getName()
Return Value
- string
Method: MediumTextColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: MediumTextColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: MediumTextColumn->getDefault
function getDefault()
Return Value
- mixed
Method: MediumTextColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: MediumTextColumn->getCharset
function getCharset()
Return Value
- string | null
Method: MediumTextColumn->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: MediumTextColumn->getCollation
function getCollation()
Return Value
- string | null
Method: MediumTextColumn->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Class: donatj\MySqlSchema\Columns\String\Text\TextColumn
Method: TextColumn->getTypeName
function getTypeName()
Return Value
- string
Method: TextColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: TextColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: TextColumn->getComment
function getComment()
Return Value
- string
Method: TextColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: TextColumn->isNullable
function isNullable()
Return Value
- bool
Method: TextColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: TextColumn->getName
function getName()
Return Value
- string
Method: TextColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: TextColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: TextColumn->getDefault
function getDefault()
Return Value
- mixed
Method: TextColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: TextColumn->getCharset
function getCharset()
Return Value
- string | null
Method: TextColumn->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: TextColumn->getCollation
function getCollation()
Return Value
- string | null
Method: TextColumn->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Class: donatj\MySqlSchema\Columns\String\Text\TinyTextColumn
Method: TinyTextColumn->getTypeName
function getTypeName()
Return Value
- string
Method: TinyTextColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: TinyTextColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: TinyTextColumn->getComment
function getComment()
Return Value
- string
Method: TinyTextColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: TinyTextColumn->isNullable
function isNullable()
Return Value
- bool
Method: TinyTextColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: TinyTextColumn->getName
function getName()
Return Value
- string
Method: TinyTextColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: TinyTextColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: TinyTextColumn->getDefault
function getDefault()
Return Value
- mixed
Method: TinyTextColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: TinyTextColumn->getCharset
function getCharset()
Return Value
- string | null
Method: TinyTextColumn->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: TinyTextColumn->getCollation
function getCollation()
Return Value
- string | null
Method: TinyTextColumn->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Class: donatj\MySqlSchema\Columns\Temporal\AbstractTemporalColumn
Method: AbstractTemporalColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: AbstractTemporalColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: AbstractTemporalColumn->getComment
function getComment()
Return Value
- string
Method: AbstractTemporalColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: AbstractTemporalColumn->isNullable
function isNullable()
Return Value
- bool
Method: AbstractTemporalColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: AbstractTemporalColumn->getName
function getName()
Return Value
- string
Method: AbstractTemporalColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: AbstractTemporalColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: AbstractTemporalColumn->getTypeName
function getTypeName()
Return Value
- string
Method: AbstractTemporalColumn->getDefault
function getDefault()
Return Value
- mixed
Method: AbstractTemporalColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Class: donatj\MySqlSchema\Columns\Temporal\DateTimeColumn
Method: DateTimeColumn->getTypeName
function getTypeName()
Return Value
- string
Method: DateTimeColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: DateTimeColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: DateTimeColumn->getComment
function getComment()
Return Value
- string
Method: DateTimeColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: DateTimeColumn->isNullable
function isNullable()
Return Value
- bool
Method: DateTimeColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: DateTimeColumn->getName
function getName()
Return Value
- string
Method: DateTimeColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: DateTimeColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: DateTimeColumn->getDefault
function getDefault()
Return Value
- mixed
Method: DateTimeColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Class: donatj\MySqlSchema\Columns\Temporal\TimeColumn
Method: TimeColumn->getTypeName
function getTypeName()
Return Value
- string
Method: TimeColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: TimeColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: TimeColumn->getComment
function getComment()
Return Value
- string
Method: TimeColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: TimeColumn->isNullable
function isNullable()
Return Value
- bool
Method: TimeColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: TimeColumn->getName
function getName()
Return Value
- string
Method: TimeColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: TimeColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: TimeColumn->getDefault
function getDefault()
Return Value
- mixed
Method: TimeColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Class: donatj\MySqlSchema\Columns\Temporal\TimestampColumn
Method: TimestampColumn->getTypeName
function getTypeName()
Return Value
- string
Method: TimestampColumn->__construct
function __construct($name)
Parameters
- string
$name
Method: TimestampColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: TimestampColumn->getComment
function getComment()
Return Value
- string
Method: TimestampColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: TimestampColumn->isNullable
function isNullable()
Return Value
- bool
Method: TimestampColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: TimestampColumn->getName
function getName()
Return Value
- string
Method: TimestampColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: TimestampColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: TimestampColumn->getDefault
function getDefault()
Return Value
- mixed
Method: TimestampColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Class: donatj\MySqlSchema\Columns\Temporal\YearColumn
Method: YearColumn->__construct
function __construct($name, $length = 4)
Parameters
- string
$name - int
$length- 2 or 4
Method: YearColumn->setLength
function setLength($length)
Parameters
- int
$length- 2 or 4
Throws: \InvalidArgumentException
Return Value
- void
Method: YearColumn->getTypeName
function getTypeName()
Return Value
- string
Method: YearColumn->getTables
function getTables()
Return Value
- list<\donatj\MySqlSchema\Table>
Method: YearColumn->getComment
function getComment()
Return Value
- string
Method: YearColumn->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: YearColumn->isNullable
function isNullable()
Return Value
- bool
Method: YearColumn->setNullable
function setNullable($nullable)
Parameters
- bool
$nullable
Return Value
- void
Method: YearColumn->getName
function getName()
Return Value
- string
Method: YearColumn->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: YearColumn->toString
function toString(\donatj\MySqlSchema\Table $table)
Parameters
- \donatj\MySqlSchema\Table
$table
Return Value
- string
Method: YearColumn->getDefault
function getDefault()
Return Value
- mixed
Method: YearColumn->setDefault
function setDefault($default)
Parameters
- mixed
$default
Return Value
- void
Method: YearColumn->getLength
function getLength()
Return Value
- int
Class: donatj\MySqlSchema\Columns\Traits\OptionalLengthTrait
Method: OptionalLengthTrait->getLength
function getLength()
Return Value
- int | null
Method: OptionalLengthTrait->setLength
function setLength($length = null)
Parameters
- int | null
$length
Class: donatj\MySqlSchema\Columns\Traits\RequiredLengthTrait
Method: RequiredLengthTrait->getLength
function getLength()
Return Value
- int
Method: RequiredLengthTrait->setLength
function setLength($length)
Parameters
- int
$length
Class: donatj\MySqlSchema\Columns\Traits\SignedTrait
Method: SignedTrait->isSigned
function isSigned()
Return Value
- bool
Method: SignedTrait->setSigned
function setSigned($signed)
Parameters
- bool
$signed
Class: donatj\MySqlSchema\Table
Method: Table->__construct
function __construct($name)
Table constructor.
Parameters
- string
$name
Method: Table->getColumns
function getColumns()
Return Value
- list<\donatj\MySqlSchema\Columns\AbstractColumn>
Method: Table->getComment
function getComment()
Return Value
- string
Method: Table->setComment
function setComment($comment)
Parameters
- string
$comment
Return Value
- void
Method: Table->getEngine
function getEngine()
Return Value
- string | null
Method: Table->setEngine
function setEngine($engine)
Parameters
- string | null
$engine
Return Value
- void
Method: Table->getName
function getName()
Return Value
- string
Method: Table->setName
function setName($name)
Parameters
- string
$name
Return Value
- void
Method: Table->addAutoIncrement
function addAutoIncrement(\donatj\MySqlSchema\Columns\Numeric\AbstractIntegerColumn $column)
Return Value
- void
Method: Table->getAutoIncrementColumn
function getAutoIncrementColumn()
Return Value
- \donatj\MySqlSchema\Columns\Numeric\AbstractIntegerColumn | null
Method: Table->isAutoIncrement
function isAutoIncrement(\donatj\MySqlSchema\Columns\Numeric\AbstractIntegerColumn $column)
Parameters
- \donatj\MySqlSchema\Columns\Numeric\AbstractIntegerColumn
$column
Return Value
- bool
Method: Table->addPrimaryKey
function addPrimaryKey(\donatj\MySqlSchema\Columns\AbstractColumn $column)
Return Value
- void
Method: Table->isPrimaryKey
function isPrimaryKey(\donatj\MySqlSchema\Columns\AbstractColumn $column)
Parameters
- \donatj\MySqlSchema\Columns\AbstractColumn
$column
Return Value
- bool
Method: Table->addKeyColumn
function addKeyColumn($keyName, \donatj\MySqlSchema\Columns\AbstractColumn $column, $index = null, $type = 'NORMAL', $method = '')
Parameters
- string
$keyName - \donatj\MySqlSchema\Columns\AbstractColumn
$column - int | null
$index - string
$type - string
$method
Return Value
- void
Method: Table->addForeignKey
function addForeignKey(\donatj\MySqlSchema\Columns\AbstractColumn $local, \donatj\MySqlSchema\Columns\AbstractColumn $remote)
Return Value
- void
Method: Table->addColumn
function addColumn(\donatj\MySqlSchema\Columns\AbstractColumn $column)
Return Value
- void
Method: Table->toString
function toString()
Return Value
- string
Method: Table->getCharset
function getCharset()
Return Value
- string | null
Method: Table->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: Table->getCollation
function getCollation()
Return Value
- string | null
Method: Table->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void
Class: donatj\MySqlSchema\Traits\CharsetAndCollationTrait
Method: CharsetAndCollationTrait->getCharset
function getCharset()
Return Value
- string | null
Method: CharsetAndCollationTrait->setCharset
function setCharset($charset)
Parameters
- string | null
$charset
Return Value
- void
Method: CharsetAndCollationTrait->getCollation
function getCollation()
Return Value
- string | null
Method: CharsetAndCollationTrait->setCollation
function setCollation($collation)
Parameters
- string | null
$collation
Return Value
- void