Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
16 / 16
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
phpbb_dbal_migration_revert_table
100.00% covered (success)
100.00%
16 / 16
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 update_schema
100.00% covered (success)
100.00%
11 / 11
100.00% covered (success)
100.00%
1 / 1
1
 revert_schema
100.00% covered (success)
100.00%
5 / 5
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 extends \phpbb\db\migration\migration
15{
16    function update_schema()
17    {
18        return array(
19            'add_tables' => array(
20                'phpbb_foobar' => array(
21                    'COLUMNS' => array(
22                        'module_id' => array('UINT:3', NULL, 'auto_increment'),
23                        'bar_column' => array('UINT', 1),
24                    ),
25                    'PRIMARY_KEY'    => 'module_id',
26                ),
27            ),
28        );
29    }
30
31    function revert_schema()
32    {
33        return array(
34            'drop_tables'    => array(
35                'phpbb_foobar',
36            ),
37        );
38    }
39}