DatabaseMigrationRepository
class DatabaseMigrationRepository implements MigrationRepositoryInterface
Constants
| protected CONNECTION_CONTEXT_KEY_PREFIX |
|
Properties
| protected string|null | $connection | The name of the database connection to use. |
Methods
Create a new database migration repository instance.
Get the completed migrations.
Get the list of migrations.
Get the list of the migrations by batch number.
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.
Delete the migration repository data store.
Get the connection resolver instance.
Resolve the database connection instance.
Set the information source to gather data.
Details
at line 48
__construct(ConnectionResolverInterface $resolver, string $table)
Create a new database migration repository instance.
at line 59
array
getRan()
Get the completed migrations.
at line 74
array
getMigrations(int $steps)
Get the list of migrations.
Driver-owned migration schemas may omit id and return numeric-string batches.
at line 90
array
getMigrationsByBatch(int $batch)
Get the list of the migrations by batch number.
at line 104
array
getLast()
Get the last migration batch.
at line 116
array
getMigrationBatches()
Get the completed migrations with their batch numbers.
at line 127
void
log(string $file, int $batch)
Log that a migration was run.
at line 139
void
delete(object $migration)
Remove a migration from the log.
at line 147
int
getNextBatchNumber()
Get the next migration batch number.
at line 155
int
getLastBatchNumber()
Get the last migration batch number.
at line 163
void
createRepository()
Create the migration repository data store.
at line 173
bool
repositoryExists()
Determine if the migration repository exists.
at line 183
void
deleteRepository()
Delete the migration repository data store.
at line 193
protected Builder
table()
Get a query builder for the migration table.
at line 201
ConnectionResolverInterface
getConnectionResolver()
Get the connection resolver instance.
at line 209
ConnectionInterface
getConnection()
Resolve the database connection instance.
at line 217
void
setSource(string|null $name)
Set the information source to gather data.