Added InoDB options, Expanded the Custom Field #350

Merged
Llewellyn merged 13 commits from staging into master 2018-10-07 19:47:50 +00:00
6 changed files with 57 additions and 159 deletions
Showing only changes of commit feb4ae9c24 - Show all commits

View File

@ -125,13 +125,13 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 1st October, 2018
+ *Last Build*: 3rd October, 2018
+ *Version*: 2.9.6
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **195803**
+ *Line count*: **195701**
+ *Field count*: **1087**
+ *File count*: **1278**
+ *File count*: **1277**
+ *Folder count*: **201**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -125,13 +125,13 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 1st October, 2018
+ *Last Build*: 3rd October, 2018
+ *Version*: 2.9.6
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **195803**
+ *Line count*: **195701**
+ *Field count*: **1087**
+ *File count*: **1278**
+ *File count*: **1277**
+ *Folder count*: **201**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -1,131 +0,0 @@
ALTER TABLE `#__componentbuilder_joomla_component` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_joomla_component` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_admin_view` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_admin_view` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_custom_admin_view` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_custom_admin_view` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_site_view` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_site_view` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_template` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_template` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_layout` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_layout` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_dynamic_get` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_dynamic_get` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_custom_code` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_custom_code` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_library` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_library` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_snippet` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_snippet` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_validation_rule` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_validation_rule` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_field` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_field` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_fieldtype` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_fieldtype` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_language_translation` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_language_translation` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_language` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_language` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_server` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_server` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_help_document` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_help_document` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_admin_fields` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_admin_fields` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_admin_fields_conditions` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_admin_fields_conditions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_admin_fields_relations` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_admin_fields_relations` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_admin_custom_tabs` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_admin_custom_tabs` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_component_admin_views` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_component_admin_views` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_component_site_views` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_component_site_views` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_component_custom_admin_views` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_component_custom_admin_views` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_component_updates` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_component_updates` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_component_mysql_tweaks` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_component_mysql_tweaks` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_component_custom_admin_menus` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_component_custom_admin_menus` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_component_config` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_component_config` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_component_dashboard` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_component_dashboard` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_component_files_folders` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_component_files_folders` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_snippet_type` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_snippet_type` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_library_config` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_library_config` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__componentbuilder_library_files_folders_urls` ENGINE = InnoDB;
ALTER TABLE `#__componentbuilder_library_files_folders_urls` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>1st October, 2018</creationDate>
<creationDate>3rd October, 2018</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>

View File

@ -543,23 +543,6 @@
<maintainerurl>http://www.joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.9.5</version>
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.6/JCB_v2.9.6.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://www.joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>

View File

@ -3308,10 +3308,12 @@ class com_componentbuilderInstallerScript
)
);
}
// start the active table array
$activeTable = array();
// get table columns to confirm that this is an old installation
$activeColumns = $db->getTableColumns('#__componentbuilder_admin_view');
$activeTable['admin_view'] = $db->getTableColumns('#__componentbuilder_admin_view');
// target version less then 2.5.7
if (isset($activeColumns['addfields']) && (count($this->JCBversion) == 3 && $this->JCBversion[0] <= 2 && $this->JCBversion[1] <= 5 && (($this->JCBversion[1] == 5 && $this->JCBversion[2] <= 6) || ($this->JCBversion[1] < 5))))
if (isset($activeTable['admin_view']['addfields']) && (count($this->JCBversion) == 3 && $this->JCBversion[0] <= 2 && $this->JCBversion[1] <= 5 && (($this->JCBversion[1] == 5 && $this->JCBversion[2] <= 6) || ($this->JCBversion[1] < 5))))
{
// do some conversions in the admin_view table
$convertRepeatable($db, 'admin_view', array('id', 'ajax_input', 'custom_button', 'addtables', 'addlinked_views', 'addconditions', 'addfields', 'addtabs', 'addpermissions'),
@ -3345,9 +3347,9 @@ class com_componentbuilderInstallerScript
// the set move values
$this->setMoveValues = array();
// get table columns to confirm that this is an old installation
$activeColumns = $db->getTableColumns('#__componentbuilder_joomla_component');
$activeTable['joomla_component'] = $db->getTableColumns('#__componentbuilder_joomla_component');
// target version less then 2.6.0
if (isset($activeColumns['addadmin_views']) && (count($this->JCBversion) == 3 && $this->JCBversion[0] <= 2 && $this->JCBversion[1] <= 5 && (($this->JCBversion[1] == 5 && $this->JCBversion[2] <= 9) || ($this->JCBversion[1] < 6))))
if (isset($activeTable['joomla_component']['addadmin_views']) && (count($this->JCBversion) == 3 && $this->JCBversion[0] <= 2 && $this->JCBversion[1] <= 5 && (($this->JCBversion[1] == 5 && $this->JCBversion[2] <= 9) || ($this->JCBversion[1] < 6))))
{
// do some conversions in the admin_view table
$convertRepeatable($db, 'joomla_component', array('id', 'addadmin_views', 'addconfig', 'addcontributors', 'addcustom_admin_views', 'addcustommenus', 'addfiles', 'addfolders', 'addsite_views', 'dashboard_tab', 'sql_tweak', 'version_update'),
@ -3421,6 +3423,50 @@ class com_componentbuilderInstallerScript
}
}
}
// target version less then 2.9.7
if (count($this->JCBversion) == 3 && $this->JCBversion[0] <= 2 && (($this->JCBversion[1] == 9 && $this->JCBversion[2] <= 6) || $this->JCBversion[1] < 9))
{
// we basically just dump the unused columns from #__componentbuilder_joomla_component
$columnToDrop['joomla_component'] = array(
'addconfig',
'addadmin_views',
'addcustom_admin_views',
'addsite_views',
'version_update',
'sql_tweak',
'addcustommenus',
'dashboard_tab',
'php_dashboard_methods',
'addfiles',
'addfolders');
// and from from #__componentbuilder_admin_view
$columnToDrop['admin_view'] = array(
'addfields',
'addconditions');
// only drop those that exist
foreach ($columnToDrop as $table => $columns)
{
// start drop array
$drop = array();
foreach ($columns as $column)
{
if (isset($activeTable[$table][$column]))
{
// load the column
$drop[$column] = $column;
}
}
// now run query if needed
if (ComponentbuilderHelper::checkArray($drop))
{
// build query
$query = 'ALTER TABLE `#__componentbuilder_' . $table . '` DROP `' . implode('`, DROP `', $drop) . '`';
// set query
$db->setQuery($query);
$db->execute();
}
}
}
}
}
// do any install needed