Skip to content

Commit dfb7cf0

Browse files
committed
doc: Added Methods Documentation
1 parent 2b7ad1f commit dfb7cf0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

webfiori/database/migration/MigrationsRunner.php

+16
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,15 @@ public function apply() : array {
164164
}
165165
return $applied;
166166
}
167+
/**
168+
* Rollback a set of applied migrations.
169+
*
170+
* @param string|null $migrationName If a name is provided, the rollback will
171+
* be till reaching the specified migration.
172+
*
173+
* @return array The method will return an array that holds all rolled back migrations
174+
* as objects of type 'AbstractMigration'.
175+
*/
167176
public function rollbackUpTo(?string $migrationName) : array {
168177
$migrations = $this->getMigrations();
169178
$count = count($migrations);
@@ -194,6 +203,13 @@ public function rollbackUpTo(?string $migrationName) : array {
194203
}
195204
return $rolled;
196205
}
206+
/**
207+
* Rollback one single migration.
208+
*
209+
* @return AbstractMigration|null If a migration was rolled back, the method
210+
* will return the migration as an object of type 'AbstractMigration'. Other than that,
211+
* null is returned.
212+
*/
197213
public function rollback() : ?AbstractMigration {
198214
$migrations = $this->getMigrations();
199215
$count = count($migrations);

0 commit comments

Comments
 (0)