diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000000..d8fb063b7a --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,120 @@ +build: false +platform: + - x64 +clone_folder: C:\projects\joomla-cms +## Build matrix for lowest and highest possible targets +environment: + matrix: + - php_ver_target: 5.6 + - php_ver_target: 7.0 + - php_ver_target: 7.1 + +init: + - SET PATH=C:\Program Files\OpenSSL;C:\tools\php;%PATH% + - SET COMPOSER_NO_INTERACTION=1 + - SET PHP=1 # This var relates to caching the php install + - SET ANSICON=121x90 (121x90) +services: + - mssql2014 + - mysql + - postgresql94 + - iis + +## Install PHP and composer, and run the appropriate composer command +install: + - IF EXIST C:\tools\php (SET PHP=0) + - ps: >- + If ($env:php_ver_target -eq "5.6") { + appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y --forcex86 php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','') + $VC = "vc11" + $PHPBuild = "x86" + } Else { + appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','') + $VC = "vc14" + $PHPBuild = "x64" + } + - cinst -y sqlite + - cd C:\tools\php + # Get the MSSQL DLL's + - ps: >- + If ($env:PHP -eq "1") { + If ($env:php_ver_target -eq "5.6") { + appveyor DownloadFile https://files.nette.org/misc/php-sqlsrv.zip + 7z x -y php-sqlsrv.zip > $null + copy SQLSRV\php_sqlsrv_56_nts.dll ext\php_sqlsrv_nts.dll + copy SQLSRV\php_pdo_sqlsrv_56_nts.dll ext\php_pdo_sqlsrv_nts.dll + Remove-Item C:\tools\php\* -include .zip + } Else { + $DLLVersion = "4.1.6.1" + cd c:\tools\php\ext + appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip + 7z x -y php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null + appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip + 7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null + Remove-Item c:\tools\php\ext* -include .zip + cd c:\tools\php}} + - IF %PHP%==1 copy php.ini-production php.ini /Y + - IF %PHP%==1 echo date.timezone="UTC" >> php.ini + - IF %PHP%==1 echo extension_dir=ext >> php.ini + - IF %PHP%==1 echo extension=php_openssl.dll >> php.ini + - IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini + - IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini + - IF %PHP%==1 echo extension=php_gd2.dll >> php.ini + - ps: >- + If ($env:php_ver_target -eq "5.6") { + Add-Content php.ini "`nextension=php_sqlsrv_nts.dll" + Add-Content php.ini "`nextension=php_pdo_sqlsrv_nts.dll" + Add-Content php.ini "`n" + } Else { + Add-Content php.ini "`nextension=php_sqlsrv.dll" + Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll" + Add-Content php.ini "`n" + } + - IF %PHP%==1 echo extension=php_pgsql.dll >> php.ini + - IF %PHP%==1 echo extension=php_pdo_pgsql.dll >> php.ini + - IF %PHP%==1 echo extension=php_pdo_sqlite.dll >> php.ini + - IF %PHP%==1 echo extension=php_sqlite3.dll >> php.ini + - IF %PHP%==1 echo extension=php_pdo_mysql.dll >> php.ini + - IF %PHP%==1 echo extension=php_mysqli.dll >> php.ini + - IF %PHP_VER_TARGET%==5.6 IF %PHP%==1 echo extension=php_mysql.dll >> php.ini + - IF %PHP%==1 echo extension=php_curl.dll >> php.ini + # Get the Wincache DLLs + - ps: >- + If ($env:PHP -eq "1") { + If ($env:php_ver_target -eq "5.6") {$wincache = "1.3.7.12"} Else {$wincache = "2.0.0.8"} + cd c:\tools\php\ext + appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip + 7z x -y php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip > $null + Remove-Item C:\tools\php\ext* -include .zip + cd c:\tools\php} + - IF %PHP%==1 echo extension=php_wincache.dll >> php.ini + - IF %PHP%==1 echo wincache.enablecli = 1 >> php.ini + - IF %PHP%==1 echo zend_extension=php_opcache.dll >> php.ini + - IF %PHP%==1 echo opcache.enable_cli=1 >> php.ini + - IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat + - appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar + - cd C:\projects\joomla-cms + - appveyor-retry composer install --no-progress --profile + +before_test: +# Database setup for MySQL via PowerShell tools + - > + "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS joomla_ut;" + - > + "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" joomla_ut < tests\unit\schema\mysql.sql + +# Database setup for PostgreSQL + - SET PGUSER=postgres + - SET PGPASSWORD=Password12! + - PATH=C:\Program Files\PostgreSQL\9.4\bin\;%PATH% + - createdb joomla_ut + - psql -d joomla_ut -a -f tests\unit\schema\postgresql.sql + +# Database setup for SQL Server + - ps: $sqlInstance = "(local)\SQL2014" + - ps: sqlcmd -b -E -S "$sqlInstance" -Q "CREATE DATABASE joomla_ut" + - ps: sqlcmd -S "$sqlInstance" -U "sa" -P "Password12!" -i $env:APPVEYOR_BUILD_FOLDER\tests\unit\schema\sqlsrv.sql + +test_script: + - cd C:\projects\joomla-cms + - libraries/vendor/bin/phpunit -c appveyor-phpunit.xml diff --git a/.drone.yml b/.drone.yml index 1c71301190..85f368db19 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,16 +1,28 @@ -build: - image: joomlaprojects/docker-systemtests:latest - commands: - - apt-get install nodejs npm - - ln -s /usr/bin/nodejs /usr/bin/node - - export DISPLAY=:0 - - Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 & - - sleep 3 - - fluxbox > /dev/null 2>&1 & - - cd tests/javascript - - npm install - - cd ../.. - - tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run +pipeline: clone: + image: plugins/git depth: 1 - path: repo + + phpcs: + image: joomlaprojects/docker-phpcs + commands: + - echo $(date) + - /root/.composer/vendor/bin/phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla . + - echo $(date) + + javascript: + image: joomlaprojects/docker-systemtests:latest + commands: + - echo $(date) + - apt-get install nodejs npm + - ln -s /usr/bin/nodejs /usr/bin/node + - export DISPLAY=:0 + - Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 & + - sleep 3 + - fluxbox > /dev/null 2>&1 & + - cd tests/javascript + - npm install + - cd ../.. + - tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run + - echo $(date) + diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0f0f125f38..0584c539b1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -21,4 +21,5 @@ There are other branches available which serve specific purposes. | ------ | ------- | | staging | Current codebase. Branch for the next minor Joomla version. New backward compatible features go into this branch. | | master | Each commit made to staging gets tested if it passes unit tests and codestyle rules. It is then merged into master. This is done automatically. | -| 4.0-dev | Branch for the next major Joomla version. New backward incompatible features go into this branch. Commits to staging will be applied to this branch as well. | +| 3.8.x | Branch for the next minor Joomla version. The 3.8.0 release will just include compatibility features for 4.0. Commits to staging will be applied to this branch as well. | +| 4.0-dev | Branch for the next major Joomla version. New features go into this branch. Commits to staging will be applied to this branch as well. | diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 79955c0bf0..f4fe8a2a74 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,6 +2,19 @@ Pull Request for Issue # . ### Summary of Changes + + ### Testing Instructions + + +### Expected result + + + +### Actual result + + + ### Documentation Changes Required + diff --git a/.gitignore b/.gitignore index 68298dc672..1dee6b465e 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,7 @@ Desktop.ini /libraries/vendor/ircmaxell/password-compat/phpunit.xml.dist /libraries/vendor/ircmaxell/password-compat/README.md /libraries/vendor/ircmaxell/password-compat/version-test.php +/libraries/vendor/joomla/*/.github /libraries/vendor/joomla/*/.gitignore /libraries/vendor/joomla/*/.gitmodules /libraries/vendor/joomla/*/docs @@ -70,6 +71,7 @@ Desktop.ini /libraries/vendor/joomla/*/composer.json /libraries/vendor/joomla/*/phpunit.xml.dist /libraries/vendor/joomla/*/README.md +/libraries/vendor/joomla/session/Joomla/Session/.github /libraries/vendor/joomla/session/Joomla/Session/_Tests /libraries/vendor/joomla/session/Joomla/Session/build /libraries/vendor/joomla/session/Joomla/Session/Tests diff --git a/.travis.yml b/.travis.yml index 439a9abfff..cae609887c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,4 +79,4 @@ script: branches: except: - - 2.5.x + - 2.5.x \ No newline at end of file diff --git a/README.md b/README.md index 7a4cfdc8b1..4c38126d69 100644 --- a/README.md +++ b/README.md @@ -201,4 +201,4 @@ Copyright * Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. * [Special Thanks](https://docs.joomla.org/Joomla!_Credits_and_Thanks) * Distributed under the GNU General Public License version 2 or later -* See [License details](https://docs.joomla.org/Joomla_Licenses) +* See [License details](https://docs.joomla.org/Joomla_Licenses) \ No newline at end of file diff --git a/README.txt b/README.txt index 163410ea24..aa2192e239 100644 --- a/README.txt +++ b/README.txt @@ -66,7 +66,7 @@ * Documentation for Web designers: https://docs.joomla.org/Web_designers Copyright: - * Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. + * Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved. * Special Thanks: https://docs.joomla.org/Joomla!_Credits_and_Thanks * Distributed under the GNU General Public License version 2 or later * See Licenses details at https://docs.joomla.org/Joomla_Licenses diff --git a/administrator/components/com_admin/admin.php b/administrator/components/com_admin/admin.php index 6e6070e94c..e4f61bfbb0 100644 --- a/administrator/components/com_admin/admin.php +++ b/administrator/components/com_admin/admin.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/admin.xml b/administrator/components/com_admin/admin.xml index 17e6b4c535..9cbd5f7140 100644 --- a/administrator/components/com_admin/admin.xml +++ b/administrator/components/com_admin/admin.xml @@ -3,7 +3,7 @@ com_admin Joomla! Project April 2006 - (C) 2005 - 2016 Open Source Matters. All rights reserved. + (C) 2005 - 2017 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_admin/controller.php b/administrator/components/com_admin/controller.php index c8f1fa7d86..8d95c42abe 100644 --- a/administrator/components/com_admin/controller.php +++ b/administrator/components/com_admin/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/controllers/profile.php b/administrator/components/com_admin/controllers/profile.php index b34ea7c252..0c7496f417 100644 --- a/administrator/components/com_admin/controllers/profile.php +++ b/administrator/components/com_admin/controllers/profile.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/helpers/html/directory.php b/administrator/components/com_admin/helpers/html/directory.php index a4c7cdb583..f0b7bb523a 100644 --- a/administrator/components/com_admin/helpers/html/directory.php +++ b/administrator/components/com_admin/helpers/html/directory.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/helpers/html/phpsetting.php b/administrator/components/com_admin/helpers/html/phpsetting.php index 77dbdbd93b..bf753492de 100644 --- a/administrator/components/com_admin/helpers/html/phpsetting.php +++ b/administrator/components/com_admin/helpers/html/phpsetting.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -63,11 +63,14 @@ public static function string($val) */ public static function integer($val) { - JLog::add( - 'JHtmlPhpSetting::integer() is deprecated. Use intval() or casting instead.', - JLog::WARNING, - 'deprecated' - ); + try + { + JLog::add(sprintf('%s() is deprecated. Use intval() or casting instead.', __METHOD__), JLog::WARNING, 'deprecated'); + } + catch (RuntimeException $exception) + { + // Informational log only + } return (int) $val; } diff --git a/administrator/components/com_admin/helpers/html/system.php b/administrator/components/com_admin/helpers/html/system.php index 448f38609e..6d8c3dc7fb 100644 --- a/administrator/components/com_admin/helpers/html/system.php +++ b/administrator/components/com_admin/helpers/html/system.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/models/forms/profile.xml b/administrator/components/com_admin/models/forms/profile.xml index 0f4ed654ea..ca772b2e25 100644 --- a/administrator/components/com_admin/models/forms/profile.xml +++ b/administrator/components/com_admin/models/forms/profile.xml @@ -53,7 +53,8 @@ label="COM_ADMIN_USER_FIELD_REGISTERDATE_LABEL" description="COM_ADMIN_USER_FIELD_REGISTERDATE_DESC" readonly="true" - format="%Y-%m-%d %H:%M:%S" + translateformat="true" + showtime="true" size="22" filter="user_utc" /> @@ -65,7 +66,8 @@ label="COM_ADMIN_USER_FIELD_LASTVISIT_LABEL" description="COM_ADMIN_USER_FIELD_LASTVISIT_DESC" readonly="true" - format="%Y-%m-%d %H:%M:%S" + translateformat="true" + showtime="true" size="22" filter="user_utc" /> diff --git a/administrator/components/com_admin/models/help.php b/administrator/components/com_admin/models/help.php index 1655c1ea03..9d08624249 100644 --- a/administrator/components/com_admin/models/help.php +++ b/administrator/components/com_admin/models/help.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/models/profile.php b/administrator/components/com_admin/models/profile.php index 779c279f61..9cc985eb23 100644 --- a/administrator/components/com_admin/models/profile.php +++ b/administrator/components/com_admin/models/profile.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/models/sysinfo.php b/administrator/components/com_admin/models/sysinfo.php index c17e2bc4d9..c8d8850f46 100644 --- a/administrator/components/com_admin/models/sysinfo.php +++ b/administrator/components/com_admin/models/sysinfo.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -313,7 +313,7 @@ public function &getInfo() 'sapi_name' => php_sapi_name(), 'version' => $version->getLongVersion(), 'platform' => $platform->getLongVersion(), - 'useragent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "", + 'useragent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '', ); return $this->info; @@ -445,7 +445,17 @@ public function getExtensions() } catch (Exception $e) { - JLog::add(JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()), JLog::WARNING, 'jerror'); + try + { + JLog::add(JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()), JLog::WARNING, 'jerror'); + } + catch (RuntimeException $exception) + { + JFactory::getApplication()->enqueueMessage( + JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()), + 'warning' + ); + } return $installed; } diff --git a/administrator/components/com_admin/postinstall/eaccelerator.php b/administrator/components/com_admin/postinstall/eaccelerator.php index f83ae6a280..9136998a23 100644 --- a/administrator/components/com_admin/postinstall/eaccelerator.php +++ b/administrator/components/com_admin/postinstall/eaccelerator.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for eAccelerator compatibility. diff --git a/administrator/components/com_admin/postinstall/htaccess.php b/administrator/components/com_admin/postinstall/htaccess.php index 7f6e3c213d..0ce7291f4d 100644 --- a/administrator/components/com_admin/postinstall/htaccess.php +++ b/administrator/components/com_admin/postinstall/htaccess.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for notifying users of a change diff --git a/administrator/components/com_admin/postinstall/joomla40checks.php b/administrator/components/com_admin/postinstall/joomla40checks.php index 9ddd31b98c..7f921fa362 100644 --- a/administrator/components/com_admin/postinstall/joomla40checks.php +++ b/administrator/components/com_admin/postinstall/joomla40checks.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for Joomla 4.0 pre checks @@ -38,13 +38,18 @@ function admin_postinstall_joomla40checks_condition() return true; } - if ($serverType == 'mysql' && version_compare($serverVersion, '5.5.3', 'lt')) { // MySQL minimum version is 5.5.3 return true; } + if ($db->name === 'mysql') + { + // Using deprecated MySQL driver + return true; + } + // PHP minimum version is 5.5 return version_compare(PHP_VERSION, '5.5.9', 'lt'); } diff --git a/administrator/components/com_admin/postinstall/languageaccess340.php b/administrator/components/com_admin/postinstall/languageaccess340.php index 3d483e9950..86186a95d3 100644 --- a/administrator/components/com_admin/postinstall/languageaccess340.php +++ b/administrator/components/com_admin/postinstall/languageaccess340.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for the checks if the installation is @@ -28,7 +28,7 @@ function admin_postinstall_languageaccess340_condition() $query = $db->getQuery(true) ->select($db->quoteName('access')) ->from($db->quoteName('#__languages')) - ->where($db->quoteName('access') . " = " . $db->quote('0')); + ->where($db->quoteName('access') . ' = ' . $db->quote('0')); $db->setQuery($query); $db->execute(); $numRows = $db->getNumRows(); diff --git a/administrator/components/com_admin/postinstall/phpversion.php b/administrator/components/com_admin/postinstall/phpversion.php index 5ace364fd8..7e1a4aec28 100644 --- a/administrator/components/com_admin/postinstall/phpversion.php +++ b/administrator/components/com_admin/postinstall/phpversion.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for the checking minimum PHP version support diff --git a/administrator/components/com_admin/postinstall/statscollection.php b/administrator/components/com_admin/postinstall/statscollection.php index d5aa1a0299..c6df9cc32d 100644 --- a/administrator/components/com_admin/postinstall/statscollection.php +++ b/administrator/components/com_admin/postinstall/statscollection.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for the checking minimum PHP version support diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 30931a3292..31ad2b36c5 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -16,10 +16,51 @@ */ class JoomlaInstallerScript { + /** + * The Joomla Version we are updating from + * + * @var string + * @since 3.7 + */ + protected $fromVersion = null; + + /** + * Function to act prior to installation process begins + * + * @param string $action Which action is happening (install|uninstall|discover_install|update) + * @param JInstaller $installer The class calling this method + * + * @return boolean True on success + * + * @since 3.7.0 + */ + public function preflight($action, $installer) + { + if ($action === 'update') + { + // Get the version we are updating from + if (!empty($installer->extension->manifest_cache)) + { + $manifestValues = json_decode($installer->extension->manifest_cache, true); + + if ((array_key_exists('version', $manifestValues))) + { + $this->fromVersion = $manifestValues['version']; + + return true; + } + } + + return false; + } + + return true; + } + /** * Method to update Joomla! * - * @param JInstallerAdapterFile $installer The class calling this method + * @param JInstaller $installer The class calling this method * * @return void */ @@ -29,14 +70,22 @@ public function update($installer) $options['text_file'] = 'joomla_update.php'; JLog::addLogger($options, JLog::INFO, array('Update', 'databasequery', 'jerror')); - JLog::add(JText::_('COM_JOOMLAUPDATE_UPDATE_LOG_DELETE_FILES'), JLog::INFO, 'Update'); + + try + { + JLog::add(JText::_('COM_JOOMLAUPDATE_UPDATE_LOG_DELETE_FILES'), JLog::INFO, 'Update'); + } + catch (RuntimeException $exception) + { + // Informational log only + } // This needs to stay for 2.5 update compatibility $this->deleteUnexistingFiles(); $this->updateManifestCaches(); $this->updateDatabase(); $this->clearRadCache(); - $this->updateAssets(); + $this->updateAssets($installer); $this->clearStatsCache(); $this->convertTablesToUtf8mb4(true); $this->cleanJoomlaCache(); @@ -46,6 +95,59 @@ public function update($installer) $this->flushSessions(); } + /** + * Called after any type of action + * + * @param string $action Which action is happening (install|uninstall|discover_install|update) + * @param JInstaller $installer The class calling this method + * + * @return boolean True on success + * + * @since 3.7.0 + */ + public function postflight($action, $installer) + { + if ($action === 'update') + { + if (!empty($this->fromVersion) && version_compare($this->fromVersion, '3.7.0', 'lt')) + { + /* + * Add a menu item for com_associations, we need to do that here because with a plain sql statement we + * damage the nested set structure for the menu table + */ + $newMenuItem = JTable::getInstance('Menu'); + + $data = array(); + $data['menutype'] = 'main'; + $data['title'] = 'com_associations'; + $data['alias'] = 'Multilingual Associations'; + $data['path'] = 'Multilingual Associations'; + $data['link'] = 'index.php?option=com_associations'; + $data['type'] = 'component'; + $data['published'] = 1; + $data['parent_id'] = 1; + + // We have used a SQL Statement to add the extension so using 34 is safe (fingers crossed) + $data['component_id'] = 34; + $data['img'] = 'class:associations'; + $data['language'] = '*'; + $data['client_id'] = 1; + + $newMenuItem->setLocation($data['parent_id'], 'last-child'); + + if (!$newMenuItem->save($data)) + { + // Install failed, roll back changes + $installer->abort(JText::sprintf('JLIB_INSTALLER_ABORT_COMP_INSTALL_ROLLBACK', $newMenuItem->getError())); + + return false; + } + } + } + + return true; + } + /** * Method to clear our stats plugin cache to ensure we get fresh data on Joomla Update * @@ -112,14 +214,13 @@ protected function clearStatsCache() */ protected function updateDatabase() { - $db = JFactory::getDbo(); - - if (strpos($db->name, 'mysql') !== false) + if (JFactory::getDbo()->getServerType() === 'mysql') { $this->updateDatabaseMysql(); } $this->uninstallEosPlugin(); + $this->removeJedUpdateserver(); } /** @@ -202,6 +303,49 @@ protected function uninstallEosPlugin() $installer->uninstall('plugin', $id); } + /** + * Remove the never used JED Updateserver + * + * @return void + * + * @since 3.7.0 + */ + protected function removeJedUpdateserver() + { + $db = JFactory::getDbo(); + + try + { + // Get the update site ID of the JED Update server + $id = $db->setQuery( + $db->getQuery(true) + ->select('update_site_id') + ->from($db->quoteName('#__update_sites')) + ->where($db->quoteName('location') . ' = ' . $db->quote('https://update.joomla.org/jed/list.xml')) + )->loadResult(); + + // Delete from update sites + $db->setQuery( + $db->getQuery(true) + ->delete($db->quoteName('#__update_sites')) + ->where($db->quoteName('update_site_id') . ' = ' . $id) + )->execute(); + + // Delete from update sites extensions + $db->setQuery( + $db->getQuery(true) + ->delete($db->quoteName('#__update_sites_extensions')) + ->where($db->quoteName('update_site_id') . ' = ' . $id) + )->execute(); + } + catch (Exception $e) + { + echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
'; + + return; + } + } + /** * Update the manifest caches * @@ -243,6 +387,7 @@ protected function updateManifestCaches() array('component', 'com_postinstall', '', 1), array('component', 'com_joomlaupdate', '', 1), array('component', 'com_fields', '', 1), + array('component', 'com_associations', '', 1), // Libraries array('library', 'phputf8', '', 0), @@ -351,7 +496,24 @@ protected function updateManifestCaches() array('plugin', 'menu', 'editors-xtd', 0), array('plugin', 'contact', 'editors-xtd', 0), array('plugin', 'fields', 'system', 0), + array('plugin', 'calendar', 'fields', 0), + array('plugin', 'checkboxes', 'fields', 0), + array('plugin', 'color', 'fields', 0), + array('plugin', 'editor', 'fields', 0), array('plugin', 'gallery', 'fields', 0), + array('plugin', 'imagelist', 'fields', 0), + array('plugin', 'integer', 'fields', 0), + array('plugin', 'list', 'fields', 0), + array('plugin', 'media', 'fields', 0), + array('plugin', 'radio', 'fields', 0), + array('plugin', 'sql', 'fields', 0), + array('plugin', 'text', 'fields', 0), + array('plugin', 'textarea', 'fields', 0), + array('plugin', 'url', 'fields', 0), + array('plugin', 'user', 'fields', 0), + array('plugin', 'usergrouplist', 'fields', 0), + array('plugin', 'fields', 'content', 0), + array('plugin', 'fields', 'editors-xtd', 0), // Templates array('template', 'beez3', '', 0), @@ -371,7 +533,7 @@ protected function updateManifestCaches() ); // Attempt to refresh manifest caches - $db = JFactory::getDbo(); + $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('*') ->from('#__extensions'); @@ -1176,6 +1338,11 @@ public function deleteUnexistingFiles() '/libraries/joomla/registry/format/json.php', '/libraries/joomla/registry/format/php.php', '/libraries/joomla/registry/format/xml.php', + '/libraries/joomla/github/users.php', + '/media/system/js/validate-jquery-uncompressed.js', + '/templates/beez3/html/message.php', + '/libraries/fof/platform/joomla.php', + '/libraries/fof/readme.txt', // Joomla 3.3.1 '/administrator/templates/isis/html/message.php', // Joomla 3.3.6 @@ -1502,7 +1669,7 @@ public function deleteUnexistingFiles() // Joomla! 3.6.3 '/media/editors/codemirror/mode/jade/jade.js', '/media/editors/codemirror/mode/jade/jade.min.js', - // Joomla __DEPLOY_VERSION__ + // Joomla 3.7.0 '/libraries/joomla/user/authentication.php', '/libraries/platform.php', '/libraries/joomla/data/data.php', @@ -1546,6 +1713,18 @@ public function deleteUnexistingFiles() '/components/com_users/views/remind/metadata.xml', '/components/com_users/views/reset/metadata.xml', '/components/com_wrapper/metadata.xml', + '/administrator/components/com_cache/layouts/joomla/searchtools/default/bar.php', + '/administrator/components/com_cache/layouts/joomla/searchtools/default.php', + '/administrator/components/com_languages/layouts/joomla/searchtools/default/bar.php', + '/administrator/components/com_languages/layouts/joomla/searchtools/default.php', + '/administrator/components/com_modules/layouts/joomla/searchtools/default/bar.php', + '/administrator/components/com_modules/layouts/joomla/searchtools/default.php', + '/administrator/components/com_templates/layouts/joomla/searchtools/default/bar.php', + '/administrator/components/com_templates/layouts/joomla/searchtools/default.php', + // Joomla 3.7.0 + '/administrator/modules/mod_menu/tmpl/default_enabled.php', + '/administrator/modules/mod_menu/tmpl/default_disabled.php', + '/administrator/templates/hathor/html/mod_menu/default_enabled.php', ); // TODO There is an issue while deleting folders using the ftp mode @@ -1655,8 +1834,24 @@ public function deleteUnexistingFiles() '/libraries/simplepie', // Joomla! 3.6.3 '/media/editors/codemirror/mode/jade', - // Joomla! __DEPLOY_VERSION__ + // Joomla! 3.7.0 '/libraries/joomla/data', + '/administrator/components/com_cache/layouts/joomla/searchtools/default', + '/administrator/components/com_cache/layouts/joomla/searchtools', + '/administrator/components/com_cache/layouts/joomla', + '/administrator/components/com_cache/layouts', + '/administrator/components/com_languages/layouts/joomla/searchtools/default', + '/administrator/components/com_languages/layouts/joomla/searchtools', + '/administrator/components/com_languages/layouts/joomla', + '/administrator/components/com_languages/layouts', + '/administrator/components/com_modules/layouts/joomla/searchtools/default', + '/administrator/components/com_modules/layouts/joomla/searchtools', + '/administrator/components/com_modules/layouts/joomla', + '/administrator/components/com_templates/layouts/joomla/searchtools/default', + '/administrator/components/com_templates/layouts/joomla/searchtools', + '/administrator/components/com_templates/layouts/joomla', + '/administrator/components/com_templates/layouts', + '/administrator/templates/hathor/html/mod_menu', ); jimport('joomla.filesystem.file'); @@ -1712,11 +1907,13 @@ protected function clearRadCache() /** * Method to create assets for newly installed components * + * @param JInstaller $installer The class calling this method + * * @return boolean * * @since 3.2 */ - public function updateAssets() + public function updateAssets($installer) { // List all components added since 1.6 $newComponents = array( @@ -1727,6 +1924,7 @@ public function updateAssets() 'com_ajax', 'com_postinstall', 'com_fields', + 'com_associations', ); foreach ($newComponents as $component) @@ -1739,16 +1937,16 @@ public function updateAssets() continue; } - $asset->name = $component; + $asset->name = $component; $asset->parent_id = 1; - $asset->rules = '{}'; - $asset->title = $component; + $asset->rules = '{}'; + $asset->title = $component; $asset->setLocation(1, 'last-child'); if (!$asset->store()) { // Install failed, roll back changes - $this->parent->abort(JText::sprintf('JLIB_INSTALLER_ABORT_COMP_INSTALL_ROLLBACK', $asset->stderr(true))); + $installer->abort(JText::sprintf('JLIB_INSTALLER_ABORT_COMP_INSTALL_ROLLBACK', $asset->stderr(true))); return false; } @@ -1792,12 +1990,10 @@ public function flushSessions() try { - switch ($db->name) + switch ($db->getServerType()) { // MySQL database, use TRUNCATE (faster, more resilient) - case 'pdomysql': case 'mysql': - case 'mysqli': $db->truncateTable('#__session'); break; @@ -1853,7 +2049,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false) // Check conversion status in database $db->setQuery('SELECT ' . $db->quoteName('converted') . ' FROM ' . $db->quoteName('#__utf8_conversion') - ); + ); try { @@ -1880,12 +2076,12 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false) } // Step 1: Drop indexes later to be added again with column lengths limitations at step 2 - $fileName1 = JPATH_ROOT . "/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql"; + $fileName1 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql'; if (is_file($fileName1)) { $fileContents1 = @file_get_contents($fileName1); - $queries1 = $db->splitSql($fileContents1); + $queries1 = $db->splitSql($fileContents1); if (!empty($queries1)) { @@ -1904,12 +2100,12 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false) } // Step 2: Perform the index modifications and conversions - $fileName2 = JPATH_ROOT . "/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql"; + $fileName2 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql'; if (is_file($fileName2)) { $fileContents2 = @file_get_contents($fileName2); - $queries2 = $db->splitSql($fileContents2); + $queries2 = $db->splitSql($fileContents2); if (!empty($queries2)) { diff --git a/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-21-1.sql b/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-21-1.sql index 933e10eea6..7c16154819 100644 --- a/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-21-1.sql +++ b/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-21-1.sql @@ -2,7 +2,7 @@ INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder` (27, 'com_finder', 'component', 'com_finder', '', 1, 1, 0, 0, '', '{"show_description":"1","description_length":255,"allow_empty_query":"0","show_url":"1","show_advanced":"1","expand_advanced":"0","show_date_filters":"0","highlight_terms":"1","opensearch_name":"","opensearch_description":"","batch_size":"50","memory_table_limit":30000,"title_multiplier":"1.7","text_multiplier":"0.7","meta_multiplier":"1.2","path_multiplier":"2.0","misc_multiplier":"0.3","stemmer":"porter_en"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), (439, 'plg_captcha_recaptcha', 'plugin', 'recaptcha', 'captcha', 0, 1, 1, 0, '{}', '{"public_key":"","private_key":"","theme":"clean"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), (440, 'plg_system_highlight', 'plugin', 'highlight', 'system', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 7, 0), -(441, 'plg_content_finder', 'plugin', 'finder', 'content', 0, 0, 1, 0, '{"legacy":false,"name":"plg_content_finder","type":"plugin","creationDate":"December 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_FINDER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(441, 'plg_content_finder', 'plugin', 'finder', 'content', 0, 0, 1, 0, '{"legacy":false,"name":"plg_content_finder","type":"plugin","creationDate":"December 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_FINDER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), (442, 'plg_finder_categories', 'plugin', 'categories', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0), (443, 'plg_finder_contacts', 'plugin', 'contacts', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0), (444, 'plg_finder_content', 'plugin', 'content', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 3, 0), diff --git a/administrator/components/com_admin/sql/updates/mysql/2.5.0-2012-01-10.sql b/administrator/components/com_admin/sql/updates/mysql/2.5.0-2012-01-10.sql index 2af2ae0637..c91221452a 100644 --- a/administrator/components/com_admin/sql/updates/mysql/2.5.0-2012-01-10.sql +++ b/administrator/components/com_admin/sql/updates/mysql/2.5.0-2012-01-10.sql @@ -1 +1 @@ -ALTER TABLE `#__updates` ADD COLUMN `infourl` text NOT NULL AFTER `detailsurl`; +ALTER TABLE `#__updates` ADD COLUMN `infourl` text NOT NULL AFTER `detailsurl`; diff --git a/administrator/components/com_admin/sql/updates/mysql/2.5.1-2012-01-26.sql b/administrator/components/com_admin/sql/updates/mysql/2.5.1-2012-01-26.sql index 4a7484a0dc..012462ebac 100644 --- a/administrator/components/com_admin/sql/updates/mysql/2.5.1-2012-01-26.sql +++ b/administrator/components/com_admin/sql/updates/mysql/2.5.1-2012-01-26.sql @@ -1,5 +1,5 @@ INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES -(314, 'mod_version', 'module', 'mod_version', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_version","type":"module","creationDate":"January 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"MOD_VERSION_XML_DESCRIPTION","group":""}', '{"format":"short","product":"1","cache":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0); +(314, 'mod_version', 'module', 'mod_version', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_version","type":"module","creationDate":"January 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"MOD_VERSION_XML_DESCRIPTION","group":""}', '{"format":"short","product":"1","cache":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0); INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES ('Joomla Version', '', '', 1, 'footer', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 'mod_version', 3, 1, '{"format":"short","product":"1","layout":"_:default","moduleclass_sfx":"","cache":"0"}', 1, '*'); diff --git a/administrator/components/com_admin/sql/updates/mysql/2.5.4-2012-03-18.sql b/administrator/components/com_admin/sql/updates/mysql/2.5.4-2012-03-18.sql index 578e3b4405..d94a5b5c19 100644 --- a/administrator/components/com_admin/sql/updates/mysql/2.5.4-2012-03-18.sql +++ b/administrator/components/com_admin/sql/updates/mysql/2.5.4-2012-03-18.sql @@ -1,5 +1,5 @@ INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES -(28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); +(28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); INSERT INTO `#__menu` (`menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `ordering`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES ('menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 41, 42, 0, '*', 1); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.0.0.sql b/administrator/components/com_admin/sql/updates/mysql/3.0.0.sql index 3c0deb57c8..9476cf457d 100644 --- a/administrator/components/com_admin/sql/updates/mysql/3.0.0.sql +++ b/administrator/components/com_admin/sql/updates/mysql/3.0.0.sql @@ -114,9 +114,9 @@ ALTER TABLE `#__finder_tokens_aggregate` ADD COLUMN `language` char(3) NOT NULL INSERT INTO `#__extensions` (`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES - ('isis', 'template', 'isis', '', 1, 1, 1, 0, '{"name":"isis","type":"template","creationDate":"3\\/30\\/2012","author":"Kyle Ledbetter","copyright":"Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"","version":"1.0","description":"TPL_ISIS_XML_DESCRIPTION","group":""}', '{"templateColor":"","logoFile":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0), - ('protostar', 'template', 'protostar', '', 0, 1, 1, 0, '{"name":"protostar","type":"template","creationDate":"4\\/30\\/2012","author":"Kyle Ledbetter","copyright":"Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"","version":"1.0","description":"TPL_PROTOSTAR_XML_DESCRIPTION","group":""}', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), - ('beez3', 'template', 'beez3', '', 0, 1, 1, 0, '{"legacy":false,"name":"beez3","type":"template","creationDate":"25 November 2009","author":"Angie Radtke","copyright":"Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.","authorEmail":"a.radtke@derauftritt.de","authorUrl":"http:\\/\\/www.der-auftritt.de","version":"1.6.0","description":"TPL_BEEZ3_XML_DESCRIPTION","group":""}', '{"wrapperSmall":"53","wrapperLarge":"72","sitetitle":"","sitedescription":"","navposition":"center","templatecolor":"nature"}', '', '', 0, '0000-00-00 00:00:00', 0, 0); + ('isis', 'template', 'isis', '', 1, 1, 1, 0, '{"name":"isis","type":"template","creationDate":"3\\/30\\/2012","author":"Kyle Ledbetter","copyright":"Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"","version":"1.0","description":"TPL_ISIS_XML_DESCRIPTION","group":""}', '{"templateColor":"","logoFile":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0), + ('protostar', 'template', 'protostar', '', 0, 1, 1, 0, '{"name":"protostar","type":"template","creationDate":"4\\/30\\/2012","author":"Kyle Ledbetter","copyright":"Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"","version":"1.0","description":"TPL_PROTOSTAR_XML_DESCRIPTION","group":""}', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), + ('beez3', 'template', 'beez3', '', 0, 1, 1, 0, '{"legacy":false,"name":"beez3","type":"template","creationDate":"25 November 2009","author":"Angie Radtke","copyright":"Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.","authorEmail":"a.radtke@derauftritt.de","authorUrl":"http:\\/\\/www.der-auftritt.de","version":"1.6.0","description":"TPL_BEEZ3_XML_DESCRIPTION","group":""}', '{"wrapperSmall":"53","wrapperLarge":"72","sitetitle":"","sitedescription":"","navposition":"center","templatecolor":"nature"}', '', '', 0, '0000-00-00 00:00:00', 0, 0); INSERT INTO `#__template_styles` (`template`, `client_id`, `home`, `title`, `params`) VALUES ('protostar', 0, '0', 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'), @@ -139,7 +139,7 @@ SET home = 0 WHERE template = 'bluestork'; INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES -(315, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '{"name":"mod_stats_admin","type":"module","creationDate":"September 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', '', '', 0, '0000-00-00 00:00:00', 0, 0); +(315, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '{"name":"mod_stats_admin","type":"module","creationDate":"September 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', '', '', 0, '0000-00-00 00:00:00', 0, 0); UPDATE `#__update_sites` SET location = 'http://update.joomla.org/language/translationlist_3.xml' diff --git a/administrator/components/com_admin/sql/updates/mysql/3.1.0.sql b/administrator/components/com_admin/sql/updates/mysql/3.1.0.sql index 01b93ec654..29ec9e2fe7 100644 --- a/administrator/components/com_admin/sql/updates/mysql/3.1.0.sql +++ b/administrator/components/com_admin/sql/updates/mysql/3.1.0.sql @@ -157,8 +157,8 @@ CREATE TABLE IF NOT EXISTS `#__ucm_content` ( INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES (29, 'com_tags', 'component', 'com_tags', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_tags","type":"component","creationDate":"March 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"COM_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), -(316, 'mod_tags_popular', 'module', 'mod_tags_popular', '', 0, 1, 1, 0, '{"name":"mod_tags_popular","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_POPULAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","timeframe":"alltime","owncache":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), -(317, 'mod_tags_similar', 'module', 'mod_tags_similar', '', 0, 1, 1, 0, '{"name":"mod_tags_similar","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_SIMILAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","matchtype":"any","owncache":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(316, 'mod_tags_popular', 'module', 'mod_tags_popular', '', 0, 1, 1, 0, '{"name":"mod_tags_popular","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_POPULAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","timeframe":"alltime","owncache":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(317, 'mod_tags_similar', 'module', 'mod_tags_similar', '', 0, 1, 1, 0, '{"name":"mod_tags_similar","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_SIMILAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","matchtype":"any","owncache":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), (447, 'plg_finder_tags', 'plugin', 'tags', 'finder', 0, 1, 1, 0, '{"name":"plg_finder_tags","type":"plugin","creationDate":"February 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_FINDER_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); INSERT INTO `#__menu` (`menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES diff --git a/administrator/components/com_admin/sql/updates/mysql/3.2.0.sql b/administrator/components/com_admin/sql/updates/mysql/3.2.0.sql index 20efac2137..02b067d2e9 100644 --- a/administrator/components/com_admin/sql/updates/mysql/3.2.0.sql +++ b/administrator/components/com_admin/sql/updates/mysql/3.2.0.sql @@ -24,7 +24,7 @@ INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder` (32, 'com_postinstall', 'component', 'com_postinstall', '', 1, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), (105, 'FOF', 'library', 'fof', '', 0, 1, 1, 1, '{"legacy":false,"name":"FOF","type":"library","creationDate":"2013-10-08","author":"Nicholas K. Dionysopoulos \/ Akeeba Ltd","copyright":"(C)2011-2013 Nicholas K. Dionysopoulos","authorEmail":"nicholas@akeebabackup.com","authorUrl":"https:\/\/www.akeebabackup.com","version":"2.1.rc4","description":"Framework-on-Framework (FOF) - A rapid component development framework for Joomla!","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), (448, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_totp","type":"plugin","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_TOTP_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), -(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '{"name":"plg_authentication_cookie","type":"plugin","creationDate":"July 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_AUTH_COOKIE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '{"name":"plg_authentication_cookie","type":"plugin","creationDate":"July 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_AUTH_COOKIE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), (450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_yubikey","type":"plugin","creationDate":"Se[ptember 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); INSERT INTO `#__menu` (`menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-08-29.sql index bbe6de6f98..21d3ed801f 100644 --- a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-08-29.sql @@ -2,14 +2,12 @@ CREATE TABLE IF NOT EXISTS `#__fields` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `asset_id` int(10) NOT NULL DEFAULT 0, `context` varchar(255) NOT NULL DEFAULT '', - `catid` int(10) NOT NULL DEFAULT 0, - `assigned_cat_ids` varchar(255) NOT NULL DEFAULT '', + `group_id` int(10) NOT NULL DEFAULT 0, `title` varchar(255) NOT NULL DEFAULT '', `alias` varchar(255) NOT NULL DEFAULT '', `label` varchar(255) NOT NULL DEFAULT '', `default_value` text NOT NULL DEFAULT '', `type` varchar(255) NOT NULL DEFAULT 'text', - `options` varchar(255) NOT NULL DEFAULT '', `note` varchar(255) NOT NULL DEFAULT '', `description` text NOT NULL, `state` tinyint(1) NOT NULL DEFAULT '0', @@ -19,15 +17,11 @@ CREATE TABLE IF NOT EXISTS `#__fields` ( `ordering` int(11) NOT NULL DEFAULT '0', `params` text NOT NULL, `fieldparams` text NOT NULL, - `attributes` text NOT NULL, `language` char(7) NOT NULL DEFAULT '', `created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `created_user_id` int(10) unsigned NOT NULL DEFAULT '0', - `created_by_alias` varchar(255) NOT NULL DEFAULT '', `modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(10) unsigned NOT NULL DEFAULT '0', - `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `access` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), KEY `idx_checkout` (`checked_out`), @@ -38,6 +32,38 @@ CREATE TABLE IF NOT EXISTS `#__fields` ( KEY `idx_language` (`language`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; +CREATE TABLE `#__fields_categories` ( + `field_id` int(11) NOT NULL DEFAULT 0, + `category_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`field_id`,`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `#__fields_groups` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `asset_id` int(10) NOT NULL DEFAULT 0, + `context` varchar(255) NOT NULL DEFAULT '', + `title` varchar(255) NOT NULL DEFAULT '', + `note` varchar(255) NOT NULL DEFAULT '', + `description` text NOT NULL, + `state` tinyint(1) NOT NULL DEFAULT '0', + `checked_out` int(11) NOT NULL DEFAULT '0', + `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `ordering` int(11) NOT NULL DEFAULT '0', + `language` char(7) NOT NULL DEFAULT '', + `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_by` int(10) unsigned NOT NULL DEFAULT '0', + `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified_by` int(10) unsigned NOT NULL DEFAULT '0', + `access` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_state` (`state`), + KEY `idx_created_by` (`created_by`), + KEY `idx_access` (`access`), + KEY `idx_context` (`context`), + KEY `idx_language` (`language`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + CREATE TABLE IF NOT EXISTS `#__fields_values` ( `field_id` int(10) unsigned NOT NULL, `context` varchar(255) NOT NULL, @@ -51,6 +77,20 @@ CREATE TABLE IF NOT EXISTS `#__fields_values` ( INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES (33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES -(461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); -INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES -(462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); +(461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(462, 'plg_fields_calendar', 'plugin', 'calendar', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(463, 'plg_fields_checkboxes', 'plugin', 'checkboxes', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(464, 'plg_fields_color', 'plugin', 'color', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(465, 'plg_fields_editor', 'plugin', 'editor', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(466, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(467, 'plg_fields_imagelist', 'plugin', 'imagelist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(468, 'plg_fields_integer', 'plugin', 'integer', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(469, 'plg_fields_list', 'plugin', 'list', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(470, 'plg_fields_media', 'plugin', 'media', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(471, 'plg_fields_radio', 'plugin', 'radio', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(472, 'plg_fields_sql', 'plugin', 'sql', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(473, 'plg_fields_text', 'plugin', 'text', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(474, 'plg_fields_textarea', 'plugin', 'textarea', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(475, 'plg_fields_url', 'plugin', 'url', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(476, 'plg_fields_user', 'plugin', 'user', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(477, 'plg_fields_usergrouplist', 'plugin', 'usergrouplist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-19.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-19.sql new file mode 100644 index 0000000000..4b2cabfb8b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-19.sql @@ -0,0 +1,3 @@ +ALTER TABLE `#__menu_types` ADD `client_id` int(11) NOT NULL DEFAULT 0; + +UPDATE `#__menu` SET `published` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu'; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-21.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-21.sql new file mode 100644 index 0000000000..e066845064 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-21.sql @@ -0,0 +1,2 @@ +-- Replace language image UNIQUE index for a normal INDEX. +ALTER TABLE `#__languages` DROP INDEX `idx_image`; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-24.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-24.sql new file mode 100644 index 0000000000..2b2a910130 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-24.sql @@ -0,0 +1,6 @@ +ALTER TABLE `#__extensions` ADD COLUMN `package_id` int(11) NOT NULL DEFAULT 0 COMMENT 'Parent package ID for extensions installed as a package.' AFTER `extension_id`; + +UPDATE `#__extensions` AS `e1` +INNER JOIN (SELECT `extension_id` FROM `#__extensions` WHERE `type` = 'package' AND `element` = 'pkg_en-GB') AS `e2` +SET `e1`.`package_id` = `e2`.`extension_id` +WHERE `e1`.`type`= 'language' AND `e1`.`element` = 'en-GB'; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-27.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-27.sql new file mode 100644 index 0000000000..f6874ee5a5 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-27.sql @@ -0,0 +1,2 @@ +-- Normalize modules content field with other db systems. Add default value. +ALTER TABLE `#__modules` MODIFY `content` text NOT NULL DEFAULT ''; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-08.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-08.sql new file mode 100644 index 0000000000..6836086861 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-08.sql @@ -0,0 +1,18 @@ +-- Normalize ucm_content_table default values. +ALTER TABLE `#__ucm_content` MODIFY `core_title` varchar(400) NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_body` mediumtext NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_checked_out_time` varchar(255) NOT NULL DEFAULT '0000-00-00 00:00:00'; +ALTER TABLE `#__ucm_content` MODIFY `core_params` text NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_metadata` varchar(2048) NOT NULL DEFAULT '' COMMENT 'JSON encoded metadata properties.'; +ALTER TABLE `#__ucm_content` MODIFY `core_language` char(7) NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'; +ALTER TABLE `#__ucm_content` MODIFY `core_publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'; +ALTER TABLE `#__ucm_content` MODIFY `core_content_item_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'ID from the individual type table'; +ALTER TABLE `#__ucm_content` MODIFY `asset_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.'; +ALTER TABLE `#__ucm_content` MODIFY `core_images` text NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_urls` text NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_metakey` text NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_metadesc` text NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_xreference` varchar(50) NOT NULL DEFAULT '' COMMENT 'A reference to enable linkages to external data sets.'; +ALTER TABLE `#__ucm_content` MODIFY `core_type_id` int(10) unsigned NOT NULL DEFAULT 0; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-09.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-09.sql new file mode 100644 index 0000000000..162635df1f --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-09.sql @@ -0,0 +1,8 @@ +-- Normalize categories table default values. +ALTER TABLE `#__categories` MODIFY `title` varchar(255) NOT NULL DEFAULT ''; +ALTER TABLE `#__categories` MODIFY `description` mediumtext NOT NULL DEFAULT ''; +ALTER TABLE `#__categories` MODIFY `params` text NOT NULL DEFAULT ''; +ALTER TABLE `#__categories` MODIFY `metadesc` varchar(1024) NOT NULL DEFAULT '' COMMENT 'The meta description for the page.'; +ALTER TABLE `#__categories` MODIFY `metakey` varchar(1024) NOT NULL DEFAULT '' COMMENT 'The meta keywords for the page.'; +ALTER TABLE `#__categories` MODIFY `metadata` varchar(2048) NOT NULL DEFAULT '' COMMENT 'JSON encoded metadata properties.'; +ALTER TABLE `#__categories` MODIFY `language` char(7) NOT NULL DEFAULT ''; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-15.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-15.sql new file mode 100644 index 0000000000..5b309f020f --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-15.sql @@ -0,0 +1,2 @@ +INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +(34, 'com_associations', 'component', 'com_associations', '', 1, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-17.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-17.sql new file mode 100644 index 0000000000..60627ac7c8 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-17.sql @@ -0,0 +1,2 @@ +-- Sync menutype for admin menu and set client_id correct +UPDATE `#__menu` SET `menutype` = 'main', `client_id` = 1 WHERE `menutype` = 'main' OR `menutype` = 'menu'; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-31.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-31.sql new file mode 100644 index 0000000000..547cf55690 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-31.sql @@ -0,0 +1,2 @@ +INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +(478, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-02-02.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-02-02.sql new file mode 100644 index 0000000000..26f4c12ab9 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-02-02.sql @@ -0,0 +1,2 @@ +INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +(479, 'plg_editors-xtd_fields', 'plugin', 'fields', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-02-17.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-02-17.sql new file mode 100644 index 0000000000..9ff8df9851 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-02-17.sql @@ -0,0 +1,8 @@ +-- Normalize contact_details table default values. +ALTER TABLE `#__contact_details` MODIFY `name` varchar(255) NOT NULL; +ALTER TABLE `#__contact_details` MODIFY `alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL; +ALTER TABLE `#__contact_details` MODIFY `sortname1` varchar(255) NOT NULL DEFAULT ''; +ALTER TABLE `#__contact_details` MODIFY `sortname2` varchar(255) NOT NULL DEFAULT ''; +ALTER TABLE `#__contact_details` MODIFY `sortname3` varchar(255) NOT NULL DEFAULT ''; +ALTER TABLE `#__contact_details` MODIFY `language` varchar(7) NOT NULL; +ALTER TABLE `#__contact_details` MODIFY `xreference` varchar(50) NOT NULL DEFAULT '' COMMENT 'A reference to enable linkages to external data sets.'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql b/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql index fe5c364e0a..7a7ec83dd5 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql @@ -184,9 +184,9 @@ CREATE INDEX "#__ucm_content_idx_core_type_id" ON "#__ucm_content" ("core_type_i -- INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES (29, 'com_tags', 'component', 'com_tags', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_tags","type":"component","creationDate":"March 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"COM_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(315, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '{"name":"mod_stats_admin","type":"module","creationDate":"September 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(316, 'mod_tags_popular', 'module', 'mod_tags_popular', '', 0, 1, 1, 0, '{"name":"mod_tags_popular","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_POPULAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","timeframe":"alltime","owncache":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(317, 'mod_tags_similar', 'module', 'mod_tags_similar', '', 0, 1, 1, 0, '{"name":"mod_tags_similar","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_SIMILAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","matchtype":"any","owncache":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(315, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '{"name":"mod_stats_admin","type":"module","creationDate":"September 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(316, 'mod_tags_popular', 'module', 'mod_tags_popular', '', 0, 1, 1, 0, '{"name":"mod_tags_popular","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_POPULAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","timeframe":"alltime","owncache":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(317, 'mod_tags_similar', 'module', 'mod_tags_similar', '', 0, 1, 1, 0, '{"name":"mod_tags_similar","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_SIMILAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","matchtype":"any","owncache":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), (447, 'plg_finder_tags', 'plugin', 'tags', 'finder', 0, 1, 1, 0, '{"name":"plg_finder_tags","type":"plugin","creationDate":"February 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_FINDER_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); -- diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.2.0.sql b/administrator/components/com_admin/sql/updates/postgresql/3.2.0.sql index 82047821df..b6020f0a3b 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.2.0.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.2.0.sql @@ -24,7 +24,7 @@ INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder" (32, 'com_postinstall', 'component', 'com_postinstall', '', 1, 1, 1, 1, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), (105, 'FOF', 'library', 'fof', '', 0, 1, 1, 1, '{"legacy":false,"name":"FOF","type":"library","creationDate":"2013-10-08","author":"Nicholas K. Dionysopoulos \/ Akeeba Ltd","copyright":"(C)2011-2013 Nicholas K. Dionysopoulos","authorEmail":"nicholas@akeebabackup.com","authorUrl":"https:\/\/www.akeebabackup.com","version":"2.1.rc4","description":"Framework-on-Framework (FOF) - A rapid component development framework for Joomla!","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), (448, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_totp","type":"plugin","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_TOTP_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '{"name":"plg_authentication_cookie","type":"plugin","creationDate":"July 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_AUTH_COOKIE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '{"name":"plg_authentication_cookie","type":"plugin","creationDate":"July 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_AUTH_COOKIE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), (450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_yubikey","type":"plugin","creationDate":"Se[ptember 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); INSERT INTO "#__menu" ("menutype", "title", "alias", "note", "path", "link", "type", "published", "parent_id", "level", "component_id", "checked_out", "checked_out_time", "browserNav", "access", "img", "template_style_id", "params", "lft", "rgt", "home", "language", "client_id") VALUES diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-08-29.sql index cc13bcb67b..2356b27ca1 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-08-29.sql @@ -5,14 +5,12 @@ CREATE TABLE "#__fields" ( "id" serial NOT NULL, "asset_id" bigint DEFAULT 0 NOT NULL, "context" varchar(255) DEFAULT '' NOT NULL, - "catid" bigint DEFAULT 0 NOT NULL, - "assigned_cat_ids" varchar(255) DEFAULT '' NOT NULL, + "group_id" bigint DEFAULT 0 NOT NULL, "title" varchar(255) DEFAULT '' NOT NULL, "alias" varchar(255) DEFAULT '' NOT NULL, "label" varchar(255) DEFAULT '' NOT NULL, "default_value" text DEFAULT '' NOT NULL, "type" varchar(255) DEFAULT 'text' NOT NULL, - "options" varchar(255) DEFAULT '' NOT NULL, "note" varchar(255) DEFAULT '' NOT NULL, "description" text DEFAULT '' NOT NULL, "state" smallint DEFAULT 0 NOT NULL, @@ -22,15 +20,11 @@ CREATE TABLE "#__fields" ( "ordering" bigint DEFAULT 0 NOT NULL, "params" text DEFAULT '' NOT NULL, "fieldparams" text DEFAULT '' NOT NULL, - "attributes" text DEFAULT '' NOT NULL, "language" varchar(7) DEFAULT '' NOT NULL, "created_time" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, "created_user_id" bigint DEFAULT 0 NOT NULL, - "created_by_alias" varchar(255) DEFAULT '' NOT NULL, "modified_time" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, "modified_by" bigint DEFAULT 0 NOT NULL, - "publish_up" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, - "publish_down" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, "access" bigint DEFAULT 0 NOT NULL, PRIMARY KEY ("id") ); @@ -41,6 +35,44 @@ CREATE INDEX "#__fields_idx_access" ON "#__fields" ("access"); CREATE INDEX "#__fields_idx_context" ON "#__fields" ("context"); CREATE INDEX "#__fields_idx_language" ON "#__fields" ("language"); +-- +-- Table: #__fields_categories +-- +CREATE TABLE "#__fields_categories" ( + "field_id" bigint DEFAULT 0 NOT NULL, + "category_id" bigint DEFAULT 0 NOT NULL, + PRIMARY KEY ("field_id", "category_id") +); + +-- +-- Table: #__fields_groups +-- +CREATE TABLE "#__fields_groups" ( + "id" serial NOT NULL, + "asset_id" bigint DEFAULT 0 NOT NULL, + "context" varchar(255) DEFAULT '' NOT NULL, + "title" varchar(255) DEFAULT '' NOT NULL, + "note" varchar(255) DEFAULT '' NOT NULL, + "description" text DEFAULT '' NOT NULL, + "state" smallint DEFAULT 0 NOT NULL, + "checked_out" integer DEFAULT 0 NOT NULL, + "checked_out_time" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, + "ordering" bigint DEFAULT 0 NOT NULL, + "language" varchar(7) DEFAULT '' NOT NULL, + "created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, + "created_by" bigint DEFAULT 0 NOT NULL, + "modified" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, + "modified_by" bigint DEFAULT 0 NOT NULL, + "access" bigint DEFAULT 0 NOT NULL, + PRIMARY KEY ("id") +); +CREATE INDEX "#__fields_idx_checked_out" ON "#__fields_groups" ("checked_out"); +CREATE INDEX "#__fields_idx_state" ON "#__fields_groups" ("state"); +CREATE INDEX "#__fields_idx_created_by" ON "#__fields_groups" ("created_by"); +CREATE INDEX "#__fields_idx_access" ON "#__fields_groups" ("access"); +CREATE INDEX "#__fields_idx_context" ON "#__fields_groups" ("context"); +CREATE INDEX "#__fields_idx_language" ON "#__fields_groups" ("language"); + -- -- Table: #__fields_values -- @@ -57,5 +89,20 @@ CREATE INDEX "#__fields_values_idx_item_id" ON "#__fields_values" ("item_id"); INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES (33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 1, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), (461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(462, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); +(462, 'plg_fields_calendar', 'plugin', 'calendar', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(463, 'plg_fields_checkboxes', 'plugin', 'checkboxes', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(464, 'plg_fields_color', 'plugin', 'color', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(465, 'plg_fields_editor', 'plugin', 'editor', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(466, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(467, 'plg_fields_imagelist', 'plugin', 'imagelist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(468, 'plg_fields_integer', 'plugin', 'integer', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(469, 'plg_fields_list', 'plugin', 'list', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(470, 'plg_fields_media', 'plugin', 'media', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(471, 'plg_fields_radio', 'plugin', 'radio', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(472, 'plg_fields_sql', 'plugin', 'sql', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(473, 'plg_fields_text', 'plugin', 'text', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(474, 'plg_fields_textarea', 'plugin', 'textarea', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(475, 'plg_fields_url', 'plugin', 'url', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(476, 'plg_fields_user', 'plugin', 'user', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(477, 'plg_fields_usergrouplist', 'plugin', 'usergrouplist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-10-02.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-10-02.sql index 96bb63d217..b50a60ae93 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-10-02.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-10-02.sql @@ -1,2 +1 @@ ALTER TABLE "#__session" ALTER COLUMN "client_id" DROP NOT NULL; -ALTER TABLE "#__session" ALTER COLUMN "client_id" SET DEFAULT NULL; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-19.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-19.sql new file mode 100644 index 0000000000..da2b368041 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-19.sql @@ -0,0 +1,3 @@ +ALTER TABLE "#__menu_types" ADD "client_id" int DEFAULT 0 NOT NULL; + +UPDATE "#__menu" SET "published" = 1 WHERE "menutype" = 'main' OR "menutype" = 'menu'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-21.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-21.sql new file mode 100644 index 0000000000..3fee4a355d --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-21.sql @@ -0,0 +1,2 @@ +-- Replace language image UNIQUE index for a normal INDEX. +ALTER TABLE "#__languages" DROP CONSTRAINT "#__idx_image"; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-24.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-24.sql new file mode 100644 index 0000000000..1670758b7a --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-24.sql @@ -0,0 +1,6 @@ +ALTER TABLE "#__extensions" ADD COLUMN "package_id" bigint DEFAULT 0 NOT NULL; + +UPDATE "#__extensions" +SET "package_id" = sub.extension_id +FROM (SELECT "extension_id" FROM "#__extensions" WHERE "type" = 'package' AND "element" = 'pkg_en-GB') AS sub +WHERE "type"= 'language' AND "element" = 'en-GB'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-08.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-08.sql new file mode 100644 index 0000000000..35cbc78a02 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-08.sql @@ -0,0 +1,9 @@ +-- Normalize ucm_content_table default values. +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_title" SET DEFAULT ''; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_body" SET DEFAULT ''; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_params" SET DEFAULT ''; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_metadata" SET DEFAULT ''; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_images" SET DEFAULT ''; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_urls" SET DEFAULT ''; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_metakey" SET DEFAULT ''; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_metadesc" SET DEFAULT ''; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-09.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-09.sql new file mode 100644 index 0000000000..8d4895fb4d --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-09.sql @@ -0,0 +1,6 @@ +-- Normalize categories table default values. +ALTER TABLE "#__categories" ALTER COLUMN "title" SET DEFAULT ''; +ALTER TABLE "#__categories" ALTER COLUMN "params" SET DEFAULT ''; +ALTER TABLE "#__categories" ALTER COLUMN "metadesc" SET DEFAULT ''; +ALTER TABLE "#__categories" ALTER COLUMN "metakey" SET DEFAULT ''; +ALTER TABLE "#__categories" ALTER COLUMN "metadata" SET DEFAULT ''; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-15.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-15.sql new file mode 100644 index 0000000000..f244b43bed --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-15.sql @@ -0,0 +1,2 @@ +INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES +(34, 'com_associations', 'component', 'com_associations', '', 1, 1, 1, 1, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-17.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-17.sql new file mode 100644 index 0000000000..4f13b23576 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-17.sql @@ -0,0 +1,3 @@ +-- Sync menutype for admin menu and set client_id correct +UPDATE "#__menu" SET "client_id" = 1 WHERE "menutype" = 'main' OR "menutype" = 'menu'; +UPDATE "#__menu" SET "menutype" = 'main' WHERE "menutype" = 'main' OR "menutype" = 'menu'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-31.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-31.sql new file mode 100644 index 0000000000..b26f4b6360 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-31.sql @@ -0,0 +1,2 @@ +INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES +(478, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-02-02.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-02-02.sql new file mode 100644 index 0000000000..6bd4558df4 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-02-02.sql @@ -0,0 +1,2 @@ +INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES +(479, 'plg_editors-xtd_fields', 'plugin', 'fields', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-02-17.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-02-17.sql new file mode 100644 index 0000000000..d3542a8193 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-02-17.sql @@ -0,0 +1,8 @@ +-- Normalize contact_details table default values. +ALTER TABLE "#__contact_details" ALTER COLUMN "name" DROP DEFAULT; +ALTER TABLE "#__contact_details" ALTER COLUMN "alias" DROP DEFAULT; +ALTER TABLE "#__contact_details" ALTER COLUMN "sortname1" SET DEFAULT ''; +ALTER TABLE "#__contact_details" ALTER COLUMN "sortname2" SET DEFAULT ''; +ALTER TABLE "#__contact_details" ALTER COLUMN "sortname3" SET DEFAULT ''; +ALTER TABLE "#__contact_details" ALTER COLUMN "language" DROP DEFAULT; +ALTER TABLE "#__contact_details" ALTER COLUMN "xreference" SET DEFAULT ''; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql b/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql index 9fc2f7d13f..f3f38ed99e 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql @@ -1,7 +1,7 @@ SET IDENTITY_INSERT [#__extensions] ON; INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) -SELECT 28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0; +SELECT 28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0; SET IDENTITY_INSERT [#__extensions] OFF; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.1.0.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.1.0.sql index c77c99fca4..81a8974758 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.1.0.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.1.0.sql @@ -318,7 +318,7 @@ CREATE NONCLUSTERED INDEX [idx_core_type_id] ON [#__ucm_content] SET IDENTITY_INSERT [#__extensions] ON; INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) -SELECT 29, 'com_tags', 'component', 'com_tags', '', 1, 1, 1, 1, '{"name":"com_joomlaupdate","type":"component","creationDate":"March 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"COM_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0; +SELECT 29, 'com_tags', 'component', 'com_tags', '', 1, 1, 1, 1, '{"name":"com_joomlaupdate","type":"component","creationDate":"March 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"COM_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0; SET IDENTITY_INSERT [#__extensions] OFF; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql new file mode 100644 index 0000000000..d94e1159f8 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-08-29.sql @@ -0,0 +1,149 @@ +/****** Object: Table [#__fields] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields] ( + [id] [int] IDENTITY(1,1) NOT NULL, + [asset_id] [int] NOT NULL DEFAULT 0, + [context] [nvarchar](255) NOT NULL DEFAULT '', + [group_id] [int] NOT NULL DEFAULT 0, + [title] [nvarchar](255) NOT NULL DEFAULT '', + [alias] [nvarchar](255) NOT NULL DEFAULT '', + [label] [nvarchar](255) NOT NULL DEFAULT '', + [default_value] [nvarchar](max) NOT NULL DEFAULT '', + [type] [nvarchar](255) NOT NULL DEFAULT '', + [note] [nvarchar](255) NOT NULL DEFAULT '', + [description] [nvarchar](max) NOT NULL DEFAULT '', + [state] [smallint] NOT NULL DEFAULT 0, + [required] [smallint] NOT NULL DEFAULT 0, + [checked_out] [bigint] NOT NULL DEFAULT 0, + [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', + [ordering] [int] NOT NULL DEFAULT 0, + [params] [nvarchar](max) NOT NULL DEFAULT '', + [fieldparams] [nvarchar](max) NOT NULL DEFAULT '', + [language] [nvarchar](7) NOT NULL DEFAULT '', + [created_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [created_user_id] [bigint] NOT NULL DEFAULT 0, + [modified_time] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [modified_by] [bigint] NOT NULL DEFAULT 0, + [access] [int] NOT NULL DEFAULT 1, +CONSTRAINT [PK_#__fields_id] PRIMARY KEY CLUSTERED( + [id] ASC) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON +) ON [PRIMARY]) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_checkout] ON [#__fields]( + [checked_out] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_state] ON [#__fields]( + [state] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields]( + [access] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields]( + [context] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields]( + [language] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +/****** Object: Table [#__fields_categories] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields_categories] ( + [field_id] [int] NOT NULL DEFAULT 0, + [category_id] [int] NOT NULL DEFAULT 0, +CONSTRAINT [PK_#__fields_categories_id] PRIMARY KEY CLUSTERED( + [field_id] ASC, + [category_id] ASC) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON +) ON [PRIMARY]) ON [PRIMARY]; + +/****** Object: Table [#__fields_groups] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields_groups] ( + [id] [int] IDENTITY(1,1) NOT NULL, + [asset_id] [int] NOT NULL DEFAULT 0, + [context] [nvarchar](255) NOT NULL DEFAULT '', + [title] [nvarchar](255) NOT NULL DEFAULT '', + [note] [nvarchar](255) NOT NULL DEFAULT '', + [description] [nvarchar](max) NOT NULL DEFAULT '', + [state] [smallint] NOT NULL DEFAULT 0, + [checked_out] [bigint] NOT NULL DEFAULT 0, + [checked_out_time] [datetime] NOT NULL DEFAULT '1900-01-01 00:00:00', + [ordering] [int] NOT NULL DEFAULT 0, + [language] [nvarchar](7) NOT NULL DEFAULT '', + [created] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [created_by] [bigint] NOT NULL DEFAULT 0, + [modified] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [modified_by] [bigint] NOT NULL DEFAULT 0, + [access] [int] NOT NULL DEFAULT 1, +CONSTRAINT [PK_#__fields_groups_id] PRIMARY KEY CLUSTERED( + [id] ASC) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON + ) ON [PRIMARY]) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_checkout] ON [#__fields_groups]( + [checked_out] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_state] ON [#__fields_groups]( + [state] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_created_by] ON [#__fields_groups]( + [created_by] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_access] ON [#__fields_groups]( + [access] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields_groups]( + [context] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_language] ON [#__fields_groups]( + [language] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +/****** Object: Table [#__fields_values] ******/ + +SET QUOTED_IDENTIFIER ON; + +CREATE TABLE [#__fields_values] ( + [field_id] [bigint] NOT NULL DEFAULT 1, + [context] [nvarchar](255) NOT NULL DEFAULT '', + [item_id] [nvarchar](255) NOT NULL DEFAULT '', + [value] [nvarchar](max) NOT NULL DEFAULT '', +) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_field_id] ON [#__fields_values]( + [field_id] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_context] ON [#__fields_values]( + [context] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_item_id] ON [#__fields_values]( + [item_id] ASC) +WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +SET IDENTITY_INSERT [#__extensions] ON; + +INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) +SELECT 33, 'com_fields', 'component', 'com_fields', '', 1, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 461, 'plg_system_fields', 'plugin', 'fields', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 + + +SET IDENTITY_INSERT [#__extensions] OFF; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-11-19.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-11-19.sql new file mode 100644 index 0000000000..01bd65750a --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-11-19.sql @@ -0,0 +1,3 @@ +ALTER TABLE [#__menu_types] ADD [client_id] [tinyint] NOT NULL DEFAULT 0; + +UPDATE [#__menu] SET [published] = 1 WHERE [menutype] = 'main' OR [menutype] = 'menu'; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-11-21.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-11-21.sql new file mode 100644 index 0000000000..0bbc06c97d --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-11-21.sql @@ -0,0 +1,2 @@ +-- Replace language image UNIQUE index for a normal INDEX. +ALTER TABLE [#__languages] DROP CONSTRAINT [#__languages$idx_image]; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-11-24.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-11-24.sql new file mode 100644 index 0000000000..68d6dc8b54 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-11-24.sql @@ -0,0 +1,5 @@ +ALTER TABLE [#__extensions] ADD [package_id] [bigint] NOT NULL DEFAULT 0; + +UPDATE [#__extensions] +SET [package_id] = (SELECT [extension_id] FROM [#__extensions] WHERE [type] = 'package' AND [element] = 'pkg_en-GB') +WHERE [type]= 'language' AND [element] = 'en-GB'; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-08.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-08.sql new file mode 100644 index 0000000000..eea0879e80 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-08.sql @@ -0,0 +1,14 @@ +-- Normalize ucm_content_table default values. +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_type_alias] [nvarchar](255) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_body] [nvarchar](max) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_params] [nvarchar](max) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_metadata] [nvarchar](2048) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_language] [nvarchar](7) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_content_item_id] [bigint] NOT NULL DEFAULT 0; +ALTER TABLE [#__ucm_content] ALTER COLUMN [asset_id] [bigint] NOT NULL DEFAULT 0; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_images] [nvarchar](max) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_urls] [nvarchar](max) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_metakey] [nvarchar](max) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_metadesc] [nvarchar](max) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_xreference] [nvarchar](50) NOT NULL DEFAULT ''; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_type_id] [bigint] NOT NULL DEFAULT 0; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-09.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-09.sql new file mode 100644 index 0000000000..f4ab4d77f5 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-09.sql @@ -0,0 +1,8 @@ +-- Normalize categories table default values. +ALTER TABLE [#__categories] ALTER COLUMN [title] [nvarchar](255) NOT NULL DEFAULT ''; +ALTER TABLE [#__categories] ALTER COLUMN [description] [nvarchar](max) NOT NULL DEFAULT ''; +ALTER TABLE [#__categories] ALTER COLUMN [params] [nvarchar](max) NOT NULL DEFAULT ''; +ALTER TABLE [#__categories] ALTER COLUMN [metadesc] [nvarchar](1024) NOT NULL DEFAULT ''; +ALTER TABLE [#__categories] ALTER COLUMN [metakey] [nvarchar](1024) NOT NULL DEFAULT ''; +ALTER TABLE [#__categories] ALTER COLUMN [metadata] [nvarchar](2048) NOT NULL DEFAULT ''; +ALTER TABLE [#__categories] ALTER COLUMN [language] [nvarchar](7) NOT NULL DEFAULT ''; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-15.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-15.sql new file mode 100644 index 0000000000..321dd4b074 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-15.sql @@ -0,0 +1,2 @@ +INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) VALUES +(34, 'com_associations', 'component', 'com_associations', '', 1, 1, 1, 1, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-17.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-17.sql new file mode 100644 index 0000000000..994fe473cb --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-17.sql @@ -0,0 +1,36 @@ +-- Sync menutype for admin menu and set client_id correct +UPDATE [#__menu] SET [client_id] = 1 WHERE [menutype] = 'main' OR [menutype] = 'menu'; +UPDATE [#__menu] SET [menutype] = 'main' WHERE [menutype] = 'main' OR [menutype] = 'menu'; + +INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) VALUES +SELECT 462, 'plg_fields_calendar', 'plugin', 'calendar', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 463, 'plg_fields_checkboxes', 'plugin', 'checkboxes', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 464, 'plg_fields_color', 'plugin', 'color', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 465, 'plg_fields_editor', 'plugin', 'editor', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 466, 'plg_fields_gallery', 'plugin', 'gallery', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 467, 'plg_fields_imagelist', 'plugin', 'imagelist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 468, 'plg_fields_integer', 'plugin', 'integer', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 469, 'plg_fields_list', 'plugin', 'list', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 470, 'plg_fields_media', 'plugin', 'media', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 471, 'plg_fields_radio', 'plugin', 'radio', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 472, 'plg_fields_sql', 'plugin', 'sql', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 473, 'plg_fields_text', 'plugin', 'text', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 474, 'plg_fields_textarea', 'plugin', 'textarea', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 475, 'plg_fields_url', 'plugin', 'url', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 476, 'plg_fields_user', 'plugin', 'user', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 477, 'plg_fields_usergrouplist', 'plugin', 'usergrouplist', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-31.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-31.sql new file mode 100644 index 0000000000..0018b983e3 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-31.sql @@ -0,0 +1,6 @@ +SET IDENTITY_INSERT #__extensions ON; + +INSERT INTO #__extensions ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) +SELECT 478, 'plg_content_fields', 'plugin', 'fields', 'content', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; + +SET IDENTITY_INSERT #__extensions OFF; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-02-02.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-02-02.sql new file mode 100644 index 0000000000..8e8a55d570 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-02-02.sql @@ -0,0 +1,6 @@ +SET IDENTITY_INSERT #__extensions ON; + +INSERT INTO #__extensions ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) +SELECT 479, 'plg_editors-xtd_fields', 'plugin', 'fields', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; + +SET IDENTITY_INSERT #__extensions OFF; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-02-16.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-02-16.sql new file mode 100644 index 0000000000..2f49b7268f --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-02-16.sql @@ -0,0 +1,329 @@ +-- Replace datetime to datetime2(0) type for all columns. +DROP INDEX [idx_track_date] ON [#__banner_tracks]; +ALTER TABLE [#__banner_tracks] DROP CONSTRAINT [PK_#__banner_tracks_track_date]; +ALTER TABLE [#__banner_tracks] ALTER COLUMN [track_date] [datetime2](0) NOT NULL; +ALTER TABLE [#__banner_tracks] ADD CONSTRAINT [PK_#__banner_tracks_track_date_type_id] PRIMARY KEY CLUSTERED +( + [track_date] ASC, + [track_type] ASC, + [banner_id] ASC +) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]; +CREATE NONCLUSTERED INDEX [idx_track_date2] ON [#__banner_tracks] +( + [track_date] ASC +) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE PROCEDURE "#removeDefault" +( + @table NVARCHAR(100), + @column NVARCHAR(100) +) +AS +BEGIN + DECLARE @constraintName AS nvarchar(100) + DECLARE @constraintQuery AS nvarchar(1000) + SELECT @constraintName = name FROM sys.default_constraints + WHERE parent_object_id = object_id(@table) + AND parent_column_id = columnproperty(object_id(@table), @column, 'ColumnId') + SET @constraintQuery = 'ALTER TABLE [' + @table + '] DROP CONSTRAINT [' + @constraintName + ']' + EXECUTE sp_executesql @constraintQuery +END; + +EXECUTE "#removeDefault" "#__banner_clients", 'checked_out_time'; +ALTER TABLE [#__banner_clients] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__banner_clients] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__banners", 'checked_out_time'; +ALTER TABLE [#__banners] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__banners] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__banners", 'publish_up'; +ALTER TABLE [#__banners] ALTER COLUMN [publish_up] [datetime2](0) NOT NULL; +ALTER TABLE [#__banners] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_up]; + +EXECUTE "#removeDefault" "#__banners", 'publish_down'; +ALTER TABLE [#__banners] ALTER COLUMN [publish_down] [datetime2](0) NOT NULL; +ALTER TABLE [#__banners] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_down]; + +EXECUTE "#removeDefault" "#__banners", 'reset'; +ALTER TABLE [#__banners] ALTER COLUMN [reset] [datetime2](0) NOT NULL; +ALTER TABLE [#__banners] ADD DEFAULT '1900-01-01 00:00:00' FOR [reset]; + +EXECUTE "#removeDefault" "#__banners", 'created'; +ALTER TABLE [#__banners] ALTER COLUMN [created] [datetime2](0) NOT NULL; +ALTER TABLE [#__banners] ADD DEFAULT '1900-01-01 00:00:00' FOR [created]; + +EXECUTE "#removeDefault" "#__banners", 'modified'; +ALTER TABLE [#__banners] ALTER COLUMN [modified] [datetime2](0) NOT NULL; +ALTER TABLE [#__banners] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified]; + +DROP INDEX [idx_checked_out_time] ON [#__categories]; +EXECUTE "#removeDefault" "#__categories", 'checked_out_time'; +ALTER TABLE [#__categories] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__categories] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; +CREATE NONCLUSTERED INDEX [idx_checked_out_time2] ON [#__categories]( + [checked_out_time] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +EXECUTE "#removeDefault" "#__categories", 'created_time'; +ALTER TABLE [#__categories] ALTER COLUMN [created_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__categories] ADD DEFAULT '1900-01-01 00:00:00' FOR [created_time]; + +EXECUTE "#removeDefault" "#__categories", 'modified_time'; +ALTER TABLE [#__categories] ALTER COLUMN [modified_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__categories] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified_time]; + +EXECUTE "#removeDefault" "#__contact_details", 'checked_out_time'; +ALTER TABLE [#__contact_details] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__contact_details] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__contact_details", 'created'; +ALTER TABLE [#__contact_details] ALTER COLUMN [created] [datetime2](0) NOT NULL; +ALTER TABLE [#__contact_details] ADD DEFAULT '1900-01-01 00:00:00' FOR [created]; + +EXECUTE "#removeDefault" "#__contact_details", 'modified'; +ALTER TABLE [#__contact_details] ALTER COLUMN [modified] [datetime2](0) NOT NULL; +ALTER TABLE [#__contact_details] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified]; + +EXECUTE "#removeDefault" "#__contact_details", 'publish_up'; +ALTER TABLE [#__contact_details] ALTER COLUMN [publish_up] [datetime2](0) NOT NULL; +ALTER TABLE [#__contact_details] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_up]; + +EXECUTE "#removeDefault" "#__contact_details", 'publish_down'; +ALTER TABLE [#__contact_details] ALTER COLUMN [publish_down] [datetime2](0) NOT NULL; +ALTER TABLE [#__contact_details] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_down]; + +EXECUTE "#removeDefault" "#__content", 'created'; +ALTER TABLE [#__content] ALTER COLUMN [created] [datetime2](0) NOT NULL; +ALTER TABLE [#__content] ADD DEFAULT '1900-01-01 00:00:00' FOR [created]; + +EXECUTE "#removeDefault" "#__content", 'modified'; +ALTER TABLE [#__content] ALTER COLUMN [modified] [datetime2](0) NOT NULL; +ALTER TABLE [#__content] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified]; + +EXECUTE "#removeDefault" "#__content", 'checked_out_time'; +ALTER TABLE [#__content] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__content] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__content", 'publish_up'; +ALTER TABLE [#__content] ALTER COLUMN [publish_up] [datetime2](0) NOT NULL; +ALTER TABLE [#__content] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_up]; + +EXECUTE "#removeDefault" "#__content", 'publish_down'; +ALTER TABLE [#__content] ALTER COLUMN [publish_down] [datetime2](0) NOT NULL; +ALTER TABLE [#__content] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_down]; + +DROP INDEX [idx_date_id] ON [#__contentitem_tag_map]; +EXECUTE "#removeDefault" "#__contentitem_tag_map", 'tag_date'; +ALTER TABLE [#__contentitem_tag_map] ALTER COLUMN [tag_date] [datetime2](0) NOT NULL; +ALTER TABLE [#__contentitem_tag_map] ADD DEFAULT '1900-01-01 00:00:00' FOR [tag_date]; +CREATE NONCLUSTERED INDEX [idx_date_id2] ON [#__contentitem_tag_map]( + [tag_date] ASC, + [tag_id] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +EXECUTE "#removeDefault" "#__extensions", 'checked_out_time'; +ALTER TABLE [#__extensions] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__extensions] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__fields", 'checked_out_time'; +ALTER TABLE [#__fields] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__fields] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__fields", 'created_time'; +ALTER TABLE [#__fields] ALTER COLUMN [created_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__fields] ADD DEFAULT '1900-01-01 00:00:00' FOR [created_time]; + +EXECUTE "#removeDefault" "#__fields", 'modified_time'; +ALTER TABLE [#__fields] ALTER COLUMN [modified_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__fields] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified_time]; + +EXECUTE "#removeDefault" "#__fields_groups", 'checked_out_time'; +ALTER TABLE [#__fields_groups] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__fields_groups] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__fields_groups", 'created'; +ALTER TABLE [#__fields_groups] ALTER COLUMN [created] [datetime2](0) NOT NULL; +ALTER TABLE [#__fields_groups] ADD DEFAULT '1900-01-01 00:00:00' FOR [created]; + +EXECUTE "#removeDefault" "#__fields_groups", 'modified'; +ALTER TABLE [#__fields_groups] ALTER COLUMN [modified] [datetime2](0) NOT NULL; +ALTER TABLE [#__fields_groups] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified]; + +EXECUTE "#removeDefault" "#__finder_filters", 'created'; +ALTER TABLE [#__finder_filters] ALTER COLUMN [created] [datetime2](0) NOT NULL; +ALTER TABLE [#__finder_filters] ADD DEFAULT '1900-01-01 00:00:00' FOR [created]; + +EXECUTE "#removeDefault" "#__finder_filters", 'modified'; +ALTER TABLE [#__finder_filters] ALTER COLUMN [modified] [datetime2](0) NOT NULL; +ALTER TABLE [#__finder_filters] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified]; + +EXECUTE "#removeDefault" "#__finder_filters", 'checked_out_time'; +ALTER TABLE [#__finder_filters] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__finder_filters] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__finder_links", 'indexdate'; +ALTER TABLE [#__finder_links] ALTER COLUMN [indexdate] [datetime2](0) NOT NULL; +ALTER TABLE [#__finder_links] ADD DEFAULT '1900-01-01 00:00:00' FOR [indexdate]; + +EXECUTE "#removeDefault" "#__finder_links", 'publish_start_date'; +ALTER TABLE [#__finder_links] ALTER COLUMN [publish_start_date] [datetime2](0) NOT NULL; +ALTER TABLE [#__finder_links] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_start_date]; + +EXECUTE "#removeDefault" "#__finder_links", 'publish_end_date'; +ALTER TABLE [#__finder_links] ALTER COLUMN [publish_end_date] [datetime2](0) NOT NULL; +ALTER TABLE [#__finder_links] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_end_date]; + +EXECUTE "#removeDefault" "#__finder_links", 'start_date'; +ALTER TABLE [#__finder_links] ALTER COLUMN [start_date] [datetime2](0) NOT NULL; +ALTER TABLE [#__finder_links] ADD DEFAULT '1900-01-01 00:00:00' FOR [start_date]; + +EXECUTE "#removeDefault" "#__finder_links", 'end_date'; +ALTER TABLE [#__finder_links] ALTER COLUMN [end_date] [datetime2](0) NOT NULL; +ALTER TABLE [#__finder_links] ADD DEFAULT '1900-01-01 00:00:00' FOR [end_date]; + +EXECUTE "#removeDefault" "#__menu", 'checked_out_time'; +ALTER TABLE [#__menu] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__menu] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__messages", 'date_time'; +ALTER TABLE [#__messages] ALTER COLUMN [date_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__messages] ADD DEFAULT '1900-01-01 00:00:00' FOR [date_time]; + +EXECUTE "#removeDefault" "#__modules", 'checked_out_time'; +ALTER TABLE [#__modules] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__modules] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__modules", 'publish_up'; +ALTER TABLE [#__modules] ALTER COLUMN [publish_up] [datetime2](0) NOT NULL; +ALTER TABLE [#__modules] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_up]; + +EXECUTE "#removeDefault" "#__modules", 'publish_down'; +ALTER TABLE [#__modules] ALTER COLUMN [publish_down] [datetime2](0) NOT NULL; +ALTER TABLE [#__modules] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_down]; + +EXECUTE "#removeDefault" "#__newsfeeds", 'checked_out_time'; +ALTER TABLE [#__newsfeeds] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__newsfeeds] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__newsfeeds", 'created'; +ALTER TABLE [#__newsfeeds] ALTER COLUMN [created] [datetime2](0) NOT NULL; +ALTER TABLE [#__newsfeeds] ADD DEFAULT '1900-01-01 00:00:00' FOR [created]; + +EXECUTE "#removeDefault" "#__newsfeeds", 'modified'; +ALTER TABLE [#__newsfeeds] ALTER COLUMN [modified] [datetime2](0) NOT NULL; +ALTER TABLE [#__newsfeeds] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified]; + +EXECUTE "#removeDefault" "#__newsfeeds", 'publish_up'; +ALTER TABLE [#__newsfeeds] ALTER COLUMN [publish_up] [datetime2](0) NOT NULL; +ALTER TABLE [#__newsfeeds] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_up]; + +EXECUTE "#removeDefault" "#__newsfeeds", 'publish_down'; +ALTER TABLE [#__newsfeeds] ALTER COLUMN [publish_down] [datetime2](0) NOT NULL; +ALTER TABLE [#__newsfeeds] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_down]; + +EXECUTE "#removeDefault" "#__redirect_links", 'created_date'; +ALTER TABLE [#__redirect_links] ALTER COLUMN [created_date] [datetime2](0) NOT NULL; +ALTER TABLE [#__redirect_links] ADD DEFAULT '1900-01-01 00:00:00' FOR [created_date]; + +DROP INDEX [idx_link_modifed] ON [#__redirect_links]; +EXECUTE "#removeDefault" "#__redirect_links", 'modified_date'; +ALTER TABLE [#__redirect_links] ALTER COLUMN [modified_date] [datetime2](0) NOT NULL; +ALTER TABLE [#__redirect_links] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified_date]; +CREATE NONCLUSTERED INDEX [idx_link_modifed2] ON [#__redirect_links]( + [modified_date] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +EXECUTE "#removeDefault" "#__tags", 'checked_out_time'; +ALTER TABLE [#__tags] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__tags] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__tags", 'created_time'; +ALTER TABLE [#__tags] ALTER COLUMN [created_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__tags] ADD DEFAULT '1900-01-01 00:00:00' FOR [created_time]; + +EXECUTE "#removeDefault" "#__tags", 'modified_time'; +ALTER TABLE [#__tags] ALTER COLUMN [modified_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__tags] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified_time]; + +EXECUTE "#removeDefault" "#__tags", 'publish_up'; +ALTER TABLE [#__tags] ALTER COLUMN [publish_up] [datetime2](0) NOT NULL; +ALTER TABLE [#__tags] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_up]; + +EXECUTE "#removeDefault" "#__tags", 'publish_down'; +ALTER TABLE [#__tags] ALTER COLUMN [publish_down] [datetime2](0) NOT NULL; +ALTER TABLE [#__tags] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_down]; + +EXECUTE "#removeDefault" "#__ucm_content", 'core_checked_out_time'; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__ucm_content] ADD DEFAULT '1900-01-01 00:00:00' FOR [core_checked_out_time]; + +DROP INDEX [idx_created_time] ON [#__ucm_content]; +EXECUTE "#removeDefault" "#__ucm_content", 'core_created_time'; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_created_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__ucm_content] ADD DEFAULT '1900-01-01 00:00:00' FOR [core_created_time]; +CREATE NONCLUSTERED INDEX [idx_created_time2] ON [#__ucm_content]( + [core_created_time] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +DROP INDEX [idx_modified_time] ON [#__ucm_content]; +EXECUTE "#removeDefault" "#__ucm_content", 'core_modified_time'; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_modified_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__ucm_content] ADD DEFAULT '1900-01-01 00:00:00' FOR [core_modified_time]; +CREATE NONCLUSTERED INDEX [idx_modified_time2] ON [#__ucm_content]( + [core_modified_time] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +EXECUTE "#removeDefault" "#__ucm_content", 'core_publish_up'; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_publish_up] [datetime2](0) NOT NULL; +ALTER TABLE [#__ucm_content] ADD DEFAULT '1900-01-01 00:00:00' FOR [core_publish_up]; + +EXECUTE "#removeDefault" "#__ucm_content", 'core_publish_down'; +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_publish_down] [datetime2](0) NOT NULL; +ALTER TABLE [#__ucm_content] ADD DEFAULT '1900-01-01 00:00:00' FOR [core_publish_down]; + +DROP INDEX [idx_save_date] ON [#__ucm_history]; +EXECUTE "#removeDefault" "#__ucm_history", 'save_date'; +ALTER TABLE [#__ucm_history] ALTER COLUMN [save_date] [datetime2](0) NOT NULL; +ALTER TABLE [#__ucm_history] ADD DEFAULT '1900-01-01 00:00:00' FOR [save_date]; +CREATE NONCLUSTERED INDEX [idx_save_date2] ON [#__ucm_history]( + [save_date] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +EXECUTE "#removeDefault" "#__user_notes", 'checked_out_time'; +ALTER TABLE [#__user_notes] ALTER COLUMN [checked_out_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__user_notes] ADD DEFAULT '1900-01-01 00:00:00' FOR [checked_out_time]; + +EXECUTE "#removeDefault" "#__user_notes", 'created_time'; +ALTER TABLE [#__user_notes] ALTER COLUMN [created_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__user_notes] ADD DEFAULT '1900-01-01 00:00:00' FOR [created_time]; + +EXECUTE "#removeDefault" "#__user_notes", 'modified_time'; +ALTER TABLE [#__user_notes] ALTER COLUMN [modified_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__user_notes] ADD DEFAULT '1900-01-01 00:00:00' FOR [modified_time]; + +EXECUTE "#removeDefault" "#__user_notes", 'review_time'; +ALTER TABLE [#__user_notes] ALTER COLUMN [review_time] [datetime2](0) NOT NULL; +ALTER TABLE [#__user_notes] ADD DEFAULT '1900-01-01 00:00:00' FOR [review_time]; + +EXECUTE "#removeDefault" "#__user_notes", 'publish_up'; +ALTER TABLE [#__user_notes] ALTER COLUMN [publish_up] [datetime2](0) NOT NULL; +ALTER TABLE [#__user_notes] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_up]; + +EXECUTE "#removeDefault" "#__user_notes", 'publish_down'; +ALTER TABLE [#__user_notes] ALTER COLUMN [publish_down] [datetime2](0) NOT NULL; +ALTER TABLE [#__user_notes] ADD DEFAULT '1900-01-01 00:00:00' FOR [publish_down]; + +EXECUTE "#removeDefault" "#__users", 'registerDate'; +ALTER TABLE [#__users] ALTER COLUMN [registerDate] [datetime2](0) NOT NULL; +ALTER TABLE [#__users] ADD DEFAULT '1900-01-01 00:00:00' FOR [registerDate]; + +EXECUTE "#removeDefault" "#__users", 'lastvisitDate'; +ALTER TABLE [#__users] ALTER COLUMN [lastvisitDate] [datetime2](0) NOT NULL; +ALTER TABLE [#__users] ADD DEFAULT '1900-01-01 00:00:00' FOR [lastvisitDate]; + +EXECUTE "#removeDefault" "#__users", 'lastResetTime'; +ALTER TABLE [#__users] ALTER COLUMN [lastResetTime] [datetime2](0) NOT NULL; +ALTER TABLE [#__users] ADD DEFAULT '1900-01-01 00:00:00' FOR [lastResetTime]; + +DROP PROCEDURE "#removeDefault"; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-02-17.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-02-17.sql new file mode 100644 index 0000000000..aaf6bf4a20 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-02-17.sql @@ -0,0 +1,21 @@ +-- Normalize contact_details table default values. +DECLARE @table AS nvarchar(32) +DECLARE @constraintName AS nvarchar(100) +DECLARE @constraintQuery AS nvarchar(1000) +SET QUOTED_IDENTIFIER OFF +SET @table = "#__contact_details" +SET QUOTED_IDENTIFIER ON +SELECT @constraintName = name FROM sys.default_constraints +WHERE parent_object_id = object_id(@table) +AND parent_column_id = columnproperty(object_id(@table), 'name', 'ColumnId') +SET @constraintQuery = 'ALTER TABLE [' + @table + '] DROP CONSTRAINT [' + @constraintName + ']' +EXECUTE sp_executesql @constraintQuery; + +ALTER TABLE [#__contact_details] ADD DEFAULT (0) FOR [published]; +ALTER TABLE [#__contact_details] ADD DEFAULT (0) FOR [checked_out]; +ALTER TABLE [#__contact_details] ADD DEFAULT ('') FOR [created_by_alias]; + +ALTER TABLE [#__contact_details] ADD DEFAULT ('') FOR [sortname1]; +ALTER TABLE [#__contact_details] ADD DEFAULT ('') FOR [sortname2]; +ALTER TABLE [#__contact_details] ADD DEFAULT ('') FOR [sortname3]; +ALTER TABLE [#__contact_details] ADD DEFAULT ('') FOR [xreference]; diff --git a/administrator/components/com_admin/views/help/tmpl/default.php b/administrator/components/com_admin/views/help/tmpl/default.php index 16ac0bf336..53e5ffceb0 100644 --- a/administrator/components/com_admin/views/help/tmpl/default.php +++ b/administrator/components/com_admin/views/help/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -17,13 +17,13 @@