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:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user