Skip to content
Corex

Table

Corex\Database\Schema\Table · class · Core layer

A fluent custom-table definition that produces a CREATE TABLE statement. Pure: it builds SQL only; running it is the migrator’s job. Columns are NOT NULL by default; pass $nullable to allow null.

string(string $name, int $length, bool $nullable): self

Section titled “string(string $name, int $length, bool $nullable): self”

integer(string $name, bool $nullable): self

Section titled “integer(string $name, bool $nullable): self”

boolean(string $name, bool $nullable): self

Section titled “boolean(string $name, bool $nullable): self”

decimal(string $name, int $precision, int $scale, bool $nullable): self

Section titled “decimal(string $name, int $precision, int $scale, bool $nullable): self”

datetime(string $name, bool $nullable): self

Section titled “datetime(string $name, bool $nullable): self”

index(string $name, array $columns, bool $unique): self

Section titled “index(string $name, array $columns, bool $unique): self”

createSql(string $fullTableName, string $charsetCollate): string

Section titled “createSql(string $fullTableName, string $charsetCollate): string”