1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[feature/migrations] Creating revert method to attempt reverting a migration

This code is in progress

PHPBB3-9737
This commit is contained in:
Nathan Guse
2013-01-09 18:59:15 -06:00
parent 595246f9bf
commit 44c10f661e
2 changed files with 123 additions and 0 deletions

View File

@@ -93,6 +93,16 @@ abstract class phpbb_db_migration
return array();
}
/**
* Reverts the database schema by providing a set of change instructions
*
* @return array Array of schema changes (compatible with db_tools->perform_schema_changes())
*/
public function revert_schema()
{
return array();
}
/**
* Updates data by returning a list of instructions to be executed
*
@@ -103,6 +113,19 @@ abstract class phpbb_db_migration
return array();
}
/**
* Reverts data by returning a list of instructions to be executed
*
* @return array Array of data instructions that will be performed on revert
* NOTE: calls to tools (such as config.add) are automatically reverted when
* possible, so you should not attempt to revert those, this is mostly for
* otherwise unrevertable calls (custom functions for example)
*/
public function revert_data()
{
return array();
}
/**
* Wrapper for running queries to generate user feedback on updates
*