Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
25 / 25
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
phpbb_dbal_migration_revert_table_with_dependency
100.00% covered (success)
100.00%
25 / 25
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 depends_on
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 update_schema
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
1 / 1
1
 revert_schema
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2/**
3*
4* This file is part of 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* For full copyright and license information, please see
10* the docs/CREDITS.txt file.
11*
12*/
13
14class phpbb_dbal_migration_revert_table_with_dependency extends \phpbb\db\migration\migration
15{
16    static public function depends_on()
17    {
18        return array('phpbb_dbal_migration_revert_table');
19    }
20
21    function update_schema()
22    {
23        return array(
24            'add_columns' => array(
25                'phpbb_foobar' => array(
26                    'baz_column' => array('UINT', 1),
27                ),
28            ),
29            'drop_columns' => array(
30                'phpbb_foobar' => array(
31                    'bar_column',
32                ),
33            ),
34        );
35    }
36
37    function revert_schema()
38    {
39        return array(
40            'add_columns' => array(
41                'phpbb_foobar' => array(
42                    'bar_column' => array('UINT', 1),
43                ),
44            ),
45            'drop_columns' => array(
46                'phpbb_foobar' => array(
47                    'baz_column',
48                ),
49            ),
50        );
51    }
52}