aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-03-06 15:36:15 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-03-06 15:36:15 -0600
commit9ca15267fa91d2c9aad5df4f57a41de8b2c79be0 (patch)
tree6a61a976cfc2ac7a4be32c7deacb789f7efc7752 /phpBB/includes/db
parent02758cabbc8860b5026353a2f995077f5d7c2e76 (diff)
parent32ff2348f10aed1aad3b78e7677dca34335b7adb (diff)
downloadforums-9ca15267fa91d2c9aad5df4f57a41de8b2c79be0.tar
forums-9ca15267fa91d2c9aad5df4f57a41de8b2c79be0.tar.gz
forums-9ca15267fa91d2c9aad5df4f57a41de8b2c79be0.tar.bz2
forums-9ca15267fa91d2c9aad5df4f57a41de8b2c79be0.tar.xz
forums-9ca15267fa91d2c9aad5df4f57a41de8b2c79be0.zip
Merge remote-tracking branch 'remotes/bantu/ticket/10202' into develop
# By Andreas Fischer # Via Andreas Fischer * remotes/bantu/ticket/10202: [ticket/10202] Rename method names _all() to _array(). [ticket/10202] Add migration file for config_db_text. [ticket/10202] Upgrade TEXT to the bigger MTEXT. [ticket/10202] Improve method documentation. [ticket/10202] SQL escape the table name. [ticket/10202] Add $this->db->sql_freeresult($result) to SELECT queries. [ticket/10202] Define phpbb_config_db_text as a service. [ticket/10202] Add tests for phpbb_config_db_text. [ticket/10202] Adjust method names to guidelines. [ticket/10202] Add database schema for phpbb_config_db_text. [ticket/10202] Implementation of config options with arbitrary length values.
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/migration/data/310/config_db_text.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/phpBB/includes/db/migration/data/310/config_db_text.php b/phpBB/includes/db/migration/data/310/config_db_text.php
new file mode 100644
index 0000000000..89f211adda
--- /dev/null
+++ b/phpBB/includes/db/migration/data/310/config_db_text.php
@@ -0,0 +1,45 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+class phpbb_db_migration_data_310_config_db_text extends phpbb_db_migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_table_exists($this->table_prefix . 'config_text');
+ }
+
+ static public function depends_on()
+ {
+ return array('phpbb_db_migration_data_30x_3_0_11');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'config_text' => array(
+ 'COLUMNS' => array(
+ 'config_name' => array('VCHAR', ''),
+ 'config_value' => array('MTEXT', ''),
+ ),
+ 'PRIMARY_KEY' => 'config_name',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'config_text',
+ ),
+ );
+ }
+}