diff options
| author | David King <imkingdavid@gmail.com> | 2013-10-13 13:45:41 -0700 |
|---|---|---|
| committer | David King <imkingdavid@gmail.com> | 2013-10-13 13:45:41 -0700 |
| commit | 1769135eafe2f66686716b3cc9d17f699ddce338 (patch) | |
| tree | 882633a05edbf931c2161af77d0d9f188a3205d6 /phpBB/phpbb/db | |
| parent | 6bf03cc48c3a005c83c254de807644ae9760e347 (diff) | |
| parent | 6ccceca064929af4f1c59da56586e3d3003bcdda (diff) | |
| download | forums-1769135eafe2f66686716b3cc9d17f699ddce338.tar forums-1769135eafe2f66686716b3cc9d17f699ddce338.tar.gz forums-1769135eafe2f66686716b3cc9d17f699ddce338.tar.bz2 forums-1769135eafe2f66686716b3cc9d17f699ddce338.tar.xz forums-1769135eafe2f66686716b3cc9d17f699ddce338.zip | |
Merge pull request #1766 from bantu/ticket/11621
[ticket/11621] Improve MySQL fulltext search indexes
Diffstat (limited to 'phpBB/phpbb/db')
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/alpha1.php | 1 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php | 47 |
2 files changed, 48 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php index 04f195daeb..bd4861b1f5 100644 --- a/phpBB/phpbb/db/migration/data/v310/alpha1.php +++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php @@ -24,6 +24,7 @@ class alpha1 extends \phpbb\db\migration\migration '\phpbb\db\migration\data\v310\config_db_text', '\phpbb\db\migration\data\v310\forgot_password', '\phpbb\db\migration\data\v310\mod_rewrite', + '\phpbb\db\migration\data\v310\mysql_fulltext_drop', '\phpbb\db\migration\data\v310\namespaces', '\phpbb\db\migration\data\v310\notifications_cron', '\phpbb\db\migration\data\v310\notification_options_reconvert', diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php new file mode 100644 index 0000000000..97d174d4bc --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php @@ -0,0 +1,47 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class mysql_fulltext_drop extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + // This migration is irrelevant for all non-MySQL DBMSes. + return strpos($this->db->sql_layer, 'mysql') === false; + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\dev', + ); + } + + public function update_schema() + { + /* + * Drop FULLTEXT indexes related to MySQL fulltext search. + * Doing so is equivalent to dropping the search index from the ACP. + * Possibly time-consuming recreation of the search index (i.e. + * FULLTEXT indexes) is left as a task to the admin to not + * unnecessarily stall the upgrade process. The new search index will + * then require about 40% less table space (also see PHPBB3-11621). + */ + return array( + 'drop_keys' => array( + $this->table_prefix . 'posts' => array( + 'post_subject', + 'post_text', + 'post_content', + ), + ), + ); + } +} |
