diff --git a/install/froxlor.sql b/install/froxlor.sql index 973b7c9c..f93818d3 100644 --- a/install/froxlor.sql +++ b/install/froxlor.sql @@ -270,9 +270,9 @@ CREATE TABLE `panel_domains` ( `writeaccesslog` tinyint(1) DEFAULT '1', `writeerrorlog` tinyint(1) DEFAULT '1', `override_tls` tinyint(1) DEFAULT '0', - `ssl_protocols` text, - `ssl_cipher_list` text, - `tlsv13_cipher_list` text, + `ssl_protocols` varchar(255) NOT NULL DEFAULT '', + `ssl_cipher_list` varchar(500) NOT NULL DEFAULT '', + `tlsv13_cipher_list` varchar(500) NOT NULL DEFAULT '', `ssl_enabled` tinyint(1) DEFAULT '1', `ssl_honorcipherorder` tinyint(1) DEFAULT '0', `ssl_sessiontickets` tinyint(1) DEFAULT '1', @@ -712,7 +712,7 @@ opcache.interned_strings_buffer'), ('panel', 'customer_hide_options', ''), ('panel', 'is_configured', '0'), ('panel', 'version', '0.10.25'), - ('panel', 'db_version', '202103030'); + ('panel', 'db_version', '202103110'); DROP TABLE IF EXISTS `panel_tasks`; diff --git a/install/updates/froxlor/0.10/update_0.10.inc.php b/install/updates/froxlor/0.10/update_0.10.inc.php index f784ed8e..60983e8c 100644 --- a/install/updates/froxlor/0.10/update_0.10.inc.php +++ b/install/updates/froxlor/0.10/update_0.10.inc.php @@ -735,6 +735,9 @@ if (\Froxlor\Froxlor::isDatabaseVersion('202101200')) { \Froxlor\Froxlor::updateToDbVersion('202102200'); } +/* + * skip due to potential "1118 Row size too large" error + * if (\Froxlor\Froxlor::isDatabaseVersion('202102200')) { showUpdateStep("Add new description fields to mail and domain table", true); @@ -744,8 +747,43 @@ if (\Froxlor\Froxlor::isDatabaseVersion('202102200')) { \Froxlor\Froxlor::updateToDbVersion('202103030'); } +*/ if (\Froxlor\Froxlor::isFroxlorVersion('0.10.24')) { showUpdateStep("Updating from 0.10.24 to 0.10.25", false); \Froxlor\Froxlor::updateToVersion('0.10.25'); } + +if (\Froxlor\Froxlor::isDatabaseVersion('202102200') || \Froxlor\Froxlor::isDatabaseVersion('202103030')) { + + showUpdateStep("Refactoring columns from large tables", true); + Database::query("ALTER TABLE panel_domains CHANGE `ssl_protocols` `ssl_protocols` varchar(255) NOT NULL DEFAULT '';"); + Database::query("ALTER TABLE panel_domains CHANGE `ssl_cipher_list` `ssl_cipher_list` varchar(500) NOT NULL DEFAULT '';"); + Database::query("ALTER TABLE panel_domains CHANGE `tlsv13_cipher_list` `tlsv13_cipher_list` varchar(500) NOT NULL DEFAULT '';"); + lastStepStatus(0); + + showUpdateStep("Add new description fields to mail and domain table", true); + $result = Database::query("DESCRIBE `panel_domains`"); + $columnfound = 0; + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + if ($row['Field'] == 'description') { + $columnfound = 1; + } + } + if (! $columnfound) { + Database::query("ALTER TABLE panel_domains ADD `description` varchar(255) NOT NULL DEFAULT '' AFTER `ssl_sessiontickets`;"); + } + $result = Database::query("DESCRIBE `mail_virtual`"); + $columnfound = 0; + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + if ($row['Field'] == 'description') { + $columnfound = 1; + } + } + if (! $columnfound) { + Database::query("ALTER TABLE mail_virtual ADD `description` varchar(255) NOT NULL DEFAULT '' AFTER `iscatchall`"); + } + lastStepStatus(0); + + \Froxlor\Froxlor::updateToDbVersion('202103110'); +} diff --git a/lib/Froxlor/Froxlor.php b/lib/Froxlor/Froxlor.php index a2362afc..fd782640 100644 --- a/lib/Froxlor/Froxlor.php +++ b/lib/Froxlor/Froxlor.php @@ -10,7 +10,7 @@ final class Froxlor const VERSION = '0.10.25'; // Database version (YYYYMMDDC where C is a daily counter) - const DBVERSION = '202103030'; + const DBVERSION = '202103110'; // Distribution branding-tag (used for Debian etc.) const BRANDING = '';