1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

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
This commit is contained in:
Joas Schilling
2014-03-14 10:13:42 +01:00
4 changed files with 115 additions and 19 deletions

View File

@@ -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',
),
),
);
}
}