DatabaseMigrationRepository
class DatabaseMigrationRepository implements MigrationRepositoryInterface
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 21
__construct(ConnectionResolverInterface $resolver, string $table)
Create a new database migration repository instance.
at line 30
array
getRan()
Get the completed migrations.
at line 41
array
getMigrations(int $steps)
Get the list of migrations.
at line 55
array
getMigrationsByBatch(int $batch)
Get the list of the migrations by batch number.
at line 67
array
getLast()
Get the last migration batch.
at line 77
array
getMigrationBatches()
Get the completed migrations with their batch numbers.
at line 88
void
log(string $file, int $batch)
Log that a migration was run.
at line 98
void
delete(object $migration)
Remove a migration from the log.
at line 106
int
getNextBatchNumber()
Get the next migration batch number.
at line 114
int
getLastBatchNumber()
Get the last migration batch number.
at line 122
void
createRepository()
Create the migration repository data store.
at line 139
bool
repositoryExists()
Determine if the migration repository exists.
at line 149
void
deleteRepository()
Delete the migration repository data store.
at line 159
protected Builder
table()
Get a query builder for the migration table.
at line 167
ConnectionResolverInterface
getConnectionResolver()
Get the connection resolver instance.
at line 175
ConnectionInterface
getConnection()
Resolve the database connection instance.
at line 183
void
setSource(string|null $name)
Set the information source to gather data.