Skip to content
Snippets Groups Projects
Unverified Commit 209f930b authored by Thomas Flori's avatar Thomas Flori Committed by GitHub
Browse files

add all methods to the progress interface

parent 05059938
No related branches found
No related tags found
No related merge requests found
...@@ -8,10 +8,70 @@ interface ProgressInterface ...@@ -8,10 +8,70 @@ interface ProgressInterface
* Output information about starting the migration process * Output information about starting the migration process
* *
* Info contains: * Info contains:
* - `migrations` - an array of class names * - `migrations` - an array of \stdClass containing the following info:
* - `file` - the file name (and unique identifier) of the migration
* - `status` - the current status of the migration (new, done or failed)
* - `executed` - UTC date time string when the migration was executed (only done and failed)
* - `executionTime` - the time it required to execute the migration (only done and failed)
* - `count` - an integer how many migrations are going to be executed * - `count` - an integer how many migrations are going to be executed
* *
* @param \stdClass $info * @param \stdClass $info
*/ */
public function start(\stdClass $info); public function start(\stdClass $info);
/**
* Output information about the $migration (before the migration)
*
* Migration contains:
* - `file` - the file name (and unique identifier) of the migration
* - `status` - the current status of the migration (new, done or failed)
*/
public function beforeMigration(\stdClass $migration);
/**
* Output information about the $statement (before it gets executed)
*
* Statement contains:
* - `teaser` - a brief text (without line breaks) that describes the query (e. g. CREATE TABLE migrations)
* - `action` - **optional** the database action to execute (e. g. create)
* - `type` - **optional** the type on which the action gets executed (e. g. table)
* - `name` - **optional** the name of the object (e. g. migrations)
*/
public function beforeExecution(\stdClass $statement);
/**
* Output information about the $statement (after it gets executed)
*
* Statement contains:
* - `teaser` - a brief text (without line breaks) that describes the query (e. g. CREATE TABLE migrations)
* - `action` - **optional** the database action to execute (e. g. create)
* - `type` - **optional** the type on which the action gets executed (e. g. table)
* - `name` - **optional** the name of the object (e. g. migrations)
* - `executionTime` - the time it required to execute the satement (in seconds)
*/
public function afterExecution(\stdClass $statement);
/**
* Output information about the $migration (after the migration)
*
* Migration contains:
* - `file` - the file name (and unique identifier) of the migration
* - `status` - the current status of the migration (new, done or failed)
* - `executionTime` - the time it required to execute the migration (in seconds)
* - `statements` - an array of statements that got executed
*/
public function afterMigration(\stdClass $migration);
/**
* Output information about what just happened
*
* Info contains:
* - `migrations` - an array of \stdClass containing the following info:
* - `file` - the file name (and unique identifier) of the migration
* - `status` - the current status of the migration (new, done or failed)
* - `executed` - UTC date time string when the migration was executed (only done and failed)
* - `executionTime` - the time it required to execute the migration (only done and failed)
* - `executed` - an array of migrations that just got executed
*/
public function finish(\stdClass $info);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment