DatabaseMigrationRepository
class DatabaseMigrationRepository implements MigrationRepositoryInterface (View source)
Properties
protected ConnectionResolverInterface | $resolver | The database connection resolver instance. | |
protected string | $table | The name of the migration table. | |
protected string | $connection | The name of the database connection to use. |
Methods
Create a new database migration repository instance.
Get the completed migrations.
Get list of migrations.
Get the last migration batch.
Get the completed migrations with their batch numbers.
Log that a migration was run.
Remove a migration from the log.
Get the next migration batch number.
Get the last migration batch number.
Create the migration repository data store.
Determine if the migration repository exists.
Get the connection resolver instance.
Resolve the database connection instance.
Set the information source to gather data.
Details
at line 37
void
__construct(ConnectionResolverInterface $resolver, string $table)
Create a new database migration repository instance.
at line 48
array
getRan()
Get the completed migrations.
at line 62
array
getMigrations(int $steps)
Get list of migrations.
at line 76
array
getLast()
Get the last migration batch.
at line 88
array
getMigrationBatches()
Get the completed migrations with their batch numbers.
at line 103
void
log(string $file, int $batch)
Log that a migration was run.
at line 116
void
delete(object $migration)
Remove a migration from the log.
at line 126
int
getNextBatchNumber()
Get the next migration batch number.
at line 136
int
getLastBatchNumber()
Get the last migration batch number.
at line 146
void
createRepository()
Create the migration repository data store.
at line 165
bool
repositoryExists()
Determine if the migration repository exists.
at line 187
ConnectionResolverInterface
getConnectionResolver()
Get the connection resolver instance.
at line 197
Connection
getConnection()
Resolve the database connection instance.
at line 208
void
setSource(string $name)
Set the information source to gather data.