com\setasign\SetaFramework\Database\Migration

MigrationRunnerInterface

File: /SetaFramework/src/Database/Migration/MigrationRunnerInterface.php

Implemented in

Summary

Methods

revertSingleMigration()

abstract public MigrationRunnerInterface::revertSingleMigration (
string $name
): void

Revert a single migration.

Parameters
$name : string
 
Exceptions

Throws MigrationDownException

revertUntil()

abstract public MigrationRunnerInterface::revertUntil (
\DateTimeInterface $dateTime
): int

Revert all migrations until a specific datetime.

Parameters
$dateTime : \DateTimeInterface
 
Return Values

Number of migrations which were installed

Exceptions

Throws MigrationDownException If an error happens while running down()

run()

abstract public MigrationRunnerInterface::run (
void
): int

Install all missing migrations.

Return Values

Number of migrations which were installed

Exceptions

Throws MigrationUpException If an error happens while running up()

Throws MigrationDownException If an error happens while running down()

Throws \com\setasign\SetaFramework\Exception If the migration row cannot be saved

runSingleMigration()

abstract public MigrationRunnerInterface::runSingleMigration (
string $name
): void

Install a single migration.

Parameters
$name : string
 
Exceptions

Throws MigrationUpException If an error happens while running up()

Throws MigrationDownException If an error happens while running down()

Throws \com\setasign\SetaFramework\Exception If the migration row cannot be saved

Throws \InvalidArgumentException If the migration is unknown or already installed