trait ConstraintColumn (View source)

Methods

addForeign(string $name, array $attributes = [])

Add Foreign KEY constraints

dropForeign(string|array $name, bool $as_raw = false)

Drop constraintes column;

addIndex(string $name)

Add table index;

dropIndex(string $name)

Drop table index;

dropPrimary()

Drop primary column;

addUnique(string $name)

Add table unique;

dropUnique(string $name)

Drop table unique;

Details

SQLGenerator addForeign(string $name, array $attributes = [])

Add Foreign KEY constraints

Parameters

string $name
array $attributes

Return Value

SQLGenerator

SQLGenerator dropForeign(string|array $name, bool $as_raw = false)

Drop constraintes column;

Parameters

string|array $name
bool $as_raw

Return Value

SQLGenerator

SQLGenerator addIndex(string $name)

Add table index;

Parameters

string $name

Return Value

SQLGenerator

SQLGenerator dropIndex(string $name)

Drop table index;

Parameters

string $name

Return Value

SQLGenerator

SQLGenerator dropPrimary()

Drop primary column;

Return Value

SQLGenerator

SQLGenerator addUnique(string $name)

Add table unique;

Parameters

string $name

Return Value

SQLGenerator

SQLGenerator dropUnique(string $name)

Drop table unique;

Parameters

string $name

Return Value

SQLGenerator