24 lines
584 B
PHP
24 lines
584 B
PHP
<?php
|
|
namespace Framadate\Migration;
|
|
|
|
interface Migration {
|
|
|
|
/**
|
|
* This method could check if the execute method should be called.
|
|
* It is called before the execute method.
|
|
*
|
|
* @param \PDO $pdo The connection to database
|
|
* @return bool true is the Migration should be executed.
|
|
*/
|
|
function preCondition(\PDO $pdo);
|
|
|
|
/**
|
|
* This methode is called only one time in the migration page.
|
|
*
|
|
* @param \PDO $pdo The connection to database
|
|
* @return bool true is the execution succeeded
|
|
*/
|
|
function execute(\PDO $pdo);
|
|
|
|
}
|
|
|