aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-01-10 22:28:48 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-02-06 11:35:53 -0600
commit74f4397451dae0ab83d977d97d96ed9549bf3ab9 (patch)
tree60b34dedec55aff177655925b5656258db298d74 /phpBB/install/database_update.php
parentbabdb92aa998728b58eec1e3f2c036b5f2342492 (diff)
downloadforums-74f4397451dae0ab83d977d97d96ed9549bf3ab9.tar
forums-74f4397451dae0ab83d977d97d96ed9549bf3ab9.tar.gz
forums-74f4397451dae0ab83d977d97d96ed9549bf3ab9.tar.bz2
forums-74f4397451dae0ab83d977d97d96ed9549bf3ab9.tar.xz
forums-74f4397451dae0ab83d977d97d96ed9549bf3ab9.zip
[feature/migrations] Make depends_on static to call it without dependencies
Move installing migrations to migration/install.php and handle figuring out what migrations have been installed based on phpBB version. PHPBB3-11318
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index cd43f6065b..74aa072d22 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -147,21 +147,13 @@ header('Content-type: text/html; charset=UTF-8');
// End startup code
+// Make sure migrations have been installed. If not, install migrations and guess what migrations have been installed
$db_tools = $phpbb_container->get('dbal.tools');
if (!$db_tools->sql_table_exists(MIGRATIONS_TABLE))
{
- $db_tools->sql_create_table(MIGRATIONS_TABLE, array(
- 'COLUMNS' => array(
- 'migration_name' => array('VCHAR', ''),
- 'migration_depends_on' => array('TEXT', ''),
- 'migration_schema_done' => array('BOOL', 0),
- 'migration_data_done' => array('BOOL', 0),
- 'migration_data_state' => array('TEXT', ''),
- 'migration_start_time' => array('TIMESTAMP', 0),
- 'migration_end_time' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => 'migration_name',
- ));
+ $migrations_installer = new phpbb_db_migration_install();
+ $migrations_installer->install($db, $db_tools, $table_prefix, $config['version']);
+ unset($migrations_installer);
}
$migrator = $phpbb_container->get('migrator');