diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-03-14 10:13:42 +0100 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-03-14 10:13:42 +0100 |
| commit | 5f8f1f04fdcc30b0d2c3173661eb8eefbc371a4d (patch) | |
| tree | 3c9fe1936aa216b0fe9d22299963aa9c7e116b5d /phpBB/phpbb/db/migration | |
| parent | 3c6a17ae6bc494d68f7230c932e9ac036207ce77 (diff) | |
| parent | 6918921d53da75bf1b77dcbffff10e8dc574fbdb (diff) | |
| download | forums-5f8f1f04fdcc30b0d2c3173661eb8eefbc371a4d.tar forums-5f8f1f04fdcc30b0d2c3173661eb8eefbc371a4d.tar.gz forums-5f8f1f04fdcc30b0d2c3173661eb8eefbc371a4d.tar.bz2 forums-5f8f1f04fdcc30b0d2c3173661eb8eefbc371a4d.tar.xz forums-5f8f1f04fdcc30b0d2c3173661eb8eefbc371a4d.zip | |
Merge remote-tracking branch 'dhruv/ticket/11040' into develop
* dhruv/ticket/11040:
[ticket/11040] Topic is deleted if test is skipped
[ticket/11040] Use unique text for the test post added
[ticket/11040] Use hard delete in delete_topic
[ticket/11040] Add migration to drop postgres search indexes
[ticket/11040] Delete the functional test topic to avoid conflicts
[ticket/11040] Add methods to delete post and topic in functional tests
[ticket/11040] Swap post_text and post_subject for post_content index
[ticket/11040] Add test cases for searching subject and post content together
[ticket/11040] Remove postgres extra indexes
[ticket/11040] Add post_content index
[ticket/11040] Search subject and text together
Diffstat (limited to 'phpBB/phpbb/db/migration')
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php new file mode 100644 index 0000000000..7d4aea3c95 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/postgres_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 postgres_fulltext_drop extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + // This migration is irrelevant for all non-PostgreSQL DBMSes. + return strpos($this->db->sql_layer, 'postgres') === false; + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\dev', + ); + } + + public function update_schema() + { + /* + * Drop FULLTEXT indexes related to PostgreSQL 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-11040). + */ + return array( + 'drop_keys' => array( + $this->table_prefix . 'posts' => array( + 'post_subject', + 'post_text', + 'post_content', + ), + ), + ); + } +} |
