class AbstractMigration (View source)

The AbstractMigration class.

Constants

UP

DOWN

Methods

__construct(AbstractCommand $command, AbstractDatabaseDriver $db)

Class init.

void
up()

up

void
down()

down

AbstractTable
getTable(string $name)

Get DB table object.

AbstractTable
createTable(string $name, callable $callback, bool $ifNotExists = true, array $options = array())

createTable

AbstractTable
updateTable(string $name, callable $callback)

updateTable

AbstractTable
saveTable(string $name, callable $callback, bool $ifNotExists = true, array $options = array())

saveTable

drop(string $name)

Drop a table.

AbstractDatabaseDriver
getDb()

Method to get property Db

setDb(AbstractDatabaseDriver $db)

Method to set property db

AbstractCommand
getCommand()

Method to get property Command

setCommand(AbstractCommand $command)

Method to set property command

string
getVersion()

Method to get property Version

setVersion(string $version)

Method to set property version

Details

at line line 52
__construct(AbstractCommand $command, AbstractDatabaseDriver $db)

Class init.

Parameters

AbstractCommand $command
AbstractDatabaseDriver $db

at line line 64
abstract void up()

up

Return Value

void

at line line 71
abstract void down()

down

Return Value

void

at line line 80
AbstractTable getTable(string $name)

Get DB table object.

Parameters

string $name

Return Value

AbstractTable

at line line 95
AbstractTable createTable(string $name, callable $callback, bool $ifNotExists = true, array $options = array())

createTable

Parameters

string $name
callable $callback
bool $ifNotExists
array $options

Return Value

AbstractTable

at line line 108
AbstractTable updateTable(string $name, callable $callback)

updateTable

Parameters

string $name
callable $callback

Return Value

AbstractTable

at line line 123
AbstractTable saveTable(string $name, callable $callback, bool $ifNotExists = true, array $options = array())

saveTable

Parameters

string $name
callable $callback
bool $ifNotExists
array $options

Return Value

AbstractTable

at line line 135
AbstractMigration drop(string $name)

Drop a table.

Parameters

string $name

Return Value

AbstractMigration

at line line 147
AbstractDatabaseDriver getDb()

Method to get property Db

Return Value

AbstractDatabaseDriver

at line line 159
AbstractMigration setDb(AbstractDatabaseDriver $db)

Method to set property db

Parameters

AbstractDatabaseDriver $db

Return Value

AbstractMigration Return self to support chaining.

at line line 171
AbstractCommand getCommand()

Method to get property Command

Return Value

AbstractCommand

at line line 183
AbstractMigration setCommand(AbstractCommand $command)

Method to set property command

Parameters

AbstractCommand $command

Return Value

AbstractMigration Return self to support chaining.

at line line 195
string getVersion()

Method to get property Version

Return Value

string

at line line 207
AbstractMigration setVersion(string $version)

Method to set property version

Parameters

string $version

Return Value

AbstractMigration Return self to support chaining.