Added sql to the uninstall sql to remove changes made to the assets table on uninstall of a component. resolved gh-616
This commit is contained in:
parent
bbee45ccab
commit
4339ca00b3
@ -144,11 +144,11 @@ TODO
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 30th November, 2020
|
+ *Last Build*: 1st December, 2020
|
||||||
+ *Version*: 2.11.7
|
+ *Version*: 2.11.7
|
||||||
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
|
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
|
||||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
+ *Line count*: **284720**
|
+ *Line count*: **284731**
|
||||||
+ *Field count*: **1537**
|
+ *Field count*: **1537**
|
||||||
+ *File count*: **1799**
|
+ *File count*: **1799**
|
||||||
+ *Folder count*: **304**
|
+ *Folder count*: **304**
|
||||||
|
@ -144,11 +144,11 @@ TODO
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 30th November, 2020
|
+ *Last Build*: 1st December, 2020
|
||||||
+ *Version*: 2.11.7
|
+ *Version*: 2.11.7
|
||||||
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
|
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
|
||||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
+ *Line count*: **284720**
|
+ *Line count*: **284731**
|
||||||
+ *Field count*: **1537**
|
+ *Field count*: **1537**
|
||||||
+ *File count*: **1799**
|
+ *File count*: **1799**
|
||||||
+ *Folder count*: **304**
|
+ *Folder count*: **304**
|
||||||
|
@ -1,11 +1 @@
|
|||||||
###INSTALL###
|
###INSTALL###
|
||||||
|
|
||||||
--
|
|
||||||
-- Always insure this column rules is large enough for all the access control values.
|
|
||||||
--
|
|
||||||
ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.';
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Always insure this column name is large enough for long component and view names.
|
|
||||||
--
|
|
||||||
ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.';
|
|
||||||
|
@ -1 +1 @@
|
|||||||
###UNINSTALL###
|
###UNINSTALL###
|
||||||
|
@ -10509,6 +10509,40 @@ class Interpretation extends Fields
|
|||||||
unset($this->customScriptBuilder['sql']);
|
unset($this->customScriptBuilder['sql']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if this component needs larger rules
|
||||||
|
// also check if the developer will allow this
|
||||||
|
// TODO still adding to GUI the needed switches and code
|
||||||
|
if (1)
|
||||||
|
{
|
||||||
|
$db .= PHP_EOL;
|
||||||
|
$db .= PHP_EOL . '--';
|
||||||
|
$db .= PHP_EOL
|
||||||
|
. '--' . $this->setLine(
|
||||||
|
__LINE__
|
||||||
|
)
|
||||||
|
. ' Always insure this column rules is large enough for all the access control values.';
|
||||||
|
$db .= PHP_EOL . '--';
|
||||||
|
$db .= PHP_EOL
|
||||||
|
. "ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.';";
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if this component needs larger names
|
||||||
|
// also check if the developer will allow this
|
||||||
|
// TODO still adding to GUI the needed switches and code
|
||||||
|
if (1)
|
||||||
|
{
|
||||||
|
$db .= PHP_EOL;
|
||||||
|
$db .= PHP_EOL . '--';
|
||||||
|
$db .= PHP_EOL
|
||||||
|
. '--' . $this->setLine(
|
||||||
|
__LINE__
|
||||||
|
)
|
||||||
|
. ' Always insure this column name is large enough for long component and view names.';
|
||||||
|
$db .= PHP_EOL . '--';
|
||||||
|
$db .= PHP_EOL
|
||||||
|
. "ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.';";
|
||||||
|
}
|
||||||
|
|
||||||
return $db;
|
return $db;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10541,6 +10575,44 @@ class Interpretation extends Fields
|
|||||||
unset($this->customScriptBuilder['sql_uninstall']);
|
unset($this->customScriptBuilder['sql_uninstall']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if this component used larger rules
|
||||||
|
// now revert them back on uninstall
|
||||||
|
// TODO still adding to GUI the needed switches and code
|
||||||
|
if (1)
|
||||||
|
{
|
||||||
|
// https://github.com/joomla/joomla-cms/blob/3.10.0-alpha3/installation/sql/mysql/joomla.sql#L22
|
||||||
|
// Checked 1st December 2020
|
||||||
|
$db .= PHP_EOL;
|
||||||
|
$db .= PHP_EOL . '--';
|
||||||
|
$db .= PHP_EOL
|
||||||
|
. '--' . $this->setLine(
|
||||||
|
__LINE__
|
||||||
|
)
|
||||||
|
. ' Always insure this column rules is reversed to Joomla defaults on uninstall. (as on 1st Dec 2020)';
|
||||||
|
$db .= PHP_EOL . '--';
|
||||||
|
$db .= PHP_EOL
|
||||||
|
. "ALTER TABLE `#__assets` CHANGE `rules` `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.';";
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if this component used larger rules
|
||||||
|
// now revert them back on uninstall
|
||||||
|
// TODO still adding to GUI the needed switches and code
|
||||||
|
if (1)
|
||||||
|
{
|
||||||
|
// https://github.com/joomla/joomla-cms/blob/3.10.0-alpha3/installation/sql/mysql/joomla.sql#L20
|
||||||
|
// Checked 1st December 2020
|
||||||
|
$db .= PHP_EOL;
|
||||||
|
$db .= PHP_EOL . '--';
|
||||||
|
$db .= PHP_EOL
|
||||||
|
. '--' . $this->setLine(
|
||||||
|
__LINE__
|
||||||
|
)
|
||||||
|
. ' Always insure this column name is reversed to Joomla defaults on uninstall. (as on 1st Dec 2020).';
|
||||||
|
$db .= PHP_EOL . '--';
|
||||||
|
$db .= PHP_EOL
|
||||||
|
. "ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.';";
|
||||||
|
}
|
||||||
|
|
||||||
return $db;
|
return $db;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17660,7 +17732,9 @@ class Interpretation extends Fields
|
|||||||
. "protected function getThe" . $filter['function']
|
. "protected function getThe" . $filter['function']
|
||||||
. "Selections()";
|
. "Selections()";
|
||||||
$function[] = $this->_t(1) . "{";
|
$function[] = $this->_t(1) . "{";
|
||||||
$function[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
|
$function[] = $this->_t(2) . "//" . $this->setLine(
|
||||||
|
__LINE__
|
||||||
|
)
|
||||||
. " Get a db connection.";
|
. " Get a db connection.";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -17763,7 +17837,6 @@ class Interpretation extends Fields
|
|||||||
. $filter['code'] . ")";
|
. $filter['code'] . ")";
|
||||||
$function[] = $this->_t(3) . "{";
|
$function[] = $this->_t(3) . "{";
|
||||||
|
|
||||||
|
|
||||||
// check if translated value is used
|
// check if translated value is used
|
||||||
if ($translation)
|
if ($translation)
|
||||||
{
|
{
|
||||||
|
@ -47,3 +47,14 @@ DROP TABLE IF EXISTS `#__componentbuilder_joomla_plugin_updates`;
|
|||||||
DROP TABLE IF EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls`;
|
DROP TABLE IF EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls`;
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `#__componentbuilder_external_code`;
|
DROP TABLE IF EXISTS `#__componentbuilder_external_code`;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Always insure this column rules is reversed to Joomla defaults on uninstall. (as on 1st Dec 2020)
|
||||||
|
--
|
||||||
|
ALTER TABLE `#__assets` CHANGE `rules` `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Always insure this column name is reversed to Joomla defaults on uninstall. (as on 1st Dec 2020).
|
||||||
|
--
|
||||||
|
ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="component" version="3.2" method="upgrade">
|
<extension type="component" version="3.2" method="upgrade">
|
||||||
<name>COM_COMPONENTBUILDER</name>
|
<name>COM_COMPONENTBUILDER</name>
|
||||||
<creationDate>30th November, 2020</creationDate>
|
<creationDate>1st December, 2020</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||||
|
Loading…
Reference in New Issue
Block a user