@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 35 to version 36. |
22 | 22 | */ |
23 | -class Migration35 implements MigrationInterface { |
|
23 | +class Migration35 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 | // Use LONGTEXT instead of TEXT and MEDIUMTEXT, and make NOT NULL. |
29 | 31 | Database::exec("UPDATE `##news` SET body = '' WHERE body IS NULL"); |
30 | 32 | Database::exec("UPDATE `##other` SET o_gedcom = '' WHERE o_gedcom IS NULL"); |
@@ -21,11 +21,13 @@ |
||
21 | 21 | /** |
22 | 22 | * Upgrade the database schema from version 9 to version 10. |
23 | 23 | */ |
24 | -class Migration9 implements MigrationInterface { |
|
24 | +class Migration9 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 | // Change index on name table |
30 | 32 | try { |
31 | 33 | Database::exec( |
@@ -22,11 +22,13 @@ |
||
22 | 22 | /** |
23 | 23 | * Upgrade the database schema from version 0 (empty database) to version 1. |
24 | 24 | */ |
25 | -class Migration0 implements MigrationInterface { |
|
25 | +class Migration0 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 | Database::exec( |
31 | 33 | "CREATE TABLE IF NOT EXISTS `##gedcom` (" . |
32 | 34 | " gedcom_id INTEGER AUTO_INCREMENT NOT NULL," . |
@@ -21,11 +21,13 @@ |
||
21 | 21 | /** |
22 | 22 | * Upgrade the database schema from version 12 to version 13. |
23 | 23 | */ |
24 | -class Migration12 implements MigrationInterface { |
|
24 | +class Migration12 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 | // Delete old config settings |
30 | 32 | |
31 | 33 | // Convert MULTI_MEDIA (0=false, 1=true) to MEDIA_UPLOAD (1=members, 0=managers, -1=nobody) |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 21 to version 22. |
22 | 22 | */ |
23 | -class Migration21 implements MigrationInterface { |
|
23 | +class Migration21 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 | // Data fix for bug #1072477 |
29 | 31 | Database::exec("UPDATE `##default_resn` SET xref = NULL WHERE xref = ''"); |
30 | 32 | Database::exec("UPDATE `##default_resn` SET tag_type = NULL WHERE tag_type = ''"); |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 7 to version 8. |
22 | 22 | */ |
23 | -class Migration7 implements MigrationInterface { |
|
23 | +class Migration7 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 | // Update config data defining theme selection |
29 | 31 | Database::exec( |
30 | 32 | "UPDATE `##gedcom_setting` SET setting_value=TRIM(LEADING 'themes/' FROM TRIM(TRAILING '/' FROM setting_value)) WHERE setting_name='THEME_DIR'" |
@@ -18,7 +18,8 @@ |
||
18 | 18 | /** |
19 | 19 | * Upgrade the database schema. |
20 | 20 | */ |
21 | -interface MigrationInterface { |
|
21 | +interface MigrationInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * Upgrade to to the next version |
24 | 25 | */ |
@@ -21,11 +21,13 @@ |
||
21 | 21 | /** |
22 | 22 | * Upgrade the database schema from version 32 to version 33. |
23 | 23 | */ |
24 | -class Migration32 implements MigrationInterface { |
|
24 | +class Migration32 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 | try { |
30 | 32 | Database::prepare( |
31 | 33 | "ALTER TABLE `##site_setting` CHANGE setting_value setting_value VARCHAR(2000) NOT NULL" |
@@ -21,11 +21,13 @@ |
||
21 | 21 | /** |
22 | 22 | * Upgrade the database schema from version 20 to version 21. |
23 | 23 | */ |
24 | -class Migration20 implements MigrationInterface { |
|
24 | +class Migration20 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 | // Delete some old/unused configuration settings |
30 | 32 | Database::exec("DELETE FROM `##gedcom_setting` WHERE setting_name IN ('MEDIA_EXTERNAL')"); |
31 | 33 |