class DatabaseMigrationRepository implements MigrationRepositoryInterface

Properties

protected string|null $connection

The name of the database connection to use.

Methods

__construct(ConnectionResolverInterface $resolver, string $table)

Create a new database migration repository instance.

array
getRan()

Get the completed migrations.

array
getMigrations(int $steps)

Get the list of migrations.

array
getMigrationsByBatch(int $batch)

Get the list of the migrations by batch number.

array
getLast()

Get the last migration batch.

array
getMigrationBatches()

Get the completed migrations with their batch numbers.

void
log(string $file, int $batch)

Log that a migration was run.

void
delete(object $migration)

Remove a migration from the log.

int
getNextBatchNumber()

Get the next migration batch number.

int
getLastBatchNumber()

Get the last migration batch number.

void
createRepository()

Create the migration repository data store.

bool
repositoryExists()

Determine if the migration repository exists.

void
deleteRepository()

Delete the migration repository data store.

table()

Get a query builder for the migration table.

getConnectionResolver()

Get the connection resolver instance.

getConnection()

Resolve the database connection instance.

void
setSource(string|null $name)

Set the information source to gather data.

Details

at line 21
__construct(ConnectionResolverInterface $resolver, string $table)

Create a new database migration repository instance.

Parameters

ConnectionResolverInterface $resolver
string $table

at line 32
array getRan()

Get the completed migrations.

Return Value

array

at line 47
array getMigrations(int $steps)

Get the list of migrations.

Driver-owned migration schemas may omit id and return numeric-string batches.

Parameters

int $steps

Return Value

array

at line 63
array getMigrationsByBatch(int $batch)

Get the list of the migrations by batch number.

Parameters

int $batch

Return Value

array

at line 77
array getLast()

Get the last migration batch.

Return Value

array

at line 89
array getMigrationBatches()

Get the completed migrations with their batch numbers.

Return Value

array

at line 100
void log(string $file, int $batch)

Log that a migration was run.

Parameters

string $file
int $batch

Return Value

void

at line 112
void delete(object $migration)

Remove a migration from the log.

Parameters

object $migration

Return Value

void

at line 120
int getNextBatchNumber()

Get the next migration batch number.

Return Value

int

at line 128
int getLastBatchNumber()

Get the last migration batch number.

Return Value

int

at line 136
void createRepository()

Create the migration repository data store.

Return Value

void

at line 146
bool repositoryExists()

Determine if the migration repository exists.

Return Value

bool

at line 156
void deleteRepository()

Delete the migration repository data store.

Return Value

void

at line 166
protected Builder table()

Get a query builder for the migration table.

Return Value

Builder

at line 174
ConnectionResolverInterface getConnectionResolver()

Get the connection resolver instance.

at line 182
ConnectionInterface getConnection()

Resolve the database connection instance.

Return Value

ConnectionInterface

at line 190
void setSource(string|null $name)

Set the information source to gather data.

Parameters

string|null $name

Return Value

void