UserFrosting API

MigrationRepositoryInterface

MigrationRepository Interface.

Tags
author

Louis Charette

Table of Contents

getMigrationsList() Get the list of ran migrations. array
getMigrations() Get list of migrations. array
getLast() Get the last migration batch. array
log() Log that a migration was run. mixed
delete() Remove a migration from the log. mixed
getNextBatchNumber() Get the next migration batch number. int
getLastBatchNumber() Get the last migration batch number. int
createRepository() Create the migration repository data store. mixed
deleteRepository() Delete the migration repository data store. mixed
repositoryExists() Determine if the migration repository exists. bool
setSource() Set the information source to gather data. mixed

Methods

getMigrationsList()

Get the list of ran migrations.

public getMigrationsList( [ $steps : int = -1 ] [, $order : string = 'asc' ] ) : array
Parameters
$steps : int = -1

Number of batch to return

$order : string = 'asc'

asc|desc

Return values
array

An array of migration class names in the order they where ran

getMigrations()

Get list of migrations.

public getMigrations( [ $steps : int = -1 ] [, $order : string = 'asc' ] ) : array
Parameters
$steps : int = -1

Number of batch to return

$order : string = 'asc'

asc|desc

Return values
array

log()

Log that a migration was run.

public log( $file : string , $batch : int ) : mixed
Parameters
$file : string
$batch : int
Return values
mixed

delete()

Remove a migration from the log.

public delete( $migration : string ) : mixed
Parameters
$migration : string
Return values
mixed

setSource()

Set the information source to gather data.

public setSource( $name : string ) : mixed
Parameters
$name : string

The source name

Return values
mixed

Search results