2014-12-31 01:33:56 +01:00
|
|
|
<?php
|
|
|
|
namespace Framadate\Migration;
|
|
|
|
|
|
|
|
interface Migration {
|
|
|
|
|
2015-02-26 10:44:49 +01:00
|
|
|
/**
|
|
|
|
* This method should describe in english what is the purpose of the migration class.
|
|
|
|
*
|
|
|
|
* @return string The description of the migration class
|
|
|
|
*/
|
|
|
|
function description();
|
|
|
|
|
2015-01-02 09:08:07 +01:00
|
|
|
/**
|
|
|
|
* 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
|
2015-02-26 10:44:49 +01:00
|
|
|
* @return bool true if the Migration should be executed
|
2015-01-02 09:08:07 +01:00
|
|
|
*/
|
|
|
|
function preCondition(\PDO $pdo);
|
|
|
|
|
2014-12-31 01:33:56 +01:00
|
|
|
/**
|
|
|
|
* This methode is called only one time in the migration page.
|
|
|
|
*
|
|
|
|
* @param \PDO $pdo The connection to database
|
2015-02-26 10:44:49 +01:00
|
|
|
* @return bool true if the execution succeeded
|
2014-12-31 01:33:56 +01:00
|
|
|
*/
|
|
|
|
function execute(\PDO $pdo);
|
|
|
|
|
|
|
|
}
|
|
|
|
|