aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migrator.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-07-27 11:08:13 +0200
committerTristan Darricau <github@nicofuma.fr>2014-07-27 11:08:13 +0200
commita8e81b6e9f42c3187d7b17c6bb5da052c28944a6 (patch)
treedcbdcb27e76bffef7236e1395f82f17911ec02dd /phpBB/phpbb/db/migrator.php
parente4a829071ea4ce8cea52103239dc8d75785ec019 (diff)
downloadforums-a8e81b6e9f42c3187d7b17c6bb5da052c28944a6.tar
forums-a8e81b6e9f42c3187d7b17c6bb5da052c28944a6.tar.gz
forums-a8e81b6e9f42c3187d7b17c6bb5da052c28944a6.tar.bz2
forums-a8e81b6e9f42c3187d7b17c6bb5da052c28944a6.tar.xz
forums-a8e81b6e9f42c3187d7b17c6bb5da052c28944a6.zip
[ticket/12870] Create the migrations table with a method in the migrator
PHPBB3-12870
Diffstat (limited to 'phpBB/phpbb/db/migrator.php')
-rw-r--r--phpBB/phpbb/db/migrator.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index 8b089a060f..4b1ab1fd32 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -767,4 +767,24 @@ class migrator
return $this->migrations;
}
+
+ public function create_migrations_table()
+ {
+ // Make sure migrations have been installed.
+ if (!$this->db_tools->sql_table_exists($this->table_prefix . 'migrations'))
+ {
+ $this->db_tools->sql_create_table($this->table_prefix . 'migrations', 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',
+ ));
+ }
+ }
}