Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
19 / 19
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
schema_add_autoincrement
100.00% covered (success)
100.00%
19 / 19
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%
14 / 14
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 schema_add_autoincrement extends \phpbb\db\migration\migration
15{
16    function update_schema()
17    {
18        return [
19            'add_tables' => [
20                $this->table_prefix . 'noid' => [
21                    'COLUMNS' => [
22                        'text' => ['VCHAR:50', ''],
23                    ],
24                ],
25            ],
26
27            'add_columns' => [
28                $this->table_prefix . 'noid' => [
29                    'id' => ['UINT:3', null, 'auto_increment'],
30                ],
31            ],
32        ];
33    }
34
35    function revert_schema()
36    {
37        return [
38            'drop_tables'    => [
39                $this->table_prefix . 'noid',
40            ],
41        ];
42    }
43}