aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migration/data/extensions.php
blob: d28e0ebabbb2de65fbf0f3de7956e6eca6a5fedc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
*
* @package migration
* @copyright (c) 2012 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/

class phpbb_db_migration_data_extensions extends phpbb_db_migration
{
	public function depends_on()
	{
		return array('phpbb_db_migration_data_3_0_11');
	}

	public function update_schema()
	{
		return array(
			'add_tables'		=> array(
				EXT_TABLE				=> array(
					'COLUMNS'			=> array(
						'ext_name'		=> array('VCHAR', ''),
						'ext_active'	=> array('BOOL', 0),
						'ext_state'		=> array('TEXT', ''),
					),
					'KEYS'				=> array(
						'ext_name'		=> array('UNIQUE', 'ext_name'),
					),
				),
			),
		);
	}

	public function update_data()
	{
		return array(
			array('module.add', array(
				'acp',
				'ACP_GENERAL_TASKS',
				array(
					'module_basename'	=> 'acp_extensions',
					'modes'				=> array('main'),
				),
			)),
			array('permission.add', array('a_extensions', true, 'a_styles')),
		);
	}
}