m10_update_idea_schema::depends_on()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
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
	public static 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
}
53