abstract classe Migration (Voir la source)

Méthodes

void
__construct()

Migration constructor

void
up()

Up migration

void
rollback()

Rollback migration

connection(string $name)

Switch connection

drop(string $table)

Drop table action

dropIfExists(string $table)

Drop table if he exists action

create(string $table, callable $cb)

Function of creation of a new table in the database.

alter(string $table, callable $cb)

Alter table action.

addSql(string $sql)

Add SQL query

renameTable(string $table, string $to)

Add SQL query

string
getTablePrefixed(string $table)

Get prefixed table name

Détails

void __construct()

Migration constructor

Valeur de retour

void

abstract void up()

Up migration

Valeur de retour

void

abstract void rollback()

Rollback migration

Valeur de retour

void

final Migration connection(string $name)

Switch connection

Paramètres

string $name

Valeur de retour

Migration

final Migration drop(string $table)

Drop table action

Paramètres

string $table

Valeur de retour

Migration

final Migration dropIfExists(string $table)

Drop table if he exists action

Paramètres

string $table

Valeur de retour

Migration

final Migration create(string $table, callable $cb)

Function of creation of a new table in the database.

Paramètres

string $table
callable $cb

Valeur de retour

Migration

final Migration alter(string $table, callable $cb)

Alter table action.

Paramètres

string $table
callable $cb

Valeur de retour

Migration

final Migration addSql(string $sql)

Add SQL query

Paramètres

string $sql

Valeur de retour

Migration

final Migration renameTable(string $table, string $to)

Add SQL query

Paramètres

string $table
string $to

Valeur de retour

Migration

final string getTablePrefixed(string $table)

Get prefixed table name

Paramètres

string $table

Valeur de retour

string