PHP 클래스 Doctrine\DBAL\Migrations\Migration

부터: 2.0
저자: Jonathan H. Wage ([email protected])
파일 보기 프로젝트 열기: doctrine/migrations 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Configuration $configuration ) Construct a Migration instance
getSql ( string $to = null ) : array Get the array of versions and SQL queries that would be executed for each version but do not execute anything.
migrate ( string $to = null, boolean $dryRun = false, boolean $timeAllQueries = false, callable $confirm = null ) : array Run a migration to the current version or the given target version.
setNoMigrationException ( boolean $noMigrationException = false )
writeSqlFile ( string $path, string $to = null ) : boolean Write a migration SQL file to the given path

비공개 메소드들

메소드 설명
migrationsCanExecute ( callable $confirm = null )
noMigrations ( )

메소드 상세

__construct() 공개 메소드

Construct a Migration instance
public __construct ( Configuration $configuration )
$configuration Doctrine\DBAL\Migrations\Configuration\Configuration A migration Configuration instance

getSql() 공개 메소드

Get the array of versions and SQL queries that would be executed for each version but do not execute anything.
public getSql ( string $to = null ) : array
$to string The version to migrate to.
리턴 array $sql The array of SQL queries.

migrate() 공개 메소드

Run a migration to the current version or the given target version.
public migrate ( string $to = null, boolean $dryRun = false, boolean $timeAllQueries = false, callable $confirm = null ) : array
$to string The version to migrate to.
$dryRun boolean Whether or not to make this a dry run and not execute anything.
$timeAllQueries boolean Measuring or not the execution time of each SQL query.
$confirm callable A callback to confirm whether the migrations should be executed.
리턴 array An array of migration sql statements. This will be empty if the the $confirm callback declines to execute the migration

setNoMigrationException() 공개 메소드

public setNoMigrationException ( boolean $noMigrationException = false )
$noMigrationException boolean Throw an exception or not if no migration is found. Mostly for Continuous Integration.

writeSqlFile() 공개 메소드

Write a migration SQL file to the given path
public writeSqlFile ( string $path, string $to = null ) : boolean
$path string The path to write the migration SQL file.
$to string The version to migrate to.
리턴 boolean $written