Issues (902)

exif/migrations/m1_init.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
*
4
* @package phpBB Gallery EXIF
5
* @copyright (c) 2014 satanasov
6
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
*
8
*/
9
10
namespace phpbbgallery\exif\migrations;
11
12
class m1_init extends \phpbb\db\migration\migration
0 ignored issues
show
The type phpbb\db\migration\migration was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
{
14
	static public function depends_on()
15
	{
16
		return array('\phpbbgallery\core\migrations\release_1_2_0');
17
	}
18
19
	public function update_data()
20
	{
21
		return array(
22
			// add config
23
			array('config.add', array('phpbb_gallery_disp_exifdata', 1))
24
		);
25
	}
26
	//lets create the needed table
27
	public function update_schema()
28
	{
29
		return array(
30
			'add_columns'	=> array(
31
				$this->table_prefix . 'gallery_images'	=> array(
32
					'image_has_exif'		=> array('UINT:3', 2),
33
					'image_exif_data'		=> array('TEXT', ''),
34
				),
35
				$this->table_prefix . 'gallery_users'	=> array(
36
					'user_viewexif'		=> array('UINT:1', 0),
37
				),
38
			),
39
		);
40
	}
41
	public function revert_schema()
42
	{
43
		return array(
44
			'drop_columns'	=> array(
45
				$this->table_prefix . 'gallery_images'	=> array(
46
					'image_has_exif',
47
					'image_exif_data'
48
				),
49
				$this->table_prefix . 'gallery_users'	=> array(
50
					'user_viewexif',
51
				),
52
			),
53
		);
54
	}
55
}
56