DatabaseMigrationRepository
in package
implements
MigrationRepositoryInterface
Interfaces, Classes and Traits
Table of Contents
- $connection : string
- The name of the database connection to use.
- $resolver : ConnectionResolverInterface
- The database connection resolver instance.
- $table : string
- The name of the migration table.
- __construct() : void
- Create a new database migration repository instance.
- createRepository() : void
- Create the migration repository data store.
- delete() : void
- Remove a migration from the log.
- getConnection() : Connection
- Resolve the database connection instance.
- getConnectionResolver() : ConnectionResolverInterface
- Get the connection resolver instance.
- getLast() : array<string|int, mixed>
- Get the last migration batch.
- getLastBatchNumber() : int
- Get the last migration batch number.
- getMigrations() : array<string|int, mixed>
- Get list of migrations.
- getNextBatchNumber() : int
- Get the next migration batch number.
- getRan() : array<string|int, mixed>
- Get the ran migrations.
- log() : void
- Log that a migration was run.
- repositoryExists() : bool
- Determine if the migration repository exists.
- setSource() : void
- Set the information source to gather data.
- table() : Builder
- Get a query builder for the migration table.
Properties
$connection
The name of the database connection to use.
protected
string
$connection
$resolver
The database connection resolver instance.
protected
ConnectionResolverInterface
$resolver
$table
The name of the migration table.
protected
string
$table
Methods
__construct()
Create a new database migration repository instance.
public
__construct(ConnectionResolverInterface $resolver, string $table) : void
Parameters
- $resolver : ConnectionResolverInterface
- $table : string
Return values
void —createRepository()
Create the migration repository data store.
public
createRepository() : void
Return values
void —delete()
Remove a migration from the log.
public
delete(object $migration) : void
Parameters
- $migration : object
Return values
void —getConnection()
Resolve the database connection instance.
public
getConnection() : Connection
Return values
Connection —getConnectionResolver()
Get the connection resolver instance.
public
getConnectionResolver() : ConnectionResolverInterface
Return values
ConnectionResolverInterface —getLast()
Get the last migration batch.
public
getLast() : array<string|int, mixed>
Return values
array<string|int, mixed> —getLastBatchNumber()
Get the last migration batch number.
public
getLastBatchNumber() : int
Return values
int —getMigrations()
Get list of migrations.
public
getMigrations(int $steps) : array<string|int, mixed>
Parameters
- $steps : int
Return values
array<string|int, mixed> —getNextBatchNumber()
Get the next migration batch number.
public
getNextBatchNumber() : int
Return values
int —getRan()
Get the ran migrations.
public
getRan() : array<string|int, mixed>
Return values
array<string|int, mixed> —log()
Log that a migration was run.
public
log(string $file, int $batch) : void
Parameters
- $file : string
- $batch : int
Return values
void —repositoryExists()
Determine if the migration repository exists.
public
repositoryExists() : bool
Return values
bool —setSource()
Set the information source to gather data.
public
setSource(string $name) : void
Parameters
- $name : string
Return values
void —table()
Get a query builder for the migration table.
protected
table() : Builder