FsDbMigrationRepo
in package
implements
IDbMigrationRepo
Table of Contents
Interfaces
- IDbMigrationRepo
- Represents a repository of migrations.
Methods
- __construct() : mixed
- getMigrations() : array<string|int, IDbMigrationInfo>
- Returns info on migrations contained in this repository.
- saveMigrationTemplate() : void
- Saves a migratinon template to a file within the directory of this migration repository.
Methods
__construct()
public
__construct(string $path) : mixed
Parameters
- $path : string
-
Filesystem path to the directory containing the migration files.
getMigrations()
Returns info on migrations contained in this repository.
public
getMigrations() : array<string|int, IDbMigrationInfo>
Return values
array<string|int, IDbMigrationInfo> —Collection of migration infos.
saveMigrationTemplate()
Saves a migratinon template to a file within the directory of this migration repository.
public
saveMigrationTemplate(string $name, string $body) : void
If the repository directory does not exist, it will be created.
Parameters
- $name : string
-
Name for the migration PHP file.
- $body : string
-
Body for the migration PHP file.