Passed
Push — master ( e8097c...9fd6b6 )
by Jonathan
05:26
created

Migration1   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A upgrade() 0 6 1
1
<?php
2
/**
3
 * webtrees-lib: MyArtJaub library for webtrees
4
 *
5
 * @package MyArtJaub\Webtrees
6
 * @subpackage Sosa
7
 * @author Jonathan Jaubart <[email protected]>
8
 * @copyright Copyright (c) 2009-2019, Jonathan Jaubart
9
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
10
 */
11
namespace MyArtJaub\Webtrees\Module\Sosa\Schema;
12
13
use Fisharebest\Webtrees\Database;
14
use Fisharebest\Webtrees\Schema\MigrationInterface;
15
16
/**
17
 * Upgrade the database schema from version 1 to version 2.
18
 */
19
class Migration1 implements MigrationInterface {
20
    
21
	/** {@inheritDoc} */
22
	public function upgrade() {
23
24
		Database::exec(
25
		    'ALTER TABLE `##maj_sosa`' . 
26
		    ' ADD COLUMN majs_birth_year_est SMALLINT NULL AFTER majs_birth_year,' .
27
		    ' ADD COLUMN majs_death_year_est SMALLINT NULL AFTER majs_death_year'
28
		);
29
	}
30
}
31