mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/migrations] Function effectively_installed() in migrations
Allows you to check if the migration is effectively installed (entirely optionall) This function is intended to help moving to migrations from a previous database updater, where some migrations may have been installed already even though they are not yet listed in the migrations table. PHPBB3-9737
This commit is contained in:
30
tests/dbal/migration/installed.php
Normal file
30
tests/dbal/migration/installed.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package testing
|
||||
* @copyright (c) 2011 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_dbal_migration_installed extends phpbb_db_migration
|
||||
{
|
||||
function effectively_installed()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function update_data()
|
||||
{
|
||||
return array(
|
||||
array('custom', array(array(&$this, 'test'))),
|
||||
);
|
||||
}
|
||||
|
||||
function test()
|
||||
{
|
||||
global $migrator_test_installed_failed;
|
||||
|
||||
$migrator_test_installed_failed = true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user