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 30
array getRan()

Get the completed migrations.

Return Value

array

at line 41
array getMigrations(int $steps)

Get the list of migrations.

Parameters

int $steps

Return Value

array

at line 55
array getMigrationsByBatch(int $batch)

Get the list of the migrations by batch number.

Parameters

int $batch

Return Value

array

at line 67
array getLast()

Get the last migration batch.

Return Value

array

at line 77
array getMigrationBatches()

Get the completed migrations with their batch numbers.

Return Value

array

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

Log that a migration was run.

Parameters

string $file
int $batch

Return Value

void

at line 98
void delete(object $migration)

Remove a migration from the log.

Parameters

object $migration

Return Value

void

at line 106
int getNextBatchNumber()

Get the next migration batch number.

Return Value

int

at line 114
int getLastBatchNumber()

Get the last migration batch number.

Return Value

int

at line 122
void createRepository()

Create the migration repository data store.

Return Value

void

at line 139
bool repositoryExists()

Determine if the migration repository exists.

Return Value

bool

at line 149
void deleteRepository()

Delete the migration repository data store.

Return Value

void

at line 159
protected Builder table()

Get a query builder for the migration table.

Return Value

Builder

at line 167
ConnectionResolverInterface getConnectionResolver()

Get the connection resolver instance.

at line 175
ConnectionInterface getConnection()

Resolve the database connection instance.

Return Value

ConnectionInterface

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

Set the information source to gather data.

Parameters

string|null $name

Return Value

void