From cab84dd9c5af88473239a802d4ce455a2de6f328 Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 2 Oct 2013 14:18:32 -0500 Subject: [ticket/11882] Incorrect dependency in signature module auth migration PHPBB3-11882 --- phpBB/phpbb/db/migration/data/v310/signature_module_auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php b/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php index a85e0be01c..6da1cb8009 100644 --- a/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php +++ b/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php @@ -27,7 +27,7 @@ class signature_module_auth extends \phpbb\db\migration\migration static public function depends_on() { - return array('\phpbb\db\migration\data\v31x\dev'); + return array('\phpbb\db\migration\data\v310\dev'); } public function update_data() -- cgit v1.2.1 From 16d6dc2e7101aba6c08183f2acca2592ec8e04f5 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 3 Oct 2013 21:09:02 +0530 Subject: [ticket/11344] Upgrade migration to namespaces PHPBB3-11344 --- .../data/v310/acp_style_components_module.php | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php b/phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php new file mode 100644 index 0000000000..9f168f4fd6 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php @@ -0,0 +1,42 @@ +db->sql_query($sql); + $module_id = $this->db->sql_fetchfield('module_id'); + $this->db->sql_freeresult($result); + + return $module_id == false; + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\v310\dev'); + } + + public function update_data() + { + return array( + array('module.remove', array( + 'acp', + false, + 'ACP_STYLE_COMPONENTS', + )), + ); + } +} -- cgit v1.2.1 From da1edb4578ab66265c1a846180b1123bbb889c72 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 6 Oct 2013 10:38:11 +0530 Subject: [ticket/11888] Update default search backend in namespaces migration PHPBB3-11888 --- phpBB/phpbb/db/migration/data/v310/namespaces.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/namespaces.php b/phpBB/phpbb/db/migration/data/v310/namespaces.php index 9b182f88b8..f74ecbd874 100644 --- a/phpBB/phpbb/db/migration/data/v310/namespaces.php +++ b/phpBB/phpbb/db/migration/data/v310/namespaces.php @@ -23,7 +23,7 @@ class namespaces extends \phpbb\db\migration\migration return array( array('if', array( (preg_match('#^phpbb_search_#', $this->config['search_type'])), - array('config.update', array('search_type', str_replace('phpbb_search_', 'phpbb\\search\\', $this->config['search_type']))), + array('config.update', array('search_type', str_replace('phpbb_search_', '\\phpbb\\search\\', $this->config['search_type']))), )), ); } -- cgit v1.2.1 From 94b49d8a925e4bc7f10cbcf117ba81b071019b73 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 14 Jul 2013 20:44:00 +0200 Subject: [ticket/11703] Make jQuery CDN switch more generic. Config variable: load_jquery_cdn -> allow_cdn Template variable: S_JQUERY_FALLBACK -> S_ALLOW_CDN PHPBB3-11703 --- phpBB/phpbb/db/migration/data/v310/allow_cdn.php | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/allow_cdn.php (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php new file mode 100644 index 0000000000..2570998643 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -0,0 +1,28 @@ +config['load_jquery_cdn'])), + array('config.remove', array('load_jquery_cdn')), + ); + } +} -- cgit v1.2.1 From 21eae92c27d22a96f847c01770b18f3d00b5aabd Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 14 Jul 2013 21:11:14 +0200 Subject: [ticket/11703] Add effectively_installed(). PHPBB3-11703 --- phpBB/phpbb/db/migration/data/v310/allow_cdn.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php index 2570998643..0b79ac77f9 100644 --- a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -11,6 +11,11 @@ namespace phpbb\db\migration\data\v310; class allow_cdn extends phpbb_db_migration { + public function effectively_installed() + { + return isset($this->config['allow_cdn']); + } + static public function depends_on() { return array( -- cgit v1.2.1 From 51cc7155041c95ca47147072c1c04449ad0bcf67 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 10 Oct 2013 23:45:22 +0200 Subject: [ticket/11703] Extend the correct migration class. PHPBB3-11703 --- phpBB/phpbb/db/migration/data/v310/allow_cdn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php index 0b79ac77f9..aa471df6e7 100644 --- a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -9,7 +9,7 @@ namespace phpbb\db\migration\data\v310; -class allow_cdn extends phpbb_db_migration +class allow_cdn extends \phpbb\db\migration\migration { public function effectively_installed() { -- cgit v1.2.1 From 39f77149b2922224bc1a9d741357bf54abec49d9 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 00:23:04 +0200 Subject: [ticket/11621] Add migration dropping MySQL search indexes. Possibly time-consuming index-regeneration will be left to the user. PHPBB3-11621 --- .../db/migration/data/v310/mysql_fulltext_drop.php | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php new file mode 100644 index 0000000000..2bb64bdef4 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php @@ -0,0 +1,38 @@ +db->sql_layer, 'mysql') === false) + { + return array(); + } + + return array( + 'drop_keys' => array( + $this->table_prefix . 'posts' => array( + 'post_subject', + 'post_text', + 'post_content', + ), + ), + ); + } +} -- cgit v1.2.1 From 3b1eccbf74a1a66bc5ab2f843d130fe6322c314e Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 18:16:09 -0500 Subject: [ticket/11905] 3.1.0-a1 Migration Created a migration tips develop tool to help find the migration tree tips so they can be copied to versions released. With this, A1 is the only current tree tip (it depends on all other migrations). PHPBB3-11905 --- phpBB/phpbb/db/migration/data/v310/alpha1.php | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/alpha1.php (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php new file mode 100644 index 0000000000..04f195daeb --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php @@ -0,0 +1,42 @@ + Date: Fri, 11 Oct 2013 14:09:29 +0200 Subject: [ticket/11621] Use effectively_installed() instead. PHPBB3-11621 --- phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php index 2bb64bdef4..13db2f2a40 100644 --- a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php +++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php @@ -11,6 +11,12 @@ namespace phpbb\db\migration\data\v310; class mysql_fulltext_drop extends \phpbb\db\migration\migration { + public function effectively_installed() + { + // This migration is irrelevant for all non-MySQL DBMSes. + return strpos($this->db->sql_layer, 'mysql') === false; + } + static public function depends_on() { return array( @@ -20,11 +26,6 @@ class mysql_fulltext_drop extends \phpbb\db\migration\migration public function update_schema() { - if (strpos($this->db->sql_layer, 'mysql') === false) - { - return array(); - } - return array( 'drop_keys' => array( $this->table_prefix . 'posts' => array( -- cgit v1.2.1 From a049c4f0afdf558d1f895b20917bddee81a18350 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 14:16:58 +0200 Subject: [ticket/11621] Put mysql_fulltext_drop into alpha1 migration. PHPBB3-11621 --- phpBB/phpbb/db/migration/data/v310/alpha1.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php index 04f195daeb..bd4861b1f5 100644 --- a/phpBB/phpbb/db/migration/data/v310/alpha1.php +++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php @@ -24,6 +24,7 @@ class alpha1 extends \phpbb\db\migration\migration '\phpbb\db\migration\data\v310\config_db_text', '\phpbb\db\migration\data\v310\forgot_password', '\phpbb\db\migration\data\v310\mod_rewrite', + '\phpbb\db\migration\data\v310\mysql_fulltext_drop', '\phpbb\db\migration\data\v310\namespaces', '\phpbb\db\migration\data\v310\notifications_cron', '\phpbb\db\migration\data\v310\notification_options_reconvert', -- cgit v1.2.1 From 4c560806085f38e33fa0a2e726f99e7d5c457369 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 16:02:56 +0200 Subject: [ticket/11621] Correct GPLv2 link in file header. PHPBB3-11621 --- phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php index 13db2f2a40..def4163190 100644 --- a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php +++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php @@ -3,7 +3,7 @@ * * @package migration * @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2 +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ -- cgit v1.2.1 From 2050a39da793b9ed219beed868ec86ebade423f6 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Oct 2013 17:40:16 +0200 Subject: [feature/plupload/integration] Integration of Plupload This commit is a highly-refactored and up-to-date version of Fyorl's work which was part of his Google Summer of Code 2012 project "Attachment Improvements". PHPBB3-10929 --- phpBB/phpbb/db/migration/data/v310/alpha1.php | 1 + phpBB/phpbb/db/migration/data/v310/plupload.php | 32 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/plupload.php (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php index 04f195daeb..368c53125e 100644 --- a/phpBB/phpbb/db/migration/data/v310/alpha1.php +++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php @@ -27,6 +27,7 @@ class alpha1 extends \phpbb\db\migration\migration '\phpbb\db\migration\data\v310\namespaces', '\phpbb\db\migration\data\v310\notifications_cron', '\phpbb\db\migration\data\v310\notification_options_reconvert', + '\phpbb\db\migration\data\v310\plupload', '\phpbb\db\migration\data\v310\signature_module_auth', '\phpbb\db\migration\data\v310\softdelete_mcp_modules', '\phpbb\db\migration\data\v310\teampage', diff --git a/phpBB/phpbb/db/migration/data/v310/plupload.php b/phpBB/phpbb/db/migration/data/v310/plupload.php new file mode 100644 index 0000000000..1787c6dafc --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/plupload.php @@ -0,0 +1,32 @@ +config['plupload_last_gc']) && + isset($this->config['plupload_salt']); + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\310\dev'); + } + + public function update_data() + { + return array( + array('config.add', array('plupload_last_gc', 0)), + array('config.add', array('plupload_salt', unique_id())), + ); + } +} -- cgit v1.2.1 From 6ccceca064929af4f1c59da56586e3d3003bcdda Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 13 Oct 2013 14:25:28 +0200 Subject: [ticket/11621] Add explanation to mysql_fulltext_drop. PHPBB3-11621 --- phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php index def4163190..97d174d4bc 100644 --- a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php +++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php @@ -26,6 +26,14 @@ class mysql_fulltext_drop extends \phpbb\db\migration\migration public function update_schema() { + /* + * Drop FULLTEXT indexes related to MySQL fulltext search. + * Doing so is equivalent to dropping the search index from the ACP. + * Possibly time-consuming recreation of the search index (i.e. + * FULLTEXT indexes) is left as a task to the admin to not + * unnecessarily stall the upgrade process. The new search index will + * then require about 40% less table space (also see PHPBB3-11621). + */ return array( 'drop_keys' => array( $this->table_prefix . 'posts' => array( -- cgit v1.2.1 From 2adbd08714eb710e7c19481bb94646542bbf0e78 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 16 Oct 2013 00:02:51 +0200 Subject: [ticket/11926] Fix plupload migration dependency. PHPBB3-11926 --- phpBB/phpbb/db/migration/data/v310/plupload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/plupload.php b/phpBB/phpbb/db/migration/data/v310/plupload.php index 1787c6dafc..7cdba507a2 100644 --- a/phpBB/phpbb/db/migration/data/v310/plupload.php +++ b/phpBB/phpbb/db/migration/data/v310/plupload.php @@ -19,7 +19,7 @@ class plupload extends \phpbb\db\migration\migration static public function depends_on() { - return array('\phpbb\db\migration\data\310\dev'); + return array('\phpbb\db\migration\data\v310\dev'); } public function update_data() -- cgit v1.2.1 From 7f58a4572eaca75aecff2da889e67ea151616011 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 28 Oct 2013 22:27:25 +0100 Subject: [ticket/11981] Fix code sniffer complaints PHPBB3-11981 --- phpBB/phpbb/db/migration/data/v310/notifications.php | 2 +- phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php | 6 +++--- phpBB/phpbb/db/migration/data/v310/style_update_p2.php | 8 ++++---- phpBB/phpbb/db/migration/data/v310/teampage.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/notifications.php b/phpBB/phpbb/db/migration/data/v310/notifications.php index 10f1392094..61be25bb5f 100644 --- a/phpBB/phpbb/db/migration/data/v310/notifications.php +++ b/phpBB/phpbb/db/migration/data/v310/notifications.php @@ -34,7 +34,7 @@ class notifications extends \phpbb\db\migration\migration ), $this->table_prefix . 'notifications' => array( 'COLUMNS' => array( - 'notification_id' => array('UINT', NULL, 'auto_increment'), + 'notification_id' => array('UINT', null, 'auto_increment'), 'item_type' => array('VCHAR:255', ''), 'item_id' => array('UINT', 0), 'item_parent_id' => array('UINT', 0), diff --git a/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php b/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php index 8ed626d8a6..eb2eb361ee 100644 --- a/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php +++ b/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php @@ -26,7 +26,7 @@ class notifications_schema_fix extends \phpbb\db\migration\migration 'add_tables' => array( $this->table_prefix . 'notification_types' => array( 'COLUMNS' => array( - 'notification_type_id' => array('USINT', NULL, 'auto_increment'), + 'notification_type_id' => array('USINT', null, 'auto_increment'), 'notification_type_name' => array('VCHAR:255', ''), 'notification_type_enabled' => array('BOOL', 1), ), @@ -37,7 +37,7 @@ class notifications_schema_fix extends \phpbb\db\migration\migration ), $this->table_prefix . 'notifications' => array( 'COLUMNS' => array( - 'notification_id' => array('UINT:10', NULL, 'auto_increment'), + 'notification_id' => array('UINT:10', null, 'auto_increment'), 'notification_type_id' => array('USINT', 0), 'item_id' => array('UINT', 0), 'item_parent_id' => array('UINT', 0), @@ -73,7 +73,7 @@ class notifications_schema_fix extends \phpbb\db\migration\migration ), $this->table_prefix . 'notifications' => array( 'COLUMNS' => array( - 'notification_id' => array('UINT', NULL, 'auto_increment'), + 'notification_id' => array('UINT', null, 'auto_increment'), 'item_type' => array('VCHAR:255', ''), 'item_id' => array('UINT', 0), 'item_parent_id' => array('UINT', 0), diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p2.php b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php index 202a8409fb..c5b45d9dc9 100644 --- a/phpBB/phpbb/db/migration/data/v310/style_update_p2.php +++ b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php @@ -56,7 +56,7 @@ class style_update_p2 extends \phpbb\db\migration\migration 'add_tables' => array( $this->table_prefix . 'styles_imageset' => array( 'COLUMNS' => array( - 'imageset_id' => array('UINT', NULL, 'auto_increment'), + 'imageset_id' => array('UINT', null, 'auto_increment'), 'imageset_name' => array('VCHAR_UNI:255', ''), 'imageset_copyright' => array('VCHAR_UNI', ''), 'imageset_path' => array('VCHAR:100', ''), @@ -68,7 +68,7 @@ class style_update_p2 extends \phpbb\db\migration\migration ), $this->table_prefix . 'styles_imageset_data' => array( 'COLUMNS' => array( - 'image_id' => array('UINT', NULL, 'auto_increment'), + 'image_id' => array('UINT', null, 'auto_increment'), 'image_name' => array('VCHAR:200', ''), 'image_filename' => array('VCHAR:200', ''), 'image_lang' => array('VCHAR:30', ''), @@ -83,7 +83,7 @@ class style_update_p2 extends \phpbb\db\migration\migration ), $this->table_prefix . 'styles_template' => array( 'COLUMNS' => array( - 'template_id' => array('UINT', NULL, 'auto_increment'), + 'template_id' => array('UINT', null, 'auto_increment'), 'template_name' => array('VCHAR_UNI:255', ''), 'template_copyright' => array('VCHAR_UNI', ''), 'template_path' => array('VCHAR:100', ''), @@ -112,7 +112,7 @@ class style_update_p2 extends \phpbb\db\migration\migration ), $this->table_prefix . 'styles_theme' => array( 'COLUMNS' => array( - 'theme_id' => array('UINT', NULL, 'auto_increment'), + 'theme_id' => array('UINT', null, 'auto_increment'), 'theme_name' => array('VCHAR_UNI:255', ''), 'theme_copyright' => array('VCHAR_UNI', ''), 'theme_path' => array('VCHAR:100', ''), diff --git a/phpBB/phpbb/db/migration/data/v310/teampage.php b/phpBB/phpbb/db/migration/data/v310/teampage.php index 80cc4be1c0..172435c672 100644 --- a/phpBB/phpbb/db/migration/data/v310/teampage.php +++ b/phpBB/phpbb/db/migration/data/v310/teampage.php @@ -27,7 +27,7 @@ class teampage extends \phpbb\db\migration\migration 'add_tables' => array( $this->table_prefix . 'teampage' => array( 'COLUMNS' => array( - 'teampage_id' => array('UINT', NULL, 'auto_increment'), + 'teampage_id' => array('UINT', null, 'auto_increment'), 'group_id' => array('UINT', 0), 'teampage_name' => array('VCHAR_UNI:255', ''), 'teampage_position' => array('UINT', 0), -- cgit v1.2.1 From 6f33954757a05044c8700a70051ae25e3a5cc627 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 8 Nov 2013 17:37:52 +0100 Subject: [ticket/11922] Drop all keys before trying to delete columns to avoid issues On MSSQL columns that have an index can not be dropped. PHPBB3-11922 --- phpBB/phpbb/db/migration/data/v310/softdelete_p2.php | 6 +++++- phpBB/phpbb/db/migration/data/v310/style_update_p2.php | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/softdelete_p2.php b/phpBB/phpbb/db/migration/data/v310/softdelete_p2.php index 0c32e474f4..38b190c766 100644 --- a/phpBB/phpbb/db/migration/data/v310/softdelete_p2.php +++ b/phpBB/phpbb/db/migration/data/v310/softdelete_p2.php @@ -34,7 +34,10 @@ class softdelete_p2 extends \phpbb\db\migration\migration ), 'drop_keys' => array( $this->table_prefix . 'posts' => array('post_approved'), - $this->table_prefix . 'topics' => array('forum_appr_last'), + $this->table_prefix . 'topics' => array( + 'forum_appr_last', + 'topic_approved', + ), ), ); } @@ -63,6 +66,7 @@ class softdelete_p2 extends \phpbb\db\migration\migration ), $this->table_prefix . 'topics' => array( 'forum_appr_last' => array('forum_id', 'topic_approved', 'topic_last_post_id'), + 'topic_approved' => array('topic_approved'), ), ), ); diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p2.php b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php index c5b45d9dc9..40d6a4dbbd 100644 --- a/phpBB/phpbb/db/migration/data/v310/style_update_p2.php +++ b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php @@ -24,6 +24,14 @@ class style_update_p2 extends \phpbb\db\migration\migration public function update_schema() { return array( + 'drop_keys' => array( + $this->table_prefix . 'styles' => array( + 'imageset_id', + 'template_id', + 'theme_id', + ), + ), + 'drop_columns' => array( $this->table_prefix . 'styles' => array( 'imageset_id', @@ -53,6 +61,14 @@ class style_update_p2 extends \phpbb\db\migration\migration ), ), + 'add_index' => array( + $this->table_prefix . 'styles' => array( + 'imageset_id' => array('imageset_id'), + 'template_id' => array('template_id'), + 'theme_id' => array('theme_id'), + ), + ), + 'add_tables' => array( $this->table_prefix . 'styles_imageset' => array( 'COLUMNS' => array( -- cgit v1.2.1 From a353673e7c3e5a5a4720bea008e1df60c1401ae2 Mon Sep 17 00:00:00 2001 From: Lukasz Date: Thu, 7 Nov 2013 22:06:48 +0100 Subject: [ticket/12005] Remove PM popup module from DB PHPBB3-12005 --- .../db/migration/data/v310/ucp_popuppm_module.php | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php b/phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php new file mode 100644 index 0000000000..f8ada6c6f5 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php @@ -0,0 +1,42 @@ +db->sql_query($sql); + $module_id = $this->db->sql_fetchfield('module_id'); + $this->db->sql_freeresult($result); + + return $module_id == false; + } + + static public function depends_on() + { + return array('\phpbb\db\migration\data\v310\dev'); + } + + public function update_data() + { + return array( + array('module.remove', array( + 'ucp', + 'UCP_PM', + 'UCP_PM_POPUP_TITLE', + )), + ); + } +} -- cgit v1.2.1 From 50896305fa9b5b0db733ae4a401c9bd0a85cabe9 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Wed, 13 Nov 2013 23:57:39 -0800 Subject: [ticket/12008] The read_notification_last_gc config setting should be dynamic. PHPBB3-12008 --- .../migration/data/v310/notifications_cron_p2.php | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php b/phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php new file mode 100644 index 0000000000..050e679cc0 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php @@ -0,0 +1,27 @@ + Date: Wed, 13 Nov 2013 23:19:47 +0100 Subject: [prep-release-3.1.0-a2] Add migration for 3.1.0-a2 --- phpBB/phpbb/db/migration/data/v310/alpha2.php | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/alpha2.php (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/alpha2.php b/phpBB/phpbb/db/migration/data/v310/alpha2.php new file mode 100644 index 0000000000..3c0853f924 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/alpha2.php @@ -0,0 +1,28 @@ + Date: Wed, 20 Nov 2013 17:07:53 +0100 Subject: [ticket/11842] Add migration file for updating avatar type in database PHPBB3-11842 --- .../phpbb/db/migration/data/v310/avatar_types.php | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v310/avatar_types.php (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/avatar_types.php b/phpBB/phpbb/db/migration/data/v310/avatar_types.php new file mode 100644 index 0000000000..439e20889c --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/avatar_types.php @@ -0,0 +1,65 @@ +table_prefix . "users + SET user_avatar_type = 'avatar.driver.upload' + WHERE user_avatar_type = " . AVATAR_UPLOAD; + $this->db->sql_query($sql); + + $sql = 'UPDATE ' . $this->table_prefix . "users + SET user_avatar_type = 'avatar.driver.remote' + WHERE user_avatar_type = " . AVATAR_REMOTE; + $this->db->sql_query($sql); + + $sql = 'UPDATE ' . $this->table_prefix . "users + SET user_avatar_type = 'avatar.driver.local' + WHERE user_avatar_type = " . AVATAR_GALLERY; + $this->db->sql_query($sql); + } + + public function update_group_avatar_type() + { + $sql = 'UPDATE ' . $this->table_prefix . "groups + SET group_avatar_type = 'avatar.driver.upload' + WHERE group_avatar_type = " . AVATAR_UPLOAD; + $this->db->sql_query($sql); + + $sql = 'UPDATE ' . $this->table_prefix . "groups + SET group_avatar_type = 'avatar.driver.remote' + WHERE group_avatar_type = " . AVATAR_REMOTE; + $this->db->sql_query($sql); + + $sql = 'UPDATE ' . $this->table_prefix . "groups + SET group_avatar_type = 'avatar.driver.local' + WHERE group_avatar_type = " . AVATAR_GALLERY; + $this->db->sql_query($sql); + } +} -- cgit v1.2.1 From 0d4bf3ff45a76dcb763c76502944aa7bf78b690b Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 25 Nov 2013 13:12:08 +0100 Subject: [ticket/11842] Use type map for updating avatar types in database PHPBB3-11842 --- .../phpbb/db/migration/data/v310/avatar_types.php | 51 ++++++++++------------ 1 file changed, 23 insertions(+), 28 deletions(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/avatar_types.php b/phpBB/phpbb/db/migration/data/v310/avatar_types.php index 439e20889c..5750a43ddd 100644 --- a/phpBB/phpbb/db/migration/data/v310/avatar_types.php +++ b/phpBB/phpbb/db/migration/data/v310/avatar_types.php @@ -11,6 +11,15 @@ namespace phpbb\db\migration\data\v310; class avatar_types extends \phpbb\db\migration\migration { + /** + * @var avatar type map + */ + protected $avatar_type_map = array( + AVATAR_UPLOAD => 'avatar.driver.upload', + AVATAR_REMOTE => 'avatar.driver.remote', + AVATAR_GALLERY => 'avatar.driver.local', + ); + static public function depends_on() { return array( @@ -29,37 +38,23 @@ class avatar_types extends \phpbb\db\migration\migration public function update_user_avatar_type() { - $sql = 'UPDATE ' . $this->table_prefix . "users - SET user_avatar_type = 'avatar.driver.upload' - WHERE user_avatar_type = " . AVATAR_UPLOAD; - $this->db->sql_query($sql); - - $sql = 'UPDATE ' . $this->table_prefix . "users - SET user_avatar_type = 'avatar.driver.remote' - WHERE user_avatar_type = " . AVATAR_REMOTE; - $this->db->sql_query($sql); - - $sql = 'UPDATE ' . $this->table_prefix . "users - SET user_avatar_type = 'avatar.driver.local' - WHERE user_avatar_type = " . AVATAR_GALLERY; - $this->db->sql_query($sql); + foreach ($this->avatar_type_map as $old => $new) + { + $sql = 'UPDATE ' . $this->table_prefix . "users + SET user_avatar_type = '$new' + WHERE user_avatar_type = $old"; + $this->db->sql_query($sql); + } } public function update_group_avatar_type() { - $sql = 'UPDATE ' . $this->table_prefix . "groups - SET group_avatar_type = 'avatar.driver.upload' - WHERE group_avatar_type = " . AVATAR_UPLOAD; - $this->db->sql_query($sql); - - $sql = 'UPDATE ' . $this->table_prefix . "groups - SET group_avatar_type = 'avatar.driver.remote' - WHERE group_avatar_type = " . AVATAR_REMOTE; - $this->db->sql_query($sql); - - $sql = 'UPDATE ' . $this->table_prefix . "groups - SET group_avatar_type = 'avatar.driver.local' - WHERE group_avatar_type = " . AVATAR_GALLERY; - $this->db->sql_query($sql); + foreach ($this->avatar_type_map as $old => $new) + { + $sql = 'UPDATE ' . $this->table_prefix . "groups + SET group_avatar_type = '$new' + WHERE group_avatar_type = $old"; + $this->db->sql_query($sql); + } } } -- cgit v1.2.1 From 53be0a4432aa04b916c7e9d08785f97d8e6eb355 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 4 Dec 2013 23:40:38 +0100 Subject: [ticket/12058] Add missing apostrophe to avatar_types migration queries PHPBB3-12058 --- phpBB/phpbb/db/migration/data/v310/avatar_types.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/db/migration/data/v310') diff --git a/phpBB/phpbb/db/migration/data/v310/avatar_types.php b/phpBB/phpbb/db/migration/data/v310/avatar_types.php index 5750a43ddd..bdbdccf0c5 100644 --- a/phpBB/phpbb/db/migration/data/v310/avatar_types.php +++ b/phpBB/phpbb/db/migration/data/v310/avatar_types.php @@ -42,7 +42,7 @@ class avatar_types extends \phpbb\db\migration\migration { $sql = 'UPDATE ' . $this->table_prefix . "users SET user_avatar_type = '$new' - WHERE user_avatar_type = $old"; + WHERE user_avatar_type = '$old'"; $this->db->sql_query($sql); } } @@ -53,7 +53,7 @@ class avatar_types extends \phpbb\db\migration\migration { $sql = 'UPDATE ' . $this->table_prefix . "groups SET group_avatar_type = '$new' - WHERE group_avatar_type = $old"; + WHERE group_avatar_type = '$old'"; $this->db->sql_query($sql); } } -- cgit v1.2.1