aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dbal/migration
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-01-13 12:39:08 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-01-13 12:39:08 -0600
commit26c16559c3496f5496ad6e83e55c40f03edda5bd (patch)
tree7fae40060eb2da6b5aaa68cb20516d3b233dbd8f /tests/dbal/migration
parent93f9ebbb258a06e34198cffda0f5fd8dfdf29597 (diff)
downloadforums-26c16559c3496f5496ad6e83e55c40f03edda5bd.tar
forums-26c16559c3496f5496ad6e83e55c40f03edda5bd.tar.gz
forums-26c16559c3496f5496ad6e83e55c40f03edda5bd.tar.bz2
forums-26c16559c3496f5496ad6e83e55c40f03edda5bd.tar.xz
forums-26c16559c3496f5496ad6e83e55c40f03edda5bd.zip
[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
Diffstat (limited to 'tests/dbal/migration')
-rw-r--r--tests/dbal/migration/installed.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/dbal/migration/installed.php b/tests/dbal/migration/installed.php
new file mode 100644
index 0000000000..01829f7a99
--- /dev/null
+++ b/tests/dbal/migration/installed.php
@@ -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;
+ }
+}