[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 mysql_upgrade_zencart_151_to_152.sql

Zen Cart 源代码 mysql_upgrade_zencart_151_to_152.sql




下载文件

文件名: mysql_upgrade_zencart_151_to_152.sql
文件类型: Unknown文件
文件大小: 8.23 KiB
MD5: 61a6bb19c56998f0a81f4d573cf6ee5b

mysql_upgrade_zencart_151_to_152.sql - 关闭高亮
  1. #
  2. # * This SQL script upgrades the core Zen Cart database structure from v1.5.1 to v1.5.2
  3. # *
  4. # * @package Installer
  5. # * @access private
  6. # * @copyright Copyright 2003-2013 Zen Cart Development Team
  7. # * @copyright Portions Copyright 2003 osCommerce
  8. # * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  9. # * @version GIT: $Id: Author: DrByte  Thu Oct 31 13:50:24 2013 -0400 New in v1.5.2 $
  10. #
  11.  
  12. ############ IMPORTANT INSTRUCTIONS ###############
  13. #
  14. # * Zen Cart uses the zc_install/index.php program to do database upgrades
  15. # * This SQL script is intended to be used by running zc_install
  16. # * It is *not* recommended to simply run these statements manually via any other means
  17. # * ie: not via phpMyAdmin or via the Install SQL Patch tool in Zen Cart admin
  18. # * The zc_install program catches possible problems and also handles table-prefixes automatically
  19. # *
  20. # * To use the zc_install program to do your database upgrade:
  21. # * a. Upload the NEWEST zc_install folder to your server
  22. # * b. Surf to zc_install/index.php via your browser
  23. # * c. On the System Inspection page, scroll to the bottom and click on Database Upgrade
  24. # *    NOTE: do NOT click on the "Install" button, because that will erase your database.
  25. # * d. On the Database Upgrade screen, you will be presented with a list of checkboxes for
  26. # *    various Zen Cart versions, with the recommended upgrades already pre-selected.
  27. # * e. Verify the checkboxes, then scroll down and enter your Zen Cart Admin username
  28. # *    and password, and then click on the Upgrade button.
  29. # * f. If any errors occur, you will be notified.  Some warnings can be ignored.
  30. # * g. When done, you will be taken to the Finished page.
  31. #
  32. #####################################################
  33.  
  34. # Set store to Down-For-Maintenance mode.  Must reset manually via admin after upgrade is done.
  35. #UPDATE configuration set configuration_value = 'true' where configuration_key = 'DOWN_FOR_MAINTENANCE';
  36.  
  37. # Clear out active customer sessions
  38. TRUNCATE TABLE whos_online;
  39. TRUNCATE TABLE db_cache;
  40. TRUNCATE TABLE sessions;
  41.  
  42. ALTER TABLE sessions MODIFY COLUMN sesskey varchar(255) NOT NULL default '';
  43. ALTER TABLE whos_online MODIFY COLUMN session_id varchar(255) NOT NULL default '';
  44.  
  45. UPDATE configuration SET configuration_description = '指向 configure.php 文件中 DIR_FS_SQL_CACHE 设定的目录。' WHERE configuration_key = 'SESSION_WRITE_DIRECTORY';
  46.  
  47. UPDATE configuration set configuration_title = '记录页面解析时间', configuration_description = '保存(到文件)解析页面的时间' WHERE configuration_key = 'STORE_PAGE_PARSE_TIME';
  48. UPDATE configuration set configuration_title = '日志路径', configuration_description = '页面解析时间的日志目录和文件名' WHERE configuration_key = 'STORE_PAGE_PARSE_TIME_LOG';
  49. UPDATE configuration set configuration_title = '日志时间格式', configuration_description = '时间格式' WHERE configuration_key = 'STORE_PARSE_DATE_TIME_FORMAT';
  50. UPDATE configuration set configuration_title = '显示页面解析时间', configuration_description = '在每个页面底部显示页面解析时间<br />(说明: 显示解析时间并不要求保存。)' WHERE configuration_key = 'DISPLAY_PAGE_PARSE_TIME';
  51. UPDATE configuration set configuration_title = '保存数据库查询', configuration_description = '保存数据库查询到系统的 /logs/ 目录。注意,这有可能严重影响系统性能并用光硬盘空间。' WHERE configuration_key = 'STORE_DB_TRANSACTIONS';
  52.  
  53. UPDATE configuration set configuration_title = '使用 HTML 邮件?', configuration_description = '是否使用 HTML 格式发送电子邮件' WHERE configuration_key = 'EMAIL_USE_HTML';
  54. UPDATE configuration set configuration_title = '管理员邮件格式', configuration_description = '请选择管理员电子邮件格式' WHERE configuration_key = 'ADMIN_EXTRA_EMAIL_FORMAT';
  55.  
  56. INSERT INTO address_format VALUES (7, '$firstname $lastname$cr$streets$cr$city $state $postcode$cr$country','$city $state / $country');
  57. UPDATE countries set address_format_id = 7 where countries_iso_code_3 = 'AUS';
  58. UPDATE countries set address_format_id = 5 where countries_iso_code_3 in ('BEL', 'NLD', 'SWE');
  59. ALTER TABLE countries ADD status tinyint(1) DEFAULT '1';
  60.  
  61. ALTER TABLE paypal_payment_status_history MODIFY pending_reason varchar(32) default NULL;
  62.  
  63. ALTER TABLE sessions MODIFY sesskey varchar(255) NOT NULL default '';
  64. ALTER TABLE whos_online MODIFY session_id varchar(255) NOT NULL default '';
  65. ALTER TABLE admin_menus MODIFY menu_key VARCHAR(255) NOT NULL DEFAULT '';
  66. ALTER TABLE admin_pages MODIFY page_key VARCHAR(255) NOT NULL DEFAULT '';
  67. ALTER TABLE admin_pages MODIFY main_page VARCHAR(255) NOT NULL DEFAULT '';
  68. ALTER TABLE admin_pages MODIFY page_params VARCHAR(255) NOT NULL DEFAULT '';
  69. ALTER TABLE admin_pages MODIFY menu_key VARCHAR(255) NOT NULL DEFAULT '';
  70. ALTER TABLE admin_profiles MODIFY profile_name VARCHAR(255) NOT NULL DEFAULT '';
  71. ALTER TABLE admin_pages_to_profiles MODIFY page_key varchar(255) NOT NULL default '';
  72.  
  73. UPDATE configuration set configuration_description = '输入以秒为单位的时间。<br />PCI 兼容要求最大不超过 900 。<br /> 默认=900<br />例如: 900= 15 分钟<br /><br />备注: 时间太短会导致添加/编辑商品时超时', use_function = '', set_function = '' where configuration_key = 'SESSION_TIMEOUT_ADMIN';
  74. INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('PA-DSS 管理页面 Session 超时设置?', 'PADSS_ADMIN_SESSION_TIMEOUT_ENFORCED', '1', 'PA-DSS 规范要求管理页面在15分钟没有操作时关闭。<strong>禁用后网站不符合 PA-DSS 规范。</strong>', 1, 30, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Non-Compliant\'), array(\'id\'=>\'1\', \'text\'=>\'On\')),');
  75. INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('PA-DSS 高强度密码设置?', 'PADSS_PWD_EXPIRY_ENFORCED', '1', 'PA-DSS 规范要求管理员密码90天必须修改,且不能使用最近4次密码。<strong>禁用后网站不符合 PA-DSS 规范。</strong>', 1, 30, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Non-Compliant\'), array(\'id\'=>\'1\', \'text\'=>\'On\')),');
  76. INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('显示分类的链接状态', 'SHOW_CATEGORY_PRODUCTS_LINKED_STATUS', 'true', '显示分类产品链接状态?', '1', '19', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
  77.  
  78. #############
  79.  
  80. #### VERSION UPDATE STATEMENTS
  81. ## THE FOLLOWING 2 SECTIONS SHOULD BE THE "LAST" ITEMS IN THE FILE, so that if the upgrade fails prematurely, the version info is not updated.
  82. ##The following updates the version HISTORY to store the prior version info (Essentially "moves" the prior version info from the "project_version" to "project_version_history" table
  83. #NEXT_X_ROWS_AS_ONE_COMMAND:3
  84. INSERT INTO project_version_history (project_version_key, project_version_major, project_version_minor, project_version_patch, project_version_date_applied, project_version_comment)
  85. SELECT project_version_key, project_version_major, project_version_minor, project_version_patch1 as project_version_patch, project_version_date_applied, project_version_comment
  86. FROM project_version;
  87.  
  88. ## Now set to new version
  89. UPDATE project_version SET project_version_major='1', project_version_minor='5.2', project_version_patch1='', project_version_patch1_source='', project_version_patch2='', project_version_patch2_source='', project_version_comment='Version Update 1.5.1->1.5.2', project_version_date_applied=now() WHERE project_version_key = 'Zen-Cart Main';
  90. UPDATE project_version SET project_version_major='1', project_version_minor='5.2', project_version_patch1='', project_version_patch1_source='', project_version_patch2='', project_version_patch2_source='', project_version_comment='Version Update 1.5.1->1.5.2', project_version_date_applied=now() WHERE project_version_key = 'Zen-Cart Database';
  91.  
  92. #####  END OF UPGRADE SCRIPT
  93.  
  94.  


cron