@@ -22,11 +22,13 @@ |
||
22 | 22 | /** |
23 | 23 | * Upgrade the database schema from version 30 to version 31. |
24 | 24 | */ |
25 | -class Migration30 implements MigrationInterface { |
|
25 | +class Migration30 implements MigrationInterface |
|
26 | +{ |
|
26 | 27 | /** |
27 | 28 | * Upgrade to to the next version |
28 | 29 | */ |
29 | - public function upgrade() { |
|
30 | + public function upgrade() |
|
31 | + { |
|
30 | 32 | $WEBTREES_EMAIL = 'webtrees-noreply@' . preg_replace('/^www\./i', '', Filter::server('SERVER_NAME')); |
31 | 33 | |
32 | 34 | // Default settings for new trees. No defaults for: |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 16 to version 17. |
22 | 22 | */ |
23 | -class Migration15 implements MigrationInterface { |
|
23 | +class Migration15 implements MigrationInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Upgrade to to the next version |
26 | 27 | */ |
27 | - public function upgrade() { |
|
28 | + public function upgrade() |
|
29 | + { |
|
28 | 30 | // Delete old config settings |
29 | 31 | Database::exec("DELETE FROM `##gedcom_setting` WHERE setting_name IN('GEDCOM_DEFAULT_TAB', 'LINK_ICONS', 'ZOOM_BOXES', 'SHOW_LIST_PLACES', 'SHOW_CONTEXT_HELP')"); |
30 | 32 | Database::exec("DELETE FROM `##user_setting` WHERE setting_name='defaulttab'"); |
@@ -22,7 +22,8 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Upgrade the database schema from version 31 to version 32. |
24 | 24 | */ |
25 | -class Migration31 implements MigrationInterface { |
|
25 | +class Migration31 implements MigrationInterface |
|
26 | +{ |
|
26 | 27 | /** @var string[] Updated language codes */ |
27 | 28 | private $languages = array( |
28 | 29 | 'en_AU' => 'en-AU', |
@@ -35,7 +36,8 @@ discard block |
||
35 | 36 | /** |
36 | 37 | * Upgrade to to the next version |
37 | 38 | */ |
38 | - public function upgrade() { |
|
39 | + public function upgrade() |
|
40 | + { |
|
39 | 41 | $index_dir = Site::getPreference('INDEX_DIRECTORY'); |
40 | 42 | |
41 | 43 | // Due to the language code changes in 1.7.0, we need to update some other settings |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 17 to version 18. |
22 | 22 | */ |
23 | -class Migration17 implements MigrationInterface { |
|
23 | +class Migration17 implements MigrationInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Upgrade to to the next version |
26 | 27 | */ |
27 | - public function upgrade() { |
|
28 | + public function upgrade() |
|
29 | + { |
|
28 | 30 | // Add table to control site access |
29 | 31 | Database::exec( |
30 | 32 | "CREATE TABLE IF NOT EXISTS `##site_access_rule` (" . |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 14 to version 15. |
22 | 22 | */ |
23 | -class Migration14 implements MigrationInterface { |
|
23 | +class Migration14 implements MigrationInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Upgrade to to the next version |
26 | 27 | */ |
27 | - public function upgrade() { |
|
28 | + public function upgrade() |
|
29 | + { |
|
28 | 30 | // Delete old config settings |
29 | 31 | Database::exec("DELETE FROM `##gedcom_setting` WHERE setting_name IN('GEDCOM_DEFAULT_TAB', 'LINK_ICONS', 'ZOOM_BOXES')"); |
30 | 32 | Database::exec("DELETE FROM `##user_setting` WHERE setting_name='default'"); |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 16 to version 17. |
22 | 22 | */ |
23 | -class Migration16 implements MigrationInterface { |
|
23 | +class Migration16 implements MigrationInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Upgrade to to the next version |
26 | 27 | */ |
27 | - public function upgrade() { |
|
28 | + public function upgrade() |
|
29 | + { |
|
28 | 30 | // Add a "default" user, to store default settings |
29 | 31 | Database::exec("INSERT IGNORE INTO `##user` (user_id, user_name, real_name, email, password) VALUES (-1, 'DEFAULT_USER', 'DEFAULT_USER', 'DEFAULT_USER', 'DEFAULT_USER')"); |
30 | 32 |
@@ -21,11 +21,13 @@ |
||
21 | 21 | /** |
22 | 22 | * Upgrade the database schema from version 13 to version 14. |
23 | 23 | */ |
24 | -class Migration13 implements MigrationInterface { |
|
24 | +class Migration13 implements MigrationInterface |
|
25 | +{ |
|
25 | 26 | /** |
26 | 27 | * Upgrade to to the next version |
27 | 28 | */ |
28 | - public function upgrade() { |
|
29 | + public function upgrade() |
|
30 | + { |
|
29 | 31 | // Remove the i_isdead column |
30 | 32 | try { |
31 | 33 | Database::exec("ALTER TABLE `##individuals` DROP i_isdead"); |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 37 to version 38. |
22 | 22 | */ |
23 | -class Migration37 implements MigrationInterface { |
|
23 | +class Migration37 implements MigrationInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Upgrade to to the next version |
26 | 27 | */ |
27 | - public function upgrade() { |
|
28 | + public function upgrade() |
|
29 | + { |
|
28 | 30 | // Move repositories to their own table |
29 | 31 | Database::exec( |
30 | 32 | "CREATE TABLE IF NOT EXISTS `##repository` (" . |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 10 to version 11. |
22 | 22 | */ |
23 | -class Migration10 implements MigrationInterface { |
|
23 | +class Migration10 implements MigrationInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Upgrade to to the next version |
26 | 27 | */ |
27 | - public function upgrade() { |
|
28 | + public function upgrade() |
|
29 | + { |
|
28 | 30 | // Delete old configuration setting |
29 | 31 | Database::exec("DELETE FROM `##gedcom_setting` WHERE setting_name IN ('SEARCH_FACTS_DEFAULT', 'DISPLAY_JEWISH_GERESHAYIM', 'DISPLAY_JEWISH_THOUSANDS')"); |
30 | 32 |