\app\framework\Component\Database\SchemaBlueprint

Blueprint of an Database table

Summary

Methods
Properties
Constants
__construct()
getTable()
getColumns()
boolean()
decimal()
double()
float()
integer()
mediumInteger()
bigInteger()
increments()
bigIncrements()
string()
char()
text()
timestamps()
timestamp()
timestampTz()
year()
date()
dateTime()
dateTimeTz()
time()
binary()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$table
$columns
$engine
$charset
$collation
N/A

Properties

$table

$table : string

The Table that the Blueprint describes

Type

string

$engine

$engine : string

Type

string

$charset

$charset : 

Type

$collation

$collation : 

Type

Methods

__construct()

__construct(  $name) 

Parameters

$name

getTable()

getTable() : string

Returns

string

boolean()

boolean(string  $name) 

BOOLEAN equivalent column.

Parameters

string $name

decimal()

decimal(string  $name, integer  $precision, integer  $scale) 

DECIMAL equivalent column with a precision (total digits) and scale (decimal digits).

Parameters

string $name
integer $precision
integer $scale

double()

double(string  $name, integer  $precision, integer  $scale) 

DOUBLE equivalent column with a precision (total digits) and scale (decimal digits).

Parameters

string $name
integer $precision
integer $scale

float()

float(string  $name, integer  $precision, integer  $scale) 

FLOAT equivalent column with a precision (total digits) and scale (decimal digits).

Parameters

string $name
integer $precision
integer $scale

integer()

integer(string  $name) 

INTEGER equivalent column.

Parameters

string $name

mediumInteger()

mediumInteger(string  $name) 

MEDIUMINT equivalent column.

Parameters

string $name

bigInteger()

bigInteger(string  $name) 

BIGINT equivalent column.

Parameters

string $name

increments()

increments(string  $name = 'id') 

Auto-incrementing UNSIGNED INTEGER (primary key) equivalent column.

Parameters

string $name

bigIncrements()

bigIncrements(string  $name = 'id') 

Auto-incrementing UNSIGNED BIGINT (primary key) equivalent column.

Parameters

string $name

string()

string(string  $name, integer  $length = 255) 

VARCHAR equivalent column with a optional length.

Parameters

string $name
integer $length

char()

char(string  $name, integer  $length) 

CHAR equivalent column with an optional length.

Parameters

string $name
integer $length

text()

text(string  $name) 

TEXT equivalent column.

Parameters

string $name

timestamps()

timestamps() 

Adds nullable created_at and updated_at TIMESTAMP equivalent columns.

timestamp()

timestamp(string  $name, boolean  $isNullable = false) 

TIMESTAMP equivalent column.

Parameters

string $name
boolean $isNullable

timestampTz()

timestampTz() 

TIMESTAMP (with timezone) equivalent column.

year()

year(string  $name) 

YEAR equivalent column.

Parameters

string $name

date()

date(string  $name) 

DATE equivalent column.

Parameters

string $name

dateTime()

dateTime(string  $name) 

DATETIME equivalent column.

Parameters

string $name

dateTimeTz()

dateTimeTz() 

DATETIME (with timezone) equivalent column.

time()

time(string  $name) 

TIME equivalent column.

Parameters

string $name

binary()

binary(string  $name) 

BLOB equivalent column.

Parameters

string $name