Skip to content

Commit bc2a2e2

Browse files
committed
Update ideas title column to support searches
1 parent f08ab19 commit bc2a2e2

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
/**
3+
*
4+
* Ideas extension for the phpBB Forum Software package.
5+
*
6+
* @copyright (c) phpBB Limited <https://www.phpbb.com>
7+
* @license GNU General Public License, version 2 (GPL-2.0)
8+
*
9+
*/
10+
11+
namespace phpbb\ideas\migrations;
12+
13+
class m10_update_idea_schema extends \phpbb\db\migration\migration
14+
{
15+
/**
16+
* {@inheritDoc}
17+
*/
18+
static public function depends_on()
19+
{
20+
return [
21+
'\phpbb\ideas\migrations\m1_initial_schema',
22+
'\phpbb\ideas\migrations\m6_migrate_old_tables',
23+
'\phpbb\ideas\migrations\m7_drop_old_tables',
24+
'\phpbb\ideas\migrations\m8_implemented_version',
25+
'\phpbb\ideas\migrations\m9_remove_idea_bot',
26+
];
27+
}
28+
29+
/**
30+
* {@inheritDoc}
31+
*
32+
* Convert ideas title column to sortable text (same as topic titles)
33+
* to allow for case-insensitive SQL LIKE searches.
34+
*/
35+
public function update_schema()
36+
{
37+
return [
38+
'change_columns' => [
39+
$this->table_prefix . 'ideas_ideas' => [
40+
'idea_title' => ['STEXT_UNI', '', 'true_sort'],
41+
],
42+
],
43+
];
44+
}
45+
46+
/**
47+
* {@inheritDoc}
48+
*/
49+
public function revert_schema()
50+
{
51+
}
52+
}

0 commit comments

Comments
 (0)