Initial commit
This commit is contained in:
24
setup/update/tpl/2.0.0-RC1.sql.tpl
Normal file
24
setup/update/tpl/2.0.0-RC1.sql.tpl
Normal file
@@ -0,0 +1,24 @@
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
ALTER TABLE `product` CHANGE `position` `position` INT( 11 ) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `product_version` CHANGE `position` `position` INT( 11 ) NOT NULL DEFAULT '0';
|
||||
|
||||
SELECT @max := MAX(`id`) FROM `message`;
|
||||
SET @max := @max+1;
|
||||
|
||||
INSERT INTO `message` (`id`, `name`, `secured`, `created_at`, `updated_at`, `version`, `version_created_at`, `version_created_by`) VALUES
|
||||
(@max, 'lost_password', NULL, NOW(), NOW(), 2, NOW(), NULL);
|
||||
|
||||
INSERT INTO `message_i18n` (`id`, `locale`, `title`, `subject`, `text_message`, `html_message`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max, '{$locale}', {intl l='Your new password' locale=$locale}, {intl l='Your new password' locale=$locale}, {intl l='Your new passord is : {$password}' locale=$locale}, '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\n<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr">\r\n<head>\r\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r\n<title>{intl l='changing password email for' in_string=1 use_default=1 locale=$locale} {ldelim}config key="urlsite"{rdelim} </title>\r\n{ldelim}literal{rdelim}{literal}\r\n<style type="text/css">\r\nbody {font-family: Arial, Helvetica, sans-serif;font-size:100%;text-align:center;}\r\n#liencompte {margin:25px 0 ;text-align: middle;font-size:10pt;}\r\n#wrapper {width:480pt;margin:0 auto;}\r\n#entete {padding-bottom:20px;margin-bottom:10px;border-bottom:1px dotted #000;}\r\n#logotexte {float:left;width:180pt;height:75pt;border:1pt solid #000;font-size:18pt;text-align:center;}\r\n#logoimg{float:left;}\r\n#h2 {margin:0;padding:0;font-size:140%;text-align:center;}\r\n#h3 {margin:0;padding:0;font-size:120%;text-align:center;}\r\n</style>\r\n{/literal}{ldelim}/literal{rdelim}\r\n</head>\r\n<body>\r\n<div id="wrapper">\r\n<div id="entete">\r\n<h1 id="logotexte">{ldelim}config key="store_name"{rdelim}</h1>\r\n<h2 id="info">{intl l='changing password email for' in_string=1 use_default=1 locale=$locale}</h2>\r\n<h5 id="mdp"> {intl l='You have lost your password <br />\r\nYour new password is' in_string=1 use_default=1 locale=$locale} <span style="font-size:80%">{ldelim}$password{rdelim}</span>.</h5>\r\n</div>\r\n</div>\r\n<p id="liencompte">{intl l='You can now login at' in_string=1 use_default=1 locale=$locale} <a href="{ldelim}config key="urlsite"{rdelim}">{ldelim}config key="urlsite"{rdelim}</a>.<br /> {intl l='You have lost your password <br />\r\nPlease, change this password after your first connection' in_string=1 use_default=1 locale=$locale}</p>\r\n</body>\r\n</html>'){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.0-RC1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='RC1' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
362
setup/update/tpl/2.0.0-beta2.sql.tpl
Normal file
362
setup/update/tpl/2.0.0-beta2.sql.tpl
Normal file
@@ -0,0 +1,362 @@
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
# config table
|
||||
ALTER TABLE `config` CHANGE `value` `value` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;
|
||||
|
||||
# admin table
|
||||
ALTER TABLE `admin` ADD UNIQUE index `login_UNIQUE`(`login`);
|
||||
|
||||
# message table
|
||||
ALTER TABLE `message` ADD `text_layout_file_name` VARCHAR( 255 ) AFTER `secured` ;
|
||||
ALTER TABLE `message` ADD `text_template_file_name` VARCHAR( 255 ) AFTER `text_layout_file_name` ;
|
||||
ALTER TABLE `message` ADD `html_layout_file_name` VARCHAR( 255 ) AFTER `text_template_file_name` ;
|
||||
ALTER TABLE `message` ADD `html_template_file_name` VARCHAR( 255 ) AFTER `html_layout_file_name` ;
|
||||
|
||||
# message_version table
|
||||
ALTER TABLE `message_version` ADD `text_layout_file_name` VARCHAR( 255 ) AFTER `secured` ;
|
||||
ALTER TABLE `message_version` ADD `text_template_file_name` VARCHAR( 255 ) AFTER `text_layout_file_name` ;
|
||||
ALTER TABLE `message_version` ADD `html_layout_file_name` VARCHAR( 255 ) AFTER `text_template_file_name` ;
|
||||
ALTER TABLE `message_version` ADD `html_template_file_name` VARCHAR( 255 ) AFTER `html_layout_file_name` ;
|
||||
|
||||
# admin_log table
|
||||
ALTER TABLE `admin_log` ADD `resource` VARCHAR( 255 ) AFTER `admin_lastname` ;
|
||||
ALTER TABLE `admin_log` ADD `message` TEXT AFTER `action` ;
|
||||
ALTER TABLE `admin_log` CHANGE `request` `request` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
||||
|
||||
# category_i18n table
|
||||
ALTER TABLE `category_i18n` ADD `meta_title` VARCHAR( 255 ) AFTER `postscriptum` ;
|
||||
ALTER TABLE `category_i18n` ADD `meta_description` TEXT AFTER `meta_title` ;
|
||||
ALTER TABLE `category_i18n` ADD `meta_keywords` TEXT AFTER `meta_description` ;
|
||||
|
||||
# product_i18n table
|
||||
ALTER TABLE `product_i18n` ADD `meta_title` VARCHAR( 255 ) AFTER `postscriptum` ;
|
||||
ALTER TABLE `product_i18n` ADD `meta_description` TEXT AFTER `meta_title` ;
|
||||
ALTER TABLE `product_i18n` ADD `meta_keywords` TEXT AFTER `meta_description` ;
|
||||
|
||||
# folder_i18n table
|
||||
ALTER TABLE `folder_i18n` ADD `meta_title` VARCHAR( 255 ) AFTER `postscriptum` ;
|
||||
ALTER TABLE `folder_i18n` ADD `meta_description` TEXT AFTER `meta_title` ;
|
||||
ALTER TABLE `folder_i18n` ADD `meta_keywords` TEXT AFTER `meta_description` ;
|
||||
|
||||
# content_i18n table
|
||||
ALTER TABLE `content_i18n` ADD `meta_title` VARCHAR( 255 ) AFTER `postscriptum` ;
|
||||
ALTER TABLE `content_i18n` ADD `meta_description` TEXT AFTER `meta_title` ;
|
||||
ALTER TABLE `content_i18n` ADD `meta_keywords` TEXT AFTER `meta_description` ;
|
||||
|
||||
|
||||
# config content
|
||||
|
||||
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('active-admin-template', 'default', 0, 0, NOW(), NOW()),
|
||||
('active-pdf-template', 'default', 0, 0, NOW(), NOW()),
|
||||
('active-mail-template', 'default', 0, 0, NOW(), NOW()),
|
||||
('pdf_invoice_file', 'invoice', 0, 0, NOW(), NOW()),
|
||||
('pdf_delivery_file', 'delivery', 0, 0, NOW(), NOW())
|
||||
;
|
||||
|
||||
UPDATE `config` SET `name`='active-front-template' WHERE `name`='active-template';
|
||||
UPDATE `config` SET `name`='obsolete_rewriten_url_view', `value`='obsolete-rewritten-url' WHERE `name`='passed_url_view';
|
||||
UPDATE `config` SET `name`='store_name' WHERE `name`='company_name';
|
||||
UPDATE `config` SET `name`='store_email' WHERE `name`='company_email';
|
||||
UPDATE `config` SET `value`='2.0.0-beta2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='beta2' WHERE `name`='thelia_extra_version';
|
||||
|
||||
INSERT INTO `module` (`code`, `type`, `activate`, `position`, `full_namespace`, `created_at`, `updated_at`) VALUES
|
||||
('Front', 1, 1, 2, 'Front\\Front', NOW(), NOW());
|
||||
|
||||
INSERT INTO `module_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
(LAST_INSERT_ID(), 'en_US', 'Front office integration', NULL, NULL, NULL),
|
||||
(LAST_INSERT_ID(), 'fr_FR', 'Module Front office', NULL, NULL, NULL);
|
||||
|
||||
TRUNCATE TABLE `area`;
|
||||
|
||||
INSERT INTO `area` (`id`, `name`, `postage`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'France', NULL, NOW(), NOW()),
|
||||
(2, 'A Zone', NULL, NOW(), NOW()),
|
||||
(3, 'B Zone', NULL, NOW(), NOW()),
|
||||
(4, 'C Zone', NULL, NOW(), NOW()),
|
||||
(5, 'D Zone', NULL, NOW(), NOW()),
|
||||
(6, 'France OM1', NULL, NOW(), NOW()),
|
||||
(7, 'France OM2', NULL, NOW(), NOW());
|
||||
|
||||
TRUNCATE TABLE `area_delivery_module`;
|
||||
|
||||
INSERT INTO `area_delivery_module` (`id`, `area_id`, `delivery_module_id`, `created_at`, `updated_at`) VALUES
|
||||
(1, 1, 2, NOW(), NOW()),
|
||||
(2, 2, 2, NOW(), NOW()),
|
||||
(3, 3, 2, NOW(), NOW()),
|
||||
(4, 4, 2, NOW(), NOW()),
|
||||
(5, 5, 2, NOW(), NOW()),
|
||||
(6, 6, 2, NOW(), NOW());
|
||||
|
||||
TRUNCATE TABLE `country`;
|
||||
|
||||
INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `by_default`, `shop_country`, `created_at`, `updated_at`) VALUES
|
||||
(1, 5, '4', 'AF', 'AFG', 0, 0, NOW(), NOW()),
|
||||
(2, 4, '710', 'ZA', 'ZAF', 0, 0, NOW(), NOW()),
|
||||
(3, 3, '8', 'AL', 'ALB', 0, 0, NOW(), NOW()),
|
||||
(4, 3, '12', 'DZ', 'DZA', 0, 0, NOW(), NOW()),
|
||||
(5, 2, '276', 'DE', 'DEU', 0, 0, NOW(), NOW()),
|
||||
(6, 1, '20', 'AD', 'AND', 0, 0, NOW(), NOW()),
|
||||
(7, 4, '24', 'AO', 'AGO', 0, 0, NOW(), NOW()),
|
||||
(8, 5, '28', 'AG', 'ATG', 0, 0, NOW(), NOW()),
|
||||
(9, 4, '682', 'SA', 'SAU', 0, 0, NOW(), NOW()),
|
||||
(10, 5, '32', 'AR', 'ARG', 0, 0, NOW(), NOW()),
|
||||
(11, 3, '51', 'AM', 'ARM', 0, 0, NOW(), NOW()),
|
||||
(12, 5, '36', 'AU', 'AUS', 0, 0, NOW(), NOW()),
|
||||
(13, 2, '40', 'AT', 'AUT', 0, 0, NOW(), NOW()),
|
||||
(14, 3, '31', 'AZ', 'AZE', 0, 0, NOW(), NOW()),
|
||||
(15, 5, '44', 'BS', 'BHS', 0, 0, NOW(), NOW()),
|
||||
(16, 4, '48', 'BR', 'BHR', 0, 0, NOW(), NOW()),
|
||||
(17, 5, '50', 'BD', 'BGD', 0, 0, NOW(), NOW()),
|
||||
(18, 5, '52', 'BB', 'BRB', 0, 0, NOW(), NOW()),
|
||||
(19, 3, '585', 'PW', 'PLW', 0, 0, NOW(), NOW()),
|
||||
(20, 5, '56', 'BE', 'BEL', 0, 0, NOW(), NOW()),
|
||||
(21, 5, '84', 'BL', 'BLZ', 0, 0, NOW(), NOW()),
|
||||
(22, 4, '204', 'BJ', 'BEN', 0, 0, NOW(), NOW()),
|
||||
(23, NULL, '64', 'BT', 'BTN', 0, 0, NOW(), NOW()),
|
||||
(24, 3, '112', 'BY', 'BLR', 0, 0, NOW(), NOW()),
|
||||
(25, 5, '104', 'MM', 'MMR', 0, 0, NOW(), NOW()),
|
||||
(26, 5, '68', 'BO', 'BOL', 0, 0, NOW(), NOW()),
|
||||
(27, 3, '70', 'BA', 'BIH', 0, 0, NOW(), NOW()),
|
||||
(28, 4, '72', 'BW', 'BWA', 0, 0, NOW(), NOW()),
|
||||
(29, 5, '76', 'BR', 'BRA', 0, 0, NOW(), NOW()),
|
||||
(30, 5, '96', 'BN', 'BRN', 0, 0, NOW(), NOW()),
|
||||
(31, 3, '100', 'BG', 'BGR', 0, 0, NOW(), NOW()),
|
||||
(32, 5, '854', 'BF', 'BFA', 0, 0, NOW(), NOW()),
|
||||
(33, 4, '108', 'BI', 'BDI', 0, 0, NOW(), NOW()),
|
||||
(34, 5, '116', 'KH', 'KHM', 0, 0, NOW(), NOW()),
|
||||
(35, 4, '120', 'CM', 'CMR', 0, 0, NOW(), NOW()),
|
||||
(37, 4, '132', 'CV', 'CPV', 0, 0, NOW(), NOW()),
|
||||
(38, 5, '152', 'CL', 'CHL', 0, 0, NOW(), NOW()),
|
||||
(39, 5, '156', 'CN', 'CHN', 0, 0, NOW(), NOW()),
|
||||
(40, 2, '196', 'CY', 'CYP', 0, 0, NOW(), NOW()),
|
||||
(41, 5, '170', 'CO', 'COL', 0, 0, NOW(), NOW()),
|
||||
(42, 4, '174', 'KM', 'COM', 0, 0, NOW(), NOW()),
|
||||
(43, 4, '178', 'CG', 'COG', 0, 0, NOW(), NOW()),
|
||||
(44, 5, '184', 'CK', 'COK', 0, 0, NOW(), NOW()),
|
||||
(45, 5, '408', 'KP', 'PRK', 0, 0, NOW(), NOW()),
|
||||
(46, 5, '410', 'KR', 'KOR', 0, 0, NOW(), NOW()),
|
||||
(47, 5, '188', 'CR', 'CRI', 0, 0, NOW(), NOW()),
|
||||
(48, 4, '384', 'CI', 'CIV', 0, 0, NOW(), NOW()),
|
||||
(49, 2, '191', 'HR', 'HRV', 0, 0, NOW(), NOW()),
|
||||
(50, 5, '192', 'CU', 'CUB', 0, 0, NOW(), NOW()),
|
||||
(51, 2, '208', 'DK', 'DNK', 0, 0, NOW(), NOW()),
|
||||
(52, 5, '262', 'DJ', 'DJI', 0, 0, NOW(), NOW()),
|
||||
(53, 5, '212', 'DM', 'DMA', 0, 0, NOW(), NOW()),
|
||||
(54, 4, '818', 'EG', 'EGY', 0, 0, NOW(), NOW()),
|
||||
(55, 4, '784', 'AE', 'ARE', 0, 0, NOW(), NOW()),
|
||||
(56, 5, '218', 'EC', 'ECU', 0, 0, NOW(), NOW()),
|
||||
(57, 4, '232', 'ER', 'ERI', 0, 0, NOW(), NOW()),
|
||||
(58, 2, '724', 'ES', 'ESP', 0, 0, NOW(), NOW()),
|
||||
(59, 2, '233', 'EE', 'EST', 0, 0, NOW(), NOW()),
|
||||
(61, 4, '231', 'ET', 'ETH', 0, 0, NOW(), NOW()),
|
||||
(62, 5, '242', 'FJ', 'FJI', 0, 0, NOW(), NOW()),
|
||||
(63, 2, '246', 'FI', 'FIN', 0, 0, NOW(), NOW()),
|
||||
(64, 1, '250', 'FR', 'FRA', 1, 1, NOW(), NOW()),
|
||||
(65, 4, '266', 'GA', 'GAB', 0, 0, NOW(), NOW()),
|
||||
(66, 4, '270', 'GM', 'GMB', 0, 0, NOW(), NOW()),
|
||||
(67, 3, '268', 'GE', 'GEO', 0, 0, NOW(), NOW()),
|
||||
(68, 4, '288', 'GH', 'GHA', 0, 0, NOW(), NOW()),
|
||||
(69, 2, '300', 'GR', 'GRC', 0, 0, NOW(), NOW()),
|
||||
(70, 5, '308', 'GD', 'GRD', 0, 0, NOW(), NOW()),
|
||||
(71, 5, '320', 'GT', 'GTM', 0, 0, NOW(), NOW()),
|
||||
(72, 4, '324', 'GN', 'GIN', 0, 0, NOW(), NOW()),
|
||||
(73, 4, '624', 'GW', 'GNB', 0, 0, NOW(), NOW()),
|
||||
(74, 4, '226', 'GQ', 'GNQ', 0, 0, NOW(), NOW()),
|
||||
(75, 5, '328', 'GY', 'GUY', 0, 0, NOW(), NOW()),
|
||||
(76, 5, '332', 'HT', 'HTI', 0, 0, NOW(), NOW()),
|
||||
(77, 5, '340', 'HN', 'HND', 0, 0, NOW(), NOW()),
|
||||
(78, 2, '348', 'HU', 'HUN', 0, 0, NOW(), NOW()),
|
||||
(79, 5, '356', 'IN', 'IND', 0, 0, NOW(), NOW()),
|
||||
(80, 5, '360', 'ID', 'IDN', 0, 0, NOW(), NOW()),
|
||||
(81, 4, '364', 'IR', 'IRN', 0, 0, NOW(), NOW()),
|
||||
(82, 4, '368', 'IQ', 'IRQ', 0, 0, NOW(), NOW()),
|
||||
(83, 2, '372', 'IE', 'IRL', 0, 0, NOW(), NOW()),
|
||||
(84, 3, '352', 'IS', 'ISL', 0, 0, NOW(), NOW()),
|
||||
(85, 4, '376', 'IL', 'ISR', 0, 0, NOW(), NOW()),
|
||||
(86, 2, '380', 'IT', 'ITA', 0, 0, NOW(), NOW()),
|
||||
(87, 5, '388', 'JM', 'JAM', 0, 0, NOW(), NOW()),
|
||||
(88, 5, '392', 'JP', 'JPN', 0, 0, NOW(), NOW()),
|
||||
(89, 4, '400', 'JO', 'JOR', 0, 0, NOW(), NOW()),
|
||||
(90, 5, '398', 'KZ', 'KAZ', 0, 0, NOW(), NOW()),
|
||||
(91, 4, '404', 'KE', 'KEN', 0, 0, NOW(), NOW()),
|
||||
(92, 5, '417', 'KG', 'KGZ', 0, 0, NOW(), NOW()),
|
||||
(93, 5, '296', 'KI', 'KIR', 0, 0, NOW(), NOW()),
|
||||
(94, 4, '414', 'KW', 'KWT', 0, 0, NOW(), NOW()),
|
||||
(95, 5, '418', 'LA', 'LAO', 0, 0, NOW(), NOW()),
|
||||
(96, 4, '426', 'LS', 'LSO', 0, 0, NOW(), NOW()),
|
||||
(97, 2, '428', 'LV', 'LVA', 0, 0, NOW(), NOW()),
|
||||
(98, 4, '422', 'LB', 'LBN', 0, 0, NOW(), NOW()),
|
||||
(99, 4, '430', 'LR', 'LBR', 0, 0, NOW(), NOW()),
|
||||
(100, 4, '343', 'LY', 'LBY', 0, 0, NOW(), NOW()),
|
||||
(101, 2, '438', 'LI', 'LIE', 0, 0, NOW(), NOW()),
|
||||
(102, 2, '440', 'LT', 'LTU', 0, 0, NOW(), NOW()),
|
||||
(103, 2, '442', 'LU', 'LUX', 0, 0, NOW(), NOW()),
|
||||
(104, 3, '807', 'MK', 'MKD', 0, 0, NOW(), NOW()),
|
||||
(105, 4, '450', 'MD', 'MDG', 0, 0, NOW(), NOW()),
|
||||
(106, 5, '458', 'MY', 'MYS', 0, 0, NOW(), NOW()),
|
||||
(107, 4, '454', 'MW', 'MWI', 0, 0, NOW(), NOW()),
|
||||
(108, 5, '462', 'MV', 'MDV', 0, 0, NOW(), NOW()),
|
||||
(109, 4, '466', 'ML', 'MLI', 0, 0, NOW(), NOW()),
|
||||
(110, 2, '470', 'MT', 'MLT', 0, 0, NOW(), NOW()),
|
||||
(111, 3, '504', 'MA', 'MAR', 0, 0, NOW(), NOW()),
|
||||
(112, 5, '584', 'MH', 'MHL', 0, 0, NOW(), NOW()),
|
||||
(113, 4, '480', 'MU', 'MUS', 0, 0, NOW(), NOW()),
|
||||
(114, 4, '478', 'MR', 'MRT', 0, 0, NOW(), NOW()),
|
||||
(115, 5, '484', 'MX', 'MEX', 0, 0, NOW(), NOW()),
|
||||
(116, NULL, '583', 'FM', 'FSM', 0, 0, NOW(), NOW()),
|
||||
(117, 3, '498', 'MD', 'MDA', 0, 0, NOW(), NOW()),
|
||||
(118, 1, '492', 'MC', 'MCO', 0, 0, NOW(), NOW()),
|
||||
(119, 5, '496', 'MN', 'MNG', 0, 0, NOW(), NOW()),
|
||||
(120, 4, '508', 'MZ', 'MOZ', 0, 0, NOW(), NOW()),
|
||||
(121, 4, '516', 'NA', 'NAM', 0, 0, NOW(), NOW()),
|
||||
(122, 5, '520', 'NR', 'NRU', 0, 0, NOW(), NOW()),
|
||||
(123, 5, '524', 'NP', 'NPL', 0, 0, NOW(), NOW()),
|
||||
(124, 5, '558', 'NI', 'NIC', 0, 0, NOW(), NOW()),
|
||||
(125, 4, '562', 'NE', 'NER', 0, 0, NOW(), NOW()),
|
||||
(126, 4, '566', 'NG', 'NGA', 0, 0, NOW(), NOW()),
|
||||
(127, NULL, '570', 'NU', 'NIU', 0, 0, NOW(), NOW()),
|
||||
(128, 3, '578', 'NO', 'NOR', 0, 0, NOW(), NOW()),
|
||||
(129, 5, '554', 'NZ', 'NZL', 0, 0, NOW(), NOW()),
|
||||
(130, 4, '512', 'OM', 'OMN', 0, 0, NOW(), NOW()),
|
||||
(131, 4, '800', 'UG', 'UGA', 0, 0, NOW(), NOW()),
|
||||
(132, 5, '860', 'UZ', 'UZB', 0, 0, NOW(), NOW()),
|
||||
(133, 5, '586', 'PK', 'PAK', 0, 0, NOW(), NOW()),
|
||||
(134, 5, '591', 'PA', 'PAN', 0, 0, NOW(), NOW()),
|
||||
(135, 5, '598', 'PG', 'PNG', 0, 0, NOW(), NOW()),
|
||||
(136, 5, '600', 'PY', 'PRY', 0, 0, NOW(), NOW()),
|
||||
(137, 2, '528', 'NL', 'NLD', 0, 0, NOW(), NOW()),
|
||||
(138, 5, '604', 'PE', 'PER', 0, 0, NOW(), NOW()),
|
||||
(139, 5, '608', 'PH', 'PHL', 0, 0, NOW(), NOW()),
|
||||
(140, 2, '616', 'PL', 'POL', 0, 0, NOW(), NOW()),
|
||||
(141, 2, '620', 'PT', 'PRT', 0, 0, NOW(), NOW()),
|
||||
(142, 4, '634', 'QA', 'QAT', 0, 0, NOW(), NOW()),
|
||||
(143, 4, '140', 'CF', 'CAF', 0, 0, NOW(), NOW()),
|
||||
(144, 5, '214', 'DO', 'DOM', 0, 0, NOW(), NOW()),
|
||||
(145, 2, '203', 'CZ', 'CZE', 0, 0, NOW(), NOW()),
|
||||
(146, 2, '642', 'RO', 'ROU', 0, 0, NOW(), NOW()),
|
||||
(147, 2, '826', 'GB', 'GBR', 0, 0, NOW(), NOW()),
|
||||
(148, 3, '643', 'RU', 'RUS', 0, 0, NOW(), NOW()),
|
||||
(149, 4, '646', 'RW', 'RWA', 0, 0, NOW(), NOW()),
|
||||
(150, 5, '659', 'KN', 'KNA', 0, 0, NOW(), NOW()),
|
||||
(151, 5, '662', 'LC', 'LCA', 0, 0, NOW(), NOW()),
|
||||
(152, 2, '674', 'SM', 'SMR', 0, 0, NOW(), NOW()),
|
||||
(153, 5, '670', 'VC', 'VCT', 0, 0, NOW(), NOW()),
|
||||
(154, 5, '90', 'SB', 'SLB', 0, 0, NOW(), NOW()),
|
||||
(155, NULL, '222', 'SV', 'SLV', 0, 0, NOW(), NOW()),
|
||||
(156, 5, '882', 'WS', 'WSM', 0, 0, NOW(), NOW()),
|
||||
(157, 4, '678', 'ST', 'STP', 0, 0, NOW(), NOW()),
|
||||
(158, 4, '686', 'SN', 'SEN', 0, 0, NOW(), NOW()),
|
||||
(159, 4, '690', 'SC', 'SYC', 0, 0, NOW(), NOW()),
|
||||
(160, 4, '694', 'SL', 'SLE', 0, 0, NOW(), NOW()),
|
||||
(161, 5, '702', 'SG', 'SGP', 0, 0, NOW(), NOW()),
|
||||
(162, 2, '703', 'SK', 'SVK', 0, 0, NOW(), NOW()),
|
||||
(163, 2, '705', 'SI', 'SVN', 0, 0, NOW(), NOW()),
|
||||
(164, 4, '706', 'SO', 'SOM', 0, 0, NOW(), NOW()),
|
||||
(165, 4, '729', 'SD', 'SDN', 0, 0, NOW(), NOW()),
|
||||
(166, 5, '144', 'LK', 'LKA', 0, 0, NOW(), NOW()),
|
||||
(167, 2, '752', 'SE', 'SWE', 0, 0, NOW(), NOW()),
|
||||
(168, 2, '756', 'CH', 'CHE', 0, 0, NOW(), NOW()),
|
||||
(169, 5, '740', 'SR', 'SUR', 0, 0, NOW(), NOW()),
|
||||
(170, 4, '748', 'SZ', 'SWZ', 0, 0, NOW(), NOW()),
|
||||
(171, 4, '760', 'SY', 'SYR', 0, 0, NOW(), NOW()),
|
||||
(172, 5, '762', 'TJ', 'TJK', 0, 0, NOW(), NOW()),
|
||||
(173, 5, '834', 'TZ', 'TZA', 0, 0, NOW(), NOW()),
|
||||
(174, 4, '148', 'TD', 'TCD', 0, 0, NOW(), NOW()),
|
||||
(175, 5, '764', 'TH', 'THA', 0, 0, NOW(), NOW()),
|
||||
(176, 4, '768', 'TG', 'TGO', 0, 0, NOW(), NOW()),
|
||||
(177, 5, '776', 'TO', 'TON', 0, 0, NOW(), NOW()),
|
||||
(178, 5, '780', 'TT', 'TTO', 0, 0, NOW(), NOW()),
|
||||
(179, 3, '788', 'TN', 'TUN', 0, 0, NOW(), NOW()),
|
||||
(180, 5, '795', 'TM', 'TKM', 0, 0, NOW(), NOW()),
|
||||
(181, 3, '792', 'TR', 'TUR', 0, 0, NOW(), NOW()),
|
||||
(182, 5, '798', 'TV', 'TUV', 0, 0, NOW(), NOW()),
|
||||
(183, 2, '804', 'UA', 'UKR', 0, 0, NOW(), NOW()),
|
||||
(184, 5, '858', 'UY', 'URY', 0, 0, NOW(), NOW()),
|
||||
(185, 2, '336', 'VA', 'VAT', 0, 0, NOW(), NOW()),
|
||||
(186, 5, '548', 'VU', 'VUT', 0, 0, NOW(), NOW()),
|
||||
(187, 5, '862', 'VE', 'VEN', 0, 0, NOW(), NOW()),
|
||||
(188, 5, '704', 'VN', 'VNM', 0, 0, NOW(), NOW()),
|
||||
(189, 4, '887', 'YE', 'YEM', 0, 0, NOW(), NOW()),
|
||||
(191, 4, '180', 'CD', 'COD', 0, 0, NOW(), NOW()),
|
||||
(192, 4, '894', 'ZM', 'ZMB', 0, 0, NOW(), NOW()),
|
||||
(193, 4, '716', 'ZW', 'ZWE', 0, 0, NOW(), NOW()),
|
||||
(196, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(197, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(198, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(199, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(200, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(201, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(202, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(203, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(204, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(205, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(206, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(207, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(208, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(209, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(210, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(211, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(212, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(213, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(214, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(215, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(216, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(217, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(218, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(219, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(220, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(221, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(222, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(223, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(224, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(225, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(226, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(227, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(228, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(229, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(230, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(231, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(232, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(233, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(234, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(235, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(236, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(237, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(238, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(239, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(240, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(241, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(242, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(243, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(244, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(245, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW()),
|
||||
(246, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(247, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(248, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(249, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(250, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(251, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(252, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(253, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(254, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(255, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(256, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(257, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(258, 4, '124', 'CA', 'CAN', 0, 0, NOW(), NOW()),
|
||||
(259, 6, '312', 'GP', 'GLP', 0, 0, NOW(), NOW()),
|
||||
(260, 6, '254', 'GF', 'GUF', 0, 0, NOW(), NOW()),
|
||||
(261, 6, '474', 'MQ', 'MTQ', 0, 0, NOW(), NOW()),
|
||||
(262, 6, '175', 'YT', 'MYT', 0, 0, NOW(), NOW()),
|
||||
(263, 6, '638', 'RE', 'REU', 0, 0, NOW(), NOW()),
|
||||
(264, 6, '666', 'PM', 'SPM', 0, 0, NOW(), NOW()),
|
||||
(265, 7, '540', 'NC', 'NCL', 0, 0, NOW(), NOW()),
|
||||
(266, 7, '258', 'PF', 'PYF', 0, 0, NOW(), NOW()),
|
||||
(267, 7, '876', 'WF', 'WLF', 0, 0, NOW(), NOW()),
|
||||
(268, 4, '840', 'US', 'USA', 0, 0, NOW(), NOW());
|
||||
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
53
setup/update/tpl/2.0.0-beta3.sql.tpl
Normal file
53
setup/update/tpl/2.0.0-beta3.sql.tpl
Normal file
@@ -0,0 +1,53 @@
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
# order table
|
||||
ALTER TABLE `order` ADD `discount` FLOAT AFTER `invoice_ref` ;
|
||||
|
||||
# coupon table
|
||||
ALTER TABLE `coupon` DROP INDEX `idx_amount`;
|
||||
ALTER TABLE `coupon` DROP `amount`;
|
||||
ALTER TABLE `coupon` ADD `serialized_effects` TEXT AFTER `type` ;
|
||||
|
||||
ALTER TABLE `coupon_version` DROP `amount`;
|
||||
ALTER TABLE `coupon_version` ADD `serialized_effects` TEXT AFTER `type` ;
|
||||
|
||||
DROP TABLE IF EXISTS `coupon_order`;
|
||||
|
||||
# cart_item table
|
||||
ALTER TABLE `cart_item` DROP `discount`;
|
||||
|
||||
DROP TABLE IF EXISTS `order_coupon`;
|
||||
|
||||
CREATE TABLE `order_coupon`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`order_id` INTEGER NOT NULL,
|
||||
`code` VARCHAR(45) NOT NULL,
|
||||
`type` VARCHAR(255) NOT NULL,
|
||||
`amount` FLOAT NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
`short_description` TEXT NOT NULL,
|
||||
`description` LONGTEXT NOT NULL,
|
||||
`expiration_date` DATETIME NOT NULL,
|
||||
`is_cumulative` TINYINT(1) NOT NULL,
|
||||
`is_removing_postage` TINYINT(1) NOT NULL,
|
||||
`is_available_on_special_offers` TINYINT(1) NOT NULL,
|
||||
`serialized_conditions` TEXT NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_order_coupon_order_id` (`order_id`),
|
||||
CONSTRAINT `fk_order_coupon_order_id`
|
||||
FOREIGN KEY (`order_id`)
|
||||
REFERENCES `order` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.0-beta3' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='beta3' WHERE `name`='thelia_extra_version';
|
||||
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
26
setup/update/tpl/2.0.0-beta4.sql.tpl
Normal file
26
setup/update/tpl/2.0.0-beta4.sql.tpl
Normal file
@@ -0,0 +1,26 @@
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
INSERT INTO `module` (`code`, `type`, `activate`, `position`, `full_namespace`, `created_at`, `updated_at`) VALUES
|
||||
( 'Tinymce', 1, 0, 1, 'Tinymce\\Tinymce', NOW(), NOW());
|
||||
|
||||
INSERT INTO `module_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(LAST_INSERT_ID(), '{$locale}', {intl l='tinymce wysiwyg editor' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.0-beta4' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='beta4' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- Preferred locale for admin users
|
||||
ALTER TABLE `admin` ADD `locale` VARCHAR(45) NOT NULL AFTER `password`;
|
||||
UPDATE `admin` SET `locale`='en_US';
|
||||
|
||||
-- Unknown flag image path
|
||||
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('unknown-flag-path','assets/img/flags/unknown.png', 1, 1, NOW(), NOW());
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
60
setup/update/tpl/2.0.0.sql.tpl
Normal file
60
setup/update/tpl/2.0.0.sql.tpl
Normal file
@@ -0,0 +1,60 @@
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.0' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
ALTER TABLE `country` ADD INDEX `idx_country_by_default` (`by_default`);
|
||||
ALTER TABLE `currency` ADD INDEX `idx_currency_by_default` (`by_default`);
|
||||
ALTER TABLE `lang` ADD INDEX `idx_lang_by_default` (`by_default`);
|
||||
|
||||
ALTER TABLE `tax_rule_country` ADD INDEX `idx_tax_rule_country_tax_rule_id_country_id_position` (`tax_rule_id`, `country_id`, `position`);
|
||||
|
||||
ALTER TABLE `product_sale_elements` ADD INDEX `idx_product_elements_product_id_promo_is_default` (`product_id`, `promo`, `is_default`);
|
||||
|
||||
ALTER TABLE `product_image` ADD INDEX `idx_product_image_product_id_position` (`product_id`, `position`);
|
||||
ALTER TABLE `category_image` ADD INDEX `idx_category_image_category_id_position` (`category_id`, `position`);
|
||||
ALTER TABLE `content_image` ADD INDEX `idx_content_image_content_id_position` (`content_id`, `position`);
|
||||
ALTER TABLE `folder_image` ADD INDEX `idx_folder_image_folder_id_position` (`folder_id`, `position`);
|
||||
ALTER TABLE `module_image` ADD INDEX `idx_module_image_module_id_position` (`module_id`, `position`);
|
||||
|
||||
ALTER TABLE `rewriting_url` ADD INDEX `idx_rewriting_url_view_updated_at` (`view`, `updated_at`);
|
||||
ALTER TABLE `rewriting_url` ADD INDEX `idx_rewriting_url_view_id_view_view_locale_updated_at` (`view_id`, `view`, `view_locale`, `updated_at`);
|
||||
ALTER TABLE `rewriting_url` DROP INDEX `idx_view_id`;
|
||||
|
||||
ALTER TABLE `feature_product` ADD INDEX `idx_feature_product_product_id_feature_id_position` (`product_id`, `feature_id`, `position`);
|
||||
ALTER TABLE `feature_template` ADD INDEX `idx_feature_template_template_id_position` (`template_id`, `position`);
|
||||
|
||||
ALTER TABLE `currency` ADD INDEX `idx_currency_code` (`code`);
|
||||
|
||||
ALTER TABLE `customer` CHANGE `ref` `ref` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL ;
|
||||
|
||||
ALTER TABLE `order` CHANGE `ref` `ref` VARCHAR( 45 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL ;
|
||||
|
||||
SELECT @max := MAX(`id`) FROM `resource`;
|
||||
SET @max := @max+1;
|
||||
|
||||
INSERT INTO `resource` (`id`, `code`, `created_at`, `updated_at`) VALUES
|
||||
(@max, 'admin.cache', NOW(), NOW());
|
||||
|
||||
INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max, '{$locale}', {intl l='Configuration / Cache' locale=$locale}){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET @max := @max+1;
|
||||
|
||||
INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES
|
||||
(@max, 'admin.home', NOW(), NOW());
|
||||
|
||||
INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max, '{$locale}', {intl l='Back-office home page' locale=$locale}){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
62
setup/update/tpl/2.0.1.sql.tpl
Normal file
62
setup/update/tpl/2.0.1.sql.tpl
Normal file
@@ -0,0 +1,62 @@
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('front_cart_country_cookie_name','fcccn', 1, 1, NOW(), NOW());
|
||||
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('front_cart_country_cookie_expires','2592000', 1, 1, NOW(), NOW());
|
||||
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('sitemap_ttl','7200', 1, 1, NOW(), NOW());
|
||||
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('feed_ttl','7200', 1, 1, NOW(), NOW());
|
||||
|
||||
ALTER TABLE `module` ADD INDEX `idx_module_activate` (`activate`);
|
||||
|
||||
SELECT @max := MAX(`id`) FROM `resource`;
|
||||
SET @max := @max+1;
|
||||
|
||||
INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES
|
||||
(@max, 'admin.configuration.store', NOW(), NOW()),
|
||||
(@max+1, 'admin.configuration.variable', NOW(), NOW()),
|
||||
(@max+2, 'admin.configuration.admin-logs', NOW(), NOW()),
|
||||
(@max+3, 'admin.configuration.system-logs', NOW(), NOW()),
|
||||
(@max+4, 'admin.configuration.advanced', NOW(), NOW()),
|
||||
(@max+5, 'admin.configuration.translations', NOW(), NOW()),
|
||||
(@max+6, 'admin.tools', NOW(), NOW()),
|
||||
(@max+7, 'admin.export', NOW(), NOW()),
|
||||
(@max+8, 'admin.export.customer.newsletter', NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max, '{$locale}', {intl l='Store information configuration' locale=$locale}),
|
||||
(@max+1, '{$locale}', {intl l='Configuration variables' locale=$locale}),
|
||||
(@max+2, '{$locale}', {intl l='View administration logs' locale=$locale}),
|
||||
(@max+3, '{$locale}', {intl l='Logging system configuration' locale=$locale}),
|
||||
(@max+4, '{$locale}', {intl l='Advanced configuration' locale=$locale}),
|
||||
(@max+5, '{$locale}', {intl l='Translations' locale=$locale}),
|
||||
(@max+6, '{$locale}', {intl l='Tools panel' locale=$locale}),
|
||||
(@max+7, '{$locale}', {intl l='Back-office export management' locale=$locale}),
|
||||
(@max+8, '{$locale}', {intl l='export of newsletter subscribers' locale=$locale}){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SELECT @max := MAX(`id`) FROM `lang`;
|
||||
SET @max := @max+1;
|
||||
|
||||
INSERT INTO `lang`(`id`,`title`,`code`,`locale`,`url`,`date_format`,`time_format`,`datetime_format`,`decimal_separator`,`thousands_separator`,`decimals`,`by_default`,`created_at`,`updated_at`)VALUES
|
||||
(@max, 'Russian', 'ru', 'ru_RU', '', 'j.n.Y', 'H:i:s', 'j.n.Y H:i:s', ',', ' ', '2', 0, NOW(), NOW());
|
||||
|
||||
SET @max := @max+1;
|
||||
|
||||
INSERT INTO `lang`(`id`,`title`,`code`,`locale`,`url`,`date_format`,`time_format`,`datetime_format`,`decimal_separator`,`thousands_separator`,`decimals`,`by_default`,`created_at`,`updated_at`)VALUES
|
||||
(@max, 'Czech', 'cs', 'cs_CZ', '', 'j.n.Y', 'H:i:s', 'j.n.Y H:i:s', ',', ' ', '2', 0, NOW(), NOW());
|
||||
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
8
setup/update/tpl/2.0.10.sql.tpl
Normal file
8
setup/update/tpl/2.0.10.sql.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.10' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='10' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
8
setup/update/tpl/2.0.11.sql.tpl
Normal file
8
setup/update/tpl/2.0.11.sql.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.11' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='11' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
8
setup/update/tpl/2.0.12.sql.tpl
Normal file
8
setup/update/tpl/2.0.12.sql.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.12' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='12' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
129
setup/update/tpl/2.0.2.sql.tpl
Normal file
129
setup/update/tpl/2.0.2.sql.tpl
Normal file
@@ -0,0 +1,129 @@
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
# Remove useless rewriting_url indexes
|
||||
ALTER TABLE `rewriting_url` DROP INDEX `idx_rewriting_url_view_updated_at`;
|
||||
ALTER TABLE `rewriting_url` DROP INDEX `idx_rewriting_url_view_id_view_view_locale_updated_at`;
|
||||
|
||||
# Add coupon country/modules crossref tables
|
||||
# ------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `coupon_country`;
|
||||
|
||||
CREATE TABLE `coupon_country`
|
||||
(
|
||||
`coupon_id` INTEGER NOT NULL,
|
||||
`country_id` INTEGER NOT NULL,
|
||||
PRIMARY KEY (`coupon_id`,`country_id`),
|
||||
INDEX `fk_country_id_idx` (`country_id`),
|
||||
CONSTRAINT `fk_coupon_country_country_id`
|
||||
FOREIGN KEY (`country_id`)
|
||||
REFERENCES `country` (`id`)
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_coupon_country_coupon_id`
|
||||
FOREIGN KEY (`coupon_id`)
|
||||
REFERENCES `coupon` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
DROP TABLE IF EXISTS `coupon_module`;
|
||||
|
||||
CREATE TABLE `coupon_module`
|
||||
(
|
||||
`coupon_id` INTEGER NOT NULL,
|
||||
`module_id` INTEGER NOT NULL,
|
||||
PRIMARY KEY (`coupon_id`,`module_id`),
|
||||
INDEX `fk_module_id_idx` (`module_id`),
|
||||
CONSTRAINT `fk_coupon_module_coupon_id`
|
||||
FOREIGN KEY (`coupon_id`)
|
||||
REFERENCES `coupon` (`id`)
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_coupon_module_module_id`
|
||||
FOREIGN KEY (`module_id`)
|
||||
REFERENCES `module` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `order_coupon_country`;
|
||||
|
||||
CREATE TABLE `order_coupon_country`
|
||||
(
|
||||
`coupon_id` INTEGER NOT NULL,
|
||||
`country_id` INTEGER NOT NULL,
|
||||
PRIMARY KEY (`coupon_id`,`country_id`),
|
||||
INDEX `fk_country_id_idx` (`country_id`),
|
||||
CONSTRAINT `fk_order_coupon_country_country_id`
|
||||
FOREIGN KEY (`country_id`)
|
||||
REFERENCES `country` (`id`)
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_order_coupon_country_coupon_id`
|
||||
FOREIGN KEY (`coupon_id`)
|
||||
REFERENCES `order_coupon` (`id`)
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
DROP TABLE IF EXISTS `order_coupon_module`;
|
||||
|
||||
CREATE TABLE `order_coupon_module`
|
||||
(
|
||||
`coupon_id` INTEGER NOT NULL,
|
||||
`module_id` INTEGER NOT NULL,
|
||||
PRIMARY KEY (`coupon_id`,`module_id`),
|
||||
INDEX `fk_module_id_idx` (`module_id`),
|
||||
CONSTRAINT `fk_coupon_module_coupon_id0`
|
||||
FOREIGN KEY (`coupon_id`)
|
||||
REFERENCES `order_coupon` (`id`)
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_coupon_module_module_id0`
|
||||
FOREIGN KEY (`module_id`)
|
||||
REFERENCES `module` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
# Per customer usage count
|
||||
# ------------------------
|
||||
|
||||
# Add new column to coupon tables (coupon, order_coupon, coupon_version)
|
||||
|
||||
ALTER TABLE `coupon` ADD `per_customer_usage_count` BOOLEAN NOT NULL DEFAULT FALSE AFTER `serialized_conditions`;
|
||||
ALTER TABLE `order_coupon` ADD `per_customer_usage_count` BOOLEAN NOT NULL DEFAULT FALSE AFTER `serialized_conditions`;
|
||||
ALTER TABLE `coupon_version` ADD `per_customer_usage_count` BOOLEAN NOT NULL DEFAULT FALSE AFTER `serialized_conditions`;
|
||||
|
||||
DROP TABLE IF EXISTS `coupon_customer_count`;
|
||||
|
||||
CREATE TABLE `coupon_customer_count`
|
||||
(
|
||||
`coupon_id` INTEGER NOT NULL,
|
||||
`customer_id` INTEGER NOT NULL,
|
||||
`count` INTEGER DEFAULT 0 NOT NULL,
|
||||
INDEX `fk_coupon_customer_customer_id_idx` (`customer_id`),
|
||||
INDEX `fk_coupon_customer_coupon_id_idx` (`coupon_id`),
|
||||
CONSTRAINT `fk_coupon_customer_customer_id`
|
||||
FOREIGN KEY (`customer_id`)
|
||||
REFERENCES `customer` (`id`)
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_coupon_customer_coupon_id`
|
||||
FOREIGN KEY (`coupon_id`)
|
||||
REFERENCES `coupon` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
SELECT @max := MAX(`id`) FROM `country`;
|
||||
SET @max := @max+1;
|
||||
|
||||
INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `by_default`, `shop_country`, `created_at`, `updated_at`) VALUES
|
||||
(@max, 5, '344', 'HK', 'HKG', 0, 0, NOW(), NOW());
|
||||
|
||||
INSERT INTO `country_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max, '{$locale}', {intl l='Hong Kong' locale=$locale}, '', '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
590
setup/update/tpl/2.0.3-beta.sql.tpl
Normal file
590
setup/update/tpl/2.0.3-beta.sql.tpl
Normal file
@@ -0,0 +1,590 @@
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.3-beta' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='beta' WHERE `name`='thelia_extra_version';
|
||||
|
||||
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('store_description', '', 0, 0, NOW(), NOW());
|
||||
|
||||
# default available stock
|
||||
|
||||
SELECT @max := MAX(`id`) FROM `config`;
|
||||
|
||||
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('default_available_stock', '100', 0, 0, NOW(), NOW()),
|
||||
('information_folder_id', '', 0, 0, NOW(), NOW()),
|
||||
('terms_conditions_content_id', '', 0, 0, NOW(), NOW());
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max + 1, '{$locale}', {intl l='Default available stock when check-available-stock is set to 0.' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max + 2, '{$locale}', {intl l='The ID of the folder containing your information pages : terms, imprint, ...' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max + 3, '{$locale}', {intl l='The ID of the \'Terms & Conditions\' content.' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
# Add new column to order (version, version_created_at, version_created_by)
|
||||
|
||||
ALTER TABLE `order` ADD `version` INT DEFAULT 0 AFTER `updated_at`;
|
||||
ALTER TABLE `order` ADD `version_created_at` DATE AFTER `version`;
|
||||
ALTER TABLE `order` ADD `version_created_by` VARCHAR(100) AFTER `version_created_at`;
|
||||
|
||||
ALTER TABLE `order_address`
|
||||
ADD CONSTRAINT `fk_order_address_customer_title_id`
|
||||
FOREIGN KEY (`customer_title_id`)
|
||||
REFERENCES `customer_title` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT
|
||||
;
|
||||
ALTER TABLE `order_address`
|
||||
ADD CONSTRAINT `fk_order_address_country_id`
|
||||
FOREIGN KEY (`country_id`)
|
||||
REFERENCES `country` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT
|
||||
;
|
||||
|
||||
DROP TABLE IF EXISTS `order_version`;
|
||||
|
||||
CREATE TABLE `order_version`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`ref` VARCHAR(45),
|
||||
`customer_id` INTEGER NOT NULL,
|
||||
`invoice_order_address_id` INTEGER NOT NULL,
|
||||
`delivery_order_address_id` INTEGER NOT NULL,
|
||||
`invoice_date` DATE,
|
||||
`currency_id` INTEGER NOT NULL,
|
||||
`currency_rate` FLOAT NOT NULL,
|
||||
`transaction_ref` VARCHAR(100) COMMENT 'transaction reference - usually use to identify a transaction with banking modules',
|
||||
`delivery_ref` VARCHAR(100) COMMENT 'delivery reference - usually use to identify a delivery progress on a distant delivery tracker website',
|
||||
`invoice_ref` VARCHAR(100) COMMENT 'the invoice reference',
|
||||
`discount` FLOAT,
|
||||
`postage` FLOAT NOT NULL,
|
||||
`payment_module_id` INTEGER NOT NULL,
|
||||
`delivery_module_id` INTEGER NOT NULL,
|
||||
`status_id` INTEGER NOT NULL,
|
||||
`lang_id` INTEGER NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
`version` INTEGER DEFAULT 0 NOT NULL,
|
||||
`version_created_at` DATETIME,
|
||||
`version_created_by` VARCHAR(100),
|
||||
PRIMARY KEY (`id`,`version`),
|
||||
CONSTRAINT `order_version_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `order` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
UPDATE `order` SET
|
||||
`version` = 1,
|
||||
`version_created_at` = NOW(),
|
||||
`version_created_by` = 'Thelia'
|
||||
WHERE `version` = 0;
|
||||
|
||||
INSERT INTO `order_version`(
|
||||
`id`,
|
||||
`ref`,
|
||||
`customer_id`,
|
||||
`invoice_order_address_id`,
|
||||
`delivery_order_address_id`,
|
||||
`invoice_date`,
|
||||
`currency_id`,
|
||||
`currency_rate`,
|
||||
`transaction_ref`,
|
||||
`delivery_ref`,
|
||||
`invoice_ref`,
|
||||
`discount`,
|
||||
`postage`,
|
||||
`payment_module_id`,
|
||||
`delivery_module_id`,
|
||||
`status_id`,
|
||||
`lang_id`,
|
||||
`created_at`,
|
||||
`updated_at`,
|
||||
`version`,
|
||||
`version_created_at`,
|
||||
`version_created_by`)
|
||||
SELECT
|
||||
`id`,
|
||||
`ref`,
|
||||
`customer_id`,
|
||||
`invoice_order_address_id`,
|
||||
`delivery_order_address_id`,
|
||||
`invoice_date`,
|
||||
`currency_id`,
|
||||
`currency_rate`,
|
||||
`transaction_ref`,
|
||||
`delivery_ref`,
|
||||
`invoice_ref`,
|
||||
`discount`,
|
||||
`postage`,
|
||||
`payment_module_id`,
|
||||
`delivery_module_id`,
|
||||
`status_id`,
|
||||
`lang_id`,
|
||||
`created_at`,
|
||||
`updated_at`,
|
||||
`version`,
|
||||
`version_created_at`,
|
||||
`version_created_by`
|
||||
FROM `order`;
|
||||
|
||||
|
||||
# Add missing columns to coupon (version_created_at, version_created_by)
|
||||
ALTER TABLE `coupon` ADD `version_created_at` DATE AFTER `version`;
|
||||
ALTER TABLE `coupon` ADD `version_created_by` VARCHAR(100) AFTER `version_created_at`;
|
||||
|
||||
ALTER TABLE `coupon_version` ADD `version_created_at` DATE AFTER `version`;
|
||||
ALTER TABLE `coupon_version` ADD `version_created_by` VARCHAR(100) AFTER `version_created_at`;
|
||||
|
||||
# Add coupon_customer_count table
|
||||
# -------------------------------
|
||||
|
||||
ALTER TABLE `coupon_customer_count`
|
||||
DROP FOREIGN KEY `fk_coupon_customer_customer_id`;
|
||||
|
||||
ALTER TABLE `coupon_customer_count`
|
||||
DROP FOREIGN KEY `fk_coupon_customer_coupon_id`;
|
||||
|
||||
ALTER TABLE `coupon_customer_count`
|
||||
ADD CONSTRAINT `fk_coupon_customer_customer_id`
|
||||
FOREIGN KEY (`customer_id`)
|
||||
REFERENCES `customer` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `coupon_customer_count`
|
||||
ADD CONSTRAINT `fk_coupon_customer_coupon_id`
|
||||
FOREIGN KEY (`coupon_id`)
|
||||
REFERENCES `coupon` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Add Brand tables and related resources
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
# Add the "brand" resource
|
||||
INSERT INTO resource (`code`, `created_at`, `updated_at`) VALUES ('admin.brand', NOW(), NOW());
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- brand
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `brand`;
|
||||
|
||||
CREATE TABLE `brand`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`visible` TINYINT,
|
||||
`position` INTEGER,
|
||||
`logo_image_id` INTEGER,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `fk_brand_brand_image_idx` (`logo_image_id`),
|
||||
CONSTRAINT `fk_logo_image_id_brand_image`
|
||||
FOREIGN KEY (`logo_image_id`)
|
||||
REFERENCES `brand_image` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE SET NULL
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- brand_document
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `brand_document`;
|
||||
|
||||
CREATE TABLE `brand_document`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`brand_id` INTEGER NOT NULL,
|
||||
`file` VARCHAR(255) NOT NULL,
|
||||
`position` INTEGER,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_brand_document_brand_id` (`brand_id`),
|
||||
CONSTRAINT `fk_brand_document_brand_id`
|
||||
FOREIGN KEY (`brand_id`)
|
||||
REFERENCES `brand` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- brand_image
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `brand_image`;
|
||||
|
||||
CREATE TABLE `brand_image`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`brand_id` INTEGER NOT NULL,
|
||||
`file` VARCHAR(255) NOT NULL,
|
||||
`position` INTEGER,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_brand_image_brand_id` (`brand_id`),
|
||||
CONSTRAINT `fk_brand_image_brand_id`
|
||||
FOREIGN KEY (`brand_id`)
|
||||
REFERENCES `brand` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- brand_i18n
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `brand_i18n`;
|
||||
|
||||
CREATE TABLE `brand_i18n`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255),
|
||||
`description` LONGTEXT,
|
||||
`chapo` TEXT,
|
||||
`postscriptum` TEXT,
|
||||
`meta_title` VARCHAR(255),
|
||||
`meta_description` TEXT,
|
||||
`meta_keywords` TEXT,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `brand_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `brand` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- brand_document_i18n
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `brand_document_i18n`;
|
||||
|
||||
CREATE TABLE `brand_document_i18n`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255),
|
||||
`description` LONGTEXT,
|
||||
`chapo` TEXT,
|
||||
`postscriptum` TEXT,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `brand_document_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `brand_document` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- brand_image_i18n
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `brand_image_i18n`;
|
||||
|
||||
CREATE TABLE `brand_image_i18n`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255),
|
||||
`description` LONGTEXT,
|
||||
`chapo` TEXT,
|
||||
`postscriptum` TEXT,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `brand_image_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `brand_image` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------
|
||||
-- Add brand field to product table, and related constraint.
|
||||
-- ---------------------------------------------------------
|
||||
|
||||
ALTER TABLE `product` ADD `brand_id` INTEGER AFTER `template_id`;
|
||||
ALTER TABLE `product` ADD CONSTRAINT `fk_product_brand` FOREIGN KEY (`brand_id`) REFERENCES `brand` (`id`) ON DELETE SET NULL;
|
||||
|
||||
ALTER TABLE `product_version` ADD `brand_id` INTEGER AFTER `template_id`;
|
||||
ALTER TABLE `product_version` ADD CONSTRAINT `fk_product_version_brand` FOREIGN KEY (`brand_id`) REFERENCES `brand` (`id`) ON DELETE SET NULL;
|
||||
|
||||
|
||||
# Add html_output_trim_level config variable
|
||||
# ------------------------------------------
|
||||
|
||||
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('html_output_trim_level','1', 0, 0, NOW(), NOW());
|
||||
|
||||
SELECT @max := MAX(`id`) FROM `config`;
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
(@max, 'en_US', 'Whitespace trim level of the generated HTML code (0 = none, 1 = medium, 2 = maximum)', NULL, NULL, NULL);
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- form_firewall
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `form_firewall`;
|
||||
|
||||
CREATE TABLE `form_firewall`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`form_name` VARCHAR(255) NOT NULL,
|
||||
`ip_address` VARCHAR(15) NOT NULL,
|
||||
`attempts` TINYINT DEFAULT 1,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_form_firewall_form_name` (`form_name`),
|
||||
INDEX `idx_form_firewall_ip_address` (`ip_address`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- import_category
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `import_category`;
|
||||
|
||||
CREATE TABLE `import_category`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`ref` VARCHAR(255) NOT NULL,
|
||||
`position` INTEGER NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `ref_UNIQUE` (`ref`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- export_category
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `export_category`;
|
||||
|
||||
CREATE TABLE `export_category`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`ref` VARCHAR(255) NOT NULL,
|
||||
`position` INTEGER NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `ref_UNIQUE` (`ref`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- import
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `import`;
|
||||
|
||||
CREATE TABLE `import`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`ref` VARCHAR(255) NOT NULL,
|
||||
`import_category_id` INTEGER NOT NULL,
|
||||
`position` INTEGER NOT NULL,
|
||||
`handle_class` LONGTEXT NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `ref_UNIQUE` (`ref`),
|
||||
INDEX `idx_import_import_category_id` (`import_category_id`),
|
||||
CONSTRAINT `fk_import_import_category_id`
|
||||
FOREIGN KEY (`import_category_id`)
|
||||
REFERENCES `import_category` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- export
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `export`;
|
||||
|
||||
CREATE TABLE `export`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`ref` VARCHAR(255) NOT NULL,
|
||||
`export_category_id` INTEGER NOT NULL,
|
||||
`position` INTEGER NOT NULL,
|
||||
`handle_class` LONGTEXT NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `ref_UNIQUE` (`ref`),
|
||||
INDEX `idx_export_export_category_id` (`export_category_id`),
|
||||
CONSTRAINT `fk_export_export_category_id`
|
||||
FOREIGN KEY (`export_category_id`)
|
||||
REFERENCES `export_category` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- import_category_i18n
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `import_category_i18n`;
|
||||
|
||||
CREATE TABLE `import_category_i18n`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `import_category_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `import_category` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- export_category_i18n
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `export_category_i18n`;
|
||||
|
||||
CREATE TABLE `export_category_i18n`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `export_category_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `export_category` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- import_i18n
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `import_i18n`;
|
||||
|
||||
CREATE TABLE `import_i18n`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
`description` LONGTEXT,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `import_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `import` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- export_i18n
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `export_i18n`;
|
||||
|
||||
CREATE TABLE `export_i18n`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
`description` LONGTEXT,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `export_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `export` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
|
||||
|
||||
INSERT INTO `config`(`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
('form_firewall_bruteforce_time_to_wait', '10', 0, 0, NOW(), NOW()),
|
||||
('form_firewall_time_to_wait', '60', 0, 0, NOW(), NOW()),
|
||||
('form_firewall_bruteforce_attempts', '10', 0, 0, NOW(), NOW()),
|
||||
('form_firewall_attempts', '6', 0, 0, NOW(), NOW()),
|
||||
('form_firewall_active', '1', 0, 0, NOW(), NOW())
|
||||
;
|
||||
|
||||
SELECT @bf_time := `id` FROM `config` WHERE `name` = 'form_firewall_bruteforce_time_to_wait';
|
||||
SELECT @time := `id` FROM `config` WHERE `name` = 'form_firewall_time_to_wait';
|
||||
SELECT @bf_attempts := `id` FROM `config` WHERE `name` = 'form_firewall_bruteforce_attempts';
|
||||
SELECT @attempts := `id` FROM `config` WHERE `name` = 'form_firewall_attempts';
|
||||
SELECT @active := `id` FROM `config` WHERE `name` = 'form_firewall_active';
|
||||
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
(@time, 'en_US', '[Firewall] Time to wait between X attempts', NULL, NULL, NULL),
|
||||
(@time, 'fr_FR', '[Pare-feu] Temps à attendre entre X essais', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
(@bf_time, 'en_US', '[Firewall/Bruteforce] Time to wait between X attempts', NULL, NULL, NULL),
|
||||
(@bf_time, 'fr_FR', '[Pare-feu/Bruteforce] Temps à attendre entre X essais', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
(@attempts, 'en_US', '[Firewall] Number of allowed attemps', NULL, NULL, NULL),
|
||||
(@attempts, 'fr_FR', '[Pare-feu] Nombre de tentatives autorisées', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
(@bf_attempts, 'en_US', '[Firewall/Bruteforce] Number of allowed attemps', NULL, NULL, NULL),
|
||||
(@bf_attempts, 'fr_FR', '[Pare-feu/Bruteforce] Nombre de tentatives autorisées', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
(@active, 'en_US', '[Firewall] Activate the firewall', NULL, NULL, NULL),
|
||||
(@active, 'fr_FR', '[Pare-feu] Activer le pare-feu', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- missing config_i18n translation for standards variables.
|
||||
-- ---------------------------------------------------------------------
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
(1, 'fr_FR', 'Nom de la classe du gestionnaire de session', NULL, NULL, NULL),
|
||||
(2, 'fr_FR', 'Vérifier la présence de produits en stock (1) ou l''ignorer (0) lors de l''affichage et la modification des quantités commandées', NULL, NULL, NULL),
|
||||
(3, 'fr_FR', 'Nom du modèle de front-office actif', NULL, NULL, NULL),
|
||||
(4, 'fr_FR', 'Nom du modèle de back-office actif', NULL, NULL, NULL),
|
||||
(5, 'fr_FR', 'Nom du modèle PDF actif', NULL, NULL, NULL),
|
||||
(6, 'fr_FR', 'Nom du modèle d''e-mail actif', NULL, NULL, NULL),
|
||||
(7, 'fr_FR', 'Activer (1) ou désactiver (0) la réécriture d''URL', NULL, NULL, NULL),
|
||||
(8, 'fr_FR', 'Nom du pilote graphique utilisé par la bibliothèque Imagine (voir https://imagine.readthedocs.org)', NULL, NULL, NULL),
|
||||
(9, 'fr_FR', 'La qualité par défaut (en %) dans les images générées', NULL, NULL, NULL),
|
||||
(10, 'fr_FR', 'Comment les images originales (pleine résolution) sont-elles fournises dans l''espace web (lien symbolique ou copie)', NULL, NULL, NULL),
|
||||
(11, 'fr_FR', 'Comment les documents sont-ils fournis dans l''espace web (lien symbolique ou copie)', NULL, NULL, NULL),
|
||||
(12, 'fr_FR', 'Chemin vers le répertoire où les images sont stockées', NULL, NULL, NULL),
|
||||
(13, 'fr_FR', 'Chemin vers le répertoire où sont stockés les documents', NULL, NULL, NULL),
|
||||
(14, 'fr_FR', 'Chemin vers le répertoire de cache d''image dans l''espace web', NULL, NULL, NULL),
|
||||
(15, 'fr_FR', 'Chemin d''accès au répertoire de cache de document dans l''espace web', NULL, NULL, NULL),
|
||||
(16, 'fr_FR', 'L''URL pour mettre à jour les taux de change', NULL, NULL, NULL),
|
||||
(17, 'fr_FR', 'Nom de la page 404 (introuvable) dans le modèle actuel (avec l''extension, par exemple, 404.html)', NULL, NULL, NULL),
|
||||
(18, 'fr_FR', 'Nom de la page du modèle retournée lorsqu''une URL obsolète (ou inactive) est invoquée', NULL, NULL, NULL),
|
||||
(19, 'fr_FR', 'Affiche et traite les prix avec(0) ou sans (1) les taxes', NULL, NULL, NULL),
|
||||
(20, 'fr_FR', 'Compiler les resources du modèle actif à chaque changement (1 = oui, 2 = non)', NULL, NULL, NULL),
|
||||
(21, 'fr_FR', 'Nom du cookie "Remember me" pour les utilisateurs d''administration', NULL, NULL, NULL),
|
||||
(22, 'fr_FR', 'Délai d''expiration du cookie "Remember me", en secondes, pour les utilisateurs d''administration', NULL, NULL, NULL),
|
||||
(23, 'fr_FR', 'Nom du cookie "Remember me" pour les clients', NULL, NULL, NULL),
|
||||
(24, 'fr_FR', 'Délai d''expiration du cookie "Remember me", en secondes, pour les clients', NULL, NULL, NULL),
|
||||
(25, 'fr_FR', 'URL de base pour la boutique (par exemple http://www.yourshopdomain.com)', NULL, NULL, NULL),
|
||||
(26, 'fr_FR', 'Nom de la vue de la facture dans le modèle PDF en cours (sans extension)', NULL, NULL, NULL),
|
||||
(27, 'fr_FR', 'Nom de la vue de la livraison dans le modèle PDF en cours (sans extension)', NULL, NULL, NULL),
|
||||
(28, 'fr_FR', 'Le chemin (par rapport au modèle de back-office par défaut) vers l''image utilisée lorsque aucune image de drapeau ne peut être trouvée pour un pays', NULL, NULL, NULL),
|
||||
(29, 'fr_FR', 'Niveau de découpe des espaces dans le code HTML généré (0 = aucun, 1 = moyen, 2 = maximum)', NULL, NULL, NULL);
|
||||
|
||||
# Done !
|
||||
# ------
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.0.3-beta2.sql.tpl
Normal file
9
setup/update/tpl/2.0.3-beta2.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.3-beta2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='beta2' WHERE `name`='thelia_extra_version';
|
||||
|
||||
ALTER TABLE `export` ADD INDEX `fk_export_1_idx` (`export_category_id`);
|
||||
ALTER TABLE `import` ADD INDEX `fk_import_1_idx` (`import_category_id`);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
6
setup/update/tpl/2.0.3.sql.tpl
Normal file
6
setup/update/tpl/2.0.3.sql.tpl
Normal file
@@ -0,0 +1,6 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.3' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
42
setup/update/tpl/2.0.4.sql.tpl
Normal file
42
setup/update/tpl/2.0.4.sql.tpl
Normal file
@@ -0,0 +1,42 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
# ======================================================================================================================
|
||||
# Add relation between order and cart
|
||||
# ======================================================================================================================
|
||||
ALTER TABLE `order`
|
||||
ADD COLUMN `cart_id` INTEGER NOT NULL
|
||||
AFTER `lang_id`
|
||||
;
|
||||
|
||||
ALTER TABLE `order_version`
|
||||
ADD COLUMN `cart_id` INTEGER NOT NULL
|
||||
AFTER `lang_id`
|
||||
;
|
||||
|
||||
ALTER TABLE `order`
|
||||
ADD CONSTRAINT `fk_order_cart_id`
|
||||
FOREIGN KEY (`cart_id`) REFERENCES `cart`(`id`)
|
||||
;
|
||||
|
||||
ALTER TABLE `order`
|
||||
ADD INDEX idx_order_cart_fk
|
||||
(`cart_id`)
|
||||
;
|
||||
|
||||
# ======================================================================================================================
|
||||
# Add product_sale_elements_id IN order_product
|
||||
# ======================================================================================================================
|
||||
|
||||
ALTER TABLE `order_product`
|
||||
ADD `product_sale_elements_id` INT NOT NULL
|
||||
AFTER `product_sale_elements_ref`;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.4' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
# ======================================================================================================================
|
||||
# End of changes
|
||||
# ======================================================================================================================
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
24
setup/update/tpl/2.0.5.sql.tpl
Normal file
24
setup/update/tpl/2.0.5.sql.tpl
Normal file
@@ -0,0 +1,24 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
ALTER TABLE `order` DROP FOREIGN KEY `fk_order_cart_id`;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.5' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='5' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
UPDATE `config` SET `name`='form_firewall_active' WHERE `name`='from_firewall_active';
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `resource`;
|
||||
|
||||
INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'admin.search', NOW(), NOW());
|
||||
|
||||
INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Search' locale=$locale}){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
8
setup/update/tpl/2.0.6.sql.tpl
Normal file
8
setup/update/tpl/2.0.6.sql.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.6' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='6' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
8
setup/update/tpl/2.0.7.sql.tpl
Normal file
8
setup/update/tpl/2.0.7.sql.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.7' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='7' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
8
setup/update/tpl/2.0.8.sql.tpl
Normal file
8
setup/update/tpl/2.0.8.sql.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.8' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='8' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
8
setup/update/tpl/2.0.9.sql.tpl
Normal file
8
setup/update/tpl/2.0.9.sql.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.0.9' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='9' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
1616
setup/update/tpl/2.1.0-alpha1.sql.tpl
Normal file
1616
setup/update/tpl/2.1.0-alpha1.sql.tpl
Normal file
File diff suppressed because it is too large
Load Diff
118
setup/update/tpl/2.1.0-alpha2.sql.tpl
Normal file
118
setup/update/tpl/2.1.0-alpha2.sql.tpl
Normal file
@@ -0,0 +1,118 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.0-alpha2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='alpha2' WHERE `name`='thelia_extra_version';
|
||||
|
||||
UPDATE `config` SET `name`='form_firewall_active' WHERE `name`='from_firewall_active';
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `config`;
|
||||
|
||||
INSERT INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'cart.use_persistent_cookie', '1', 0, 0, NOW(), NOW()),
|
||||
(@max_id + 2, 'cart.cookie_name', 'thelia_cart', 0, 0, NOW(), NOW()),
|
||||
(@max_id + 3, 'cart.cookie_lifetime', '31536060', 0, 0, NOW(), NOW()),
|
||||
(@max_id + 4, 'allow_slash_ended_uri', 1, 0, 0, NOW(), NOW())
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Use a persistent cookie to keep track of customer cart' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 2, '{$locale}', {intl l='Name the cart cookie' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 3, '{$locale}', {intl l='Life time of the cart cookie in the customer browser, in seconds' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 4, '{$locale}', {intl l='Allow slash ended uri' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
DELETE FROM `config` WHERE `name`='currency_rate_update_url';
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'order-edit.cart-top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+2, 'order-edit.cart-bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+3, 'order-edit.bill-top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+4, 'order-edit.bill-bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+5, 'order-edit.before-order-product-list', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+6, 'order-edit.before-order-product-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+7, 'order-edit.after-order-product-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+8, 'order-edit.after-order-product-list', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+9, 'sales.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+10, 'sales.table-header', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+11, 'sales.table-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+12, 'sales.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+13, 'sale.create-form', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+14, 'sale.delete-form', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+15, 'sales.js', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+16, 'product.combinations-row', 2, 0, 1, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+17, 'main.before-content', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+18, 'main.after-content', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Order - cart top' locale=$locale}, '', ''),
|
||||
(@max_id+2, '{$locale}', {intl l='Order - cart bottom' locale=$locale}, '', ''),
|
||||
(@max_id+3, '{$locale}', {intl l='Order - bill top' locale=$locale}, '', ''),
|
||||
(@max_id+4, '{$locale}', {intl l='Order - bill bottom' locale=$locale}, '', ''),
|
||||
(@max_id+5, '{$locale}', {intl l='Order - Before product list' locale=$locale}, '', ''),
|
||||
(@max_id+6, '{$locale}', {intl l='Order - Before starting product row' locale=$locale}, '', ''),
|
||||
(@max_id+7, '{$locale}', {intl l='Order - After closing product row' locale=$locale}, '', ''),
|
||||
(@max_id+8, '{$locale}', {intl l='Order - After product list' locale=$locale}, '', ''),
|
||||
(@max_id+9, '{$locale}', {intl l='Sales - at the top' locale=$locale}, '', ''),
|
||||
(@max_id+10, '{$locale}', {intl l='Sales - table header' locale=$locale}, '', ''),
|
||||
(@max_id+11, '{$locale}', {intl l='Sales - table row' locale=$locale}, '', ''),
|
||||
(@max_id+12, '{$locale}', {intl l='Sales - at the bottom' locale=$locale}, '', ''),
|
||||
(@max_id+13, '{$locale}', {intl l='Sale - create form' locale=$locale}, '', ''),
|
||||
(@max_id+14, '{$locale}', {intl l='Sale - delete form' locale=$locale}, '', ''),
|
||||
(@max_id+15, '{$locale}', {intl l='Sales - JavaScript' locale=$locale}, '', ''),
|
||||
(@max_id+16, '{$locale}', {intl l='Product - at the bottom of a product combination' locale=$locale}, '', ''),
|
||||
(@max_id+17, '{$locale}', {intl l='Layout - Before the main content' locale=$locale}, '', ''),
|
||||
(@max_id+18, '{$locale}', {intl l='Admin layout - After the main content' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
# ======================================================================================================================
|
||||
# Module version, min & max Thelia version supported
|
||||
# ======================================================================================================================
|
||||
|
||||
ALTER TABLE `module`
|
||||
ADD COLUMN `category` VARCHAR(50) DEFAULT 'classic' NOT NULL
|
||||
AFTER `type`
|
||||
;
|
||||
|
||||
UPDATE `module` SET `category` = 'classic' WHERE `type` = 1;
|
||||
UPDATE `module` SET `category` = 'delivery' WHERE `type` = 2;
|
||||
UPDATE `module` SET `category` = 'payment' WHERE `type` = 3;
|
||||
|
||||
ALTER TABLE `module`
|
||||
ADD COLUMN `version` VARCHAR(10) DEFAULT '' NOT NULL
|
||||
AFTER `code`
|
||||
;
|
||||
|
||||
UPDATE `country` SET `isoalpha2` = 'BH' WHERE `isoalpha3` = 'BHR';
|
||||
UPDATE `country` SET `isoalpha2` = 'MG' WHERE `isoalpha3` = 'MDG';
|
||||
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `module`;
|
||||
SELECT @max_classic_position := IFNULL(MAX(`position`),0) FROM `module` WHERE `type`=1;
|
||||
|
||||
|
||||
INSERT INTO `module` (`id`, `code`, `type`, `activate`, `position`, `full_namespace`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'TheliaSmarty', 1, 1, @max_classic_position+1, 'TheliaSmarty\\TheliaSmarty', NOW(), NOW()),
|
||||
(@max_id+2, 'VirtualProductControl', 1, 1, @max_classic_position+2, 'VirtualProductControl\\VirtualProductControl', NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `module_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Smarty template engine integration' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id+2, '{$locale}', {intl l='Virtual Product Controller' locale=$locale}, {intl l='Check if a virtual product delivery module is enabled if at least one product is virtual' locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
160
setup/update/tpl/2.1.0-beta1.sql.tpl
Normal file
160
setup/update/tpl/2.1.0-beta1.sql.tpl
Normal file
@@ -0,0 +1,160 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.0-beta1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='beta1' WHERE `name`='thelia_extra_version';
|
||||
|
||||
DELETE FROM `config` WHERE `name`='session_config.handlers';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `api`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`label` VARCHAR(255),
|
||||
`api_key` VARCHAR(100),
|
||||
`profile_id` INTEGER,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_api_profile_id` (`profile_id`),
|
||||
CONSTRAINT `fk_api_profile_id`
|
||||
FOREIGN KEY (`profile_id`)
|
||||
REFERENCES `profile` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `config`;
|
||||
|
||||
-- Add the session_config.lifetime configuration variable
|
||||
INSERT INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'session_config.lifetime', '0', 0, 0, NOW(), NOW()),
|
||||
(@max_id + 2, 'error_message.show', '1', 0, 0, NOW(), NOW()),
|
||||
(@max_id + 3, 'error_message.page_name', 'error.html', 0, 0, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Life time of the session cookie in the customer browser, in seconds' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 2, '{$locale}', {intl l='Show error message instead of a white page on a server error' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 3, '{$locale}', {intl l='Filename of the error page' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Hide the session_config.handlers configuration variable
|
||||
UPDATE `config` SET `secured`=1, `hidden`=1 where `name`='session_config.handlers';
|
||||
|
||||
-- Hooks
|
||||
|
||||
-- front hooks
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`)
|
||||
VALUES
|
||||
(@max_id + 1, 'category.content-top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 2, 'category.content-bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 3, 'content.content-top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 4, 'content.content-bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 5, 'folder.content-top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 6, 'folder.content-bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 7, 'brand.top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 8, 'brand.bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 9, 'brand.main-top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 10, 'brand.main-bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 11, 'brand.content-top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 12, 'brand.content-bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 13, 'brand.stylesheet', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 14, 'brand.after-javascript-include', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 15, 'brand.javascript-initialization', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 16, 'brand.sidebar-top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 17, 'brand.sidebar-body', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 18, 'brand.sidebar-bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 19, 'account-order.top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 20, 'account-order.information', 1, 0, 1, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 21, 'account-order.after-information', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 22, 'account-order.delivery-information', 1, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 23, 'account-order.delivery-address', 1, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 24, 'account-order.invoice-information', 1, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 25, 'account-order.invoice-address', 1, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 26, 'account-order.after-addresses', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 27, 'account-order.products-top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 28, 'account-order.product-extra', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 29, 'account-order.products-bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 30, 'account-order.after-products', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 31, 'account-order.bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 32, 'account-order.stylesheet', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 33, 'account-order.after-javascript-include', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 34, 'account-order.javascript-initialization', 1, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Category page - before the main content area' locale=$locale}, '', ''),
|
||||
(@max_id + 2, '{$locale}', {intl l='Category page - after the main content area' locale=$locale}, '', ''),
|
||||
(@max_id + 3, '{$locale}', {intl l='Content page - before the main content area' locale=$locale}, '', ''),
|
||||
(@max_id + 4, '{$locale}', {intl l='Content page - after the main content area' locale=$locale}, '', ''),
|
||||
(@max_id + 5, '{$locale}', {intl l='Folder page - before the main content area' locale=$locale}, '', ''),
|
||||
(@max_id + 6, '{$locale}', {intl l='Folder page - after the main content area' locale=$locale}, '', ''),
|
||||
(@max_id + 7, '{$locale}', {intl l='Brands page - at the top' locale=$locale}, '', ''),
|
||||
(@max_id + 8, '{$locale}', {intl l='Brands page - at the bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 9, '{$locale}', {intl l='Brands page - at the top of the main area' locale=$locale}, '', ''),
|
||||
(@max_id + 10, '{$locale}', {intl l='Brands page - at the bottom of the main area' locale=$locale}, '', ''),
|
||||
(@max_id + 11, '{$locale}', {intl l='Brands page - before the main content area' locale=$locale}, '', ''),
|
||||
(@max_id + 12, '{$locale}', {intl l='Brands page - after the main content area' locale=$locale}, '', ''),
|
||||
(@max_id + 13, '{$locale}', {intl l='Brands page - CSS stylesheet' locale=$locale}, '', ''),
|
||||
(@max_id + 14, '{$locale}', {intl l='Brands page - after javascript include' locale=$locale}, '', ''),
|
||||
(@max_id + 15, '{$locale}', {intl l='Brands page - javascript initialization' locale=$locale}, '', ''),
|
||||
(@max_id + 16, '{$locale}', {intl l='Brands page - at the top of the sidebar' locale=$locale}, '', ''),
|
||||
(@max_id + 17, '{$locale}', {intl l='Brands page - the body of the sidebar' locale=$locale}, '', ''),
|
||||
(@max_id + 18, '{$locale}', {intl l='Brands page - at the bottom of the sidebar' locale=$locale}, '', ''),
|
||||
(@max_id + 19, '{$locale}', {intl l='Order details - at the top' locale=$locale}, '', ''),
|
||||
(@max_id + 20, '{$locale}', {intl l='Order details - additional information' locale=$locale}, '', ''),
|
||||
(@max_id + 21, '{$locale}', {intl l='Order details - after global information' locale=$locale}, '', ''),
|
||||
(@max_id + 22, '{$locale}', {intl l='Order details - additional delivery information' locale=$locale}, '', ''),
|
||||
(@max_id + 23, '{$locale}', {intl l='Order details - delivery address' locale=$locale}, '', ''),
|
||||
(@max_id + 24, '{$locale}', {intl l='Order details - additional invoice information' locale=$locale}, '', ''),
|
||||
(@max_id + 25, '{$locale}', {intl l='Order details - invoice address' locale=$locale}, '', ''),
|
||||
(@max_id + 26, '{$locale}', {intl l='Order details - after addresses' locale=$locale}, '', ''),
|
||||
(@max_id + 27, '{$locale}', {intl l='Order details - before products list' locale=$locale}, '', ''),
|
||||
(@max_id + 28, '{$locale}', {intl l='Order details - additional product information' locale=$locale}, '', ''),
|
||||
(@max_id + 29, '{$locale}', {intl l='Order details - after products list' locale=$locale}, '', ''),
|
||||
(@max_id + 30, '{$locale}', {intl l='Order details - after products' locale=$locale}, '', ''),
|
||||
(@max_id + 31, '{$locale}', {intl l='Order details - at the bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 32, '{$locale}', {intl l='Order details - CSS stylesheet' locale=$locale}, '', ''),
|
||||
(@max_id + 33, '{$locale}', {intl l='Order details - after javascript include' locale=$locale}, '', ''),
|
||||
(@max_id + 34, '{$locale}', {intl l='Order details - javascript initialization' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
|
||||
-- admin hooks
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'category.tab', 2, 0, 1, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 2, 'product.tab', 2, 0, 1, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 3, 'folder.tab', 2, 0, 1, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 4, 'content.tab', 2, 0, 1, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 5, 'brand.tab', 2, 0, 1, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 6, 'order-edit.bill-delivery-address', 2, 1, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Category - Tab' locale=$locale}, '', ''),
|
||||
(@max_id + 2, '{$locale}', {intl l='Product - Tab' locale=$locale}, '', ''),
|
||||
(@max_id + 3, '{$locale}', {intl l='Folder - Tab' locale=$locale}, '', ''),
|
||||
(@max_id + 4, '{$locale}', {intl l='Content - Tab' locale=$locale}, '', ''),
|
||||
(@max_id + 5, '{$locale}', {intl l='Brand - Tab' locale=$locale}, '', ''),
|
||||
(@max_id + 6, '{$locale}', {intl l='Order edit - delivery address' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
25
setup/update/tpl/2.1.0-beta2.sql.tpl
Normal file
25
setup/update/tpl/2.1.0-beta2.sql.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- Hooks
|
||||
|
||||
-- front hooks
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'account.additional', 1, 0, 1, 1, 1, 1, NOW(), NOW()),
|
||||
|
||||
(@max_id + 2, 'product.modification.form_top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 3, 'product.modification.form_bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Customer account - additional information' locale=$locale}, '', ''),
|
||||
(@max_id + 2, '{$locale}', {intl l='Product page - On the top of the form' locale=$locale}, '', ''),
|
||||
(@max_id + 3, '{$locale}', {intl l='Product page - On the bottom of the form' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
42
setup/update/tpl/2.1.0.sql.tpl
Normal file
42
setup/update/tpl/2.1.0.sql.tpl
Normal file
@@ -0,0 +1,42 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.0' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='cart.use_persistent_cookie';
|
||||
|
||||
-- Order
|
||||
|
||||
ALTER TABLE `order` ADD `postage_tax` FLOAT DEFAULT 0 NOT NULL AFTER `postage` ;
|
||||
ALTER TABLE `order` ADD `postage_tax_rule_title` VARCHAR(255) AFTER `postage_tax` ;
|
||||
|
||||
ALTER TABLE `order_version` ADD `postage_tax` FLOAT DEFAULT 0 NOT NULL AFTER `postage` ;
|
||||
ALTER TABLE `order_version` ADD `postage_tax_rule_title` VARCHAR(255) AFTER `postage_tax` ;
|
||||
|
||||
-- Hooks
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'brand.update-form', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 2, 'sale.edit-js', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 3, 'api.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 4, 'api.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 5, 'api.delete-form', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Brand edit page - in the form' locale=$locale}, '', ''),
|
||||
(@max_id + 2, '{$locale}', {intl l='Sale edit page - javascript last call block' locale=$locale}, '', ''),
|
||||
(@max_id + 3, '{$locale}', {intl l='Api page - at top' locale=$locale}, '', ''),
|
||||
(@max_id + 4, '{$locale}', {intl l='Api page - at bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 5, '{$locale}', {intl l='Api page - in deletion form' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
10
setup/update/tpl/2.1.1.sql.tpl
Normal file
10
setup/update/tpl/2.1.1.sql.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.1.10.sql.tpl
Normal file
9
setup/update/tpl/2.1.10.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.10' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='10' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.1.11.sql.tpl
Normal file
9
setup/update/tpl/2.1.11.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.11' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='11' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
46
setup/update/tpl/2.1.2.sql.tpl
Normal file
46
setup/update/tpl/2.1.2.sql.tpl
Normal file
@@ -0,0 +1,46 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SELECT @maxHookId := MAX(`id`) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@maxHookId + 1, 'coupon.delete-form', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@maxHookId + 1, '{$locale}', {intl l='Coupon page - in deletion form' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
UPDATE `config_i18n` SET `title`='Utiliser un cookie persistant pour memoriser le panier du client' WHERE `locale`='fr_FR' AND `id`=(SELECT`id` FROM `config` WHERE `name`='cart.use_persistent_cookie');
|
||||
|
||||
-- New ignored_module_hook table
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ignored_module_hook`
|
||||
(
|
||||
`module_id` INTEGER NOT NULL,
|
||||
`hook_id` INTEGER NOT NULL,
|
||||
`method` VARCHAR(255),
|
||||
`classname` VARCHAR(255),
|
||||
INDEX `fk_deleted_module_hook_module_id_idx` (`module_id`),
|
||||
INDEX `fk_deleted_module_hook_hook_id_idx` (`hook_id`),
|
||||
CONSTRAINT `fk_deleted_module_hook_module_id`
|
||||
FOREIGN KEY (`module_id`)
|
||||
REFERENCES `module` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_deleted_module_hook_hook_id`
|
||||
FOREIGN KEY (`hook_id`)
|
||||
REFERENCES `hook` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
16
setup/update/tpl/2.1.3.sql.tpl
Normal file
16
setup/update/tpl/2.1.3.sql.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.3' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `config`;
|
||||
|
||||
-- Add the session_config.lifetime configuration variable
|
||||
INSERT IGNORE INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'form.secret', 'ThisIsNotASecret', 0, 0, NOW(), NOW());
|
||||
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
24
setup/update/tpl/2.1.4.sql.tpl
Normal file
24
setup/update/tpl/2.1.4.sql.tpl
Normal file
@@ -0,0 +1,24 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.4' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SELECT @max_id := MAX(`id`) FROM hook;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'export.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+2, 'export.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `chapo`, `description`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l="Export modal or page - top" locale=$locale}, '', ''),
|
||||
(@max_id+2, '{$locale}', {intl l="Export modal or page - bottom" locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
29
setup/update/tpl/2.1.5.sql.tpl
Normal file
29
setup/update/tpl/2.1.5.sql.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.5' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='5' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
ALTER TABLE `category` CHANGE `parent` `parent` INT( 11 ) NULL DEFAULT '0';
|
||||
ALTER TABLE `category_version` CHANGE `parent` `parent` INT( 11 ) NULL DEFAULT '0';
|
||||
|
||||
SELECT @max_id := MAX(`id`) FROM hook;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'invoice.order-product', 3, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+2, 'delivery.order-product', 3, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `chapo`, `description`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Invoice - additional product information' locale=$locale}, '', ''),
|
||||
(@max_id+2, '{$locale}', {intl l='Delivery - additional product information' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
UPDATE `hook` SET `by_module` = 1 WHERE `code` = 'module.config-js';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
11
setup/update/tpl/2.1.6.sql.tpl
Normal file
11
setup/update/tpl/2.1.6.sql.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.6' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='6' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
UPDATE hook SET by_module = '1' WHERE hook.code = 'module.configuration';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
45
setup/update/tpl/2.1.7.sql.tpl
Normal file
45
setup/update/tpl/2.1.7.sql.tpl
Normal file
@@ -0,0 +1,45 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.7' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='7' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
ALTER TABLE `product_sale_elements_product_image` DROP FOREIGN KEY `fk_pse_product_image_product_sale_elements_id`;
|
||||
|
||||
ALTER TABLE product_sale_elements_product_image
|
||||
ADD CONSTRAINT `fk_pse_product_image_product_sale_elements_id`
|
||||
FOREIGN KEY (`product_sale_elements_id`)
|
||||
REFERENCES `product_sale_elements` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `product_sale_elements_product_image` DROP FOREIGN KEY `fk_pse_product_image_product_image_id`;
|
||||
|
||||
ALTER TABLE product_sale_elements_product_image
|
||||
ADD CONSTRAINT `fk_pse_product_image_product_image_id`
|
||||
FOREIGN KEY (`product_image_id`)
|
||||
REFERENCES `product_image` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `product_sale_elements_product_document` DROP FOREIGN KEY `fk_pse_product_document_product_sale_elements_id`;
|
||||
|
||||
ALTER TABLE product_sale_elements_product_document
|
||||
ADD CONSTRAINT `fk_pse_product_document_product_sale_elements_id`
|
||||
FOREIGN KEY (`product_sale_elements_id`)
|
||||
REFERENCES `product_sale_elements` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `product_sale_elements_product_document` DROP FOREIGN KEY `fk_pse_product_document_product_document_id`;
|
||||
|
||||
ALTER TABLE product_sale_elements_product_document
|
||||
ADD CONSTRAINT `fk_pse_product_document_product_document_id`
|
||||
FOREIGN KEY (`product_document_id`)
|
||||
REFERENCES `product_document` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.1.8.sql.tpl
Normal file
9
setup/update/tpl/2.1.8.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.8' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='8' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.1.9.sql.tpl
Normal file
9
setup/update/tpl/2.1.9.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.1.9' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='9' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
222
setup/update/tpl/2.2.0-alpha1.sql.tpl
Normal file
222
setup/update/tpl/2.2.0-alpha1.sql.tpl
Normal file
@@ -0,0 +1,222 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.0-alpha1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='alpha1' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- order status
|
||||
|
||||
SELECT @max_id := MAX(`id`) FROM `order_status`;
|
||||
|
||||
INSERT INTO `order_status` VALUES
|
||||
(@max_id + 1, "refunded", NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `order_status_i18n` VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, "{$locale}", {intl l="Refunded" locale=$locale}, "", "", ""){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- new column in admin_log
|
||||
|
||||
ALTER TABLE `admin_log` ADD `resource_id` INTEGER AFTER `resource` ;
|
||||
|
||||
-- new config
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `config`;
|
||||
|
||||
INSERT INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'customer_change_email', '0', 0, 0, NOW(), NOW()),
|
||||
(@max_id + 2, 'customer_confirm_email', '0', 0, 0, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Allow customers to change their email. 1 for yes, 0 for no' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 2, '{$locale}', {intl l='Ask the customers to confirm their email, 1 for yes, 0 for no' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- country area table
|
||||
|
||||
create table IF NOT EXISTS `country_area`
|
||||
(
|
||||
`country_id` INTEGER NOT NULL,
|
||||
`area_id` INTEGER NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
INDEX `country_area_area_id_idx` (`area_id`),
|
||||
INDEX `fk_country_area_country_id_idx` (`country_id`),
|
||||
CONSTRAINT `fk_country_area_area_id`
|
||||
FOREIGN KEY (`area_id`)
|
||||
REFERENCES `area` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_country_area_country_id`
|
||||
FOREIGN KEY (`country_id`)
|
||||
REFERENCES `country` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
-- Initialize the table with existing data
|
||||
INSERT INTO `country_area` (`country_id`, `area_id`, `created_at`, `updated_at`) select `id`, `area_id`, NOW(), NOW() FROM `country` WHERE `area_id` IS NOT NULL;
|
||||
|
||||
-- Remove area_id column from country table
|
||||
ALTER TABLE `country` DROP FOREIGN KEY `fk_country_area_id`;
|
||||
ALTER TABLE `country` DROP KEY `idx_country_area_id`;
|
||||
ALTER TABLE `country` DROP COLUMN `area_id`;
|
||||
ALTER TABLE `category` ADD COLUMN `default_template_id` INTEGER AFTER `position`;
|
||||
|
||||
-- new hook --
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'profile.table-header', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 2, 'profile.table-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 3, 'import.table-header', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 4, 'import.table-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 5, 'export.table-header', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 6, 'export.table-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 7, 'category-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 8, 'category-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 9, 'brand-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 10, 'brand-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 11, 'attribute-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 12, 'attribute-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 13, 'currency-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 14, 'currency-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 15, 'country-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 16, 'country-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 17, 'content-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 18, 'content-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 19, 'feature-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 20, 'feature-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 21, 'document-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 22, 'document-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 23, 'customer-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 24, 'customer-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 25, 'image-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 26, 'image-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 27, 'hook-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 28, 'hook-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 29, 'folder-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 30, 'folder-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 31, 'module-hook-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 32, 'module-hook-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 33, 'module-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 34, 'module-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 35, 'message-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 36, 'message-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 37, 'profile-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 38, 'profile-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 39, 'product-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 40, 'product-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 41, 'order-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 42, 'order-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 43, 'shipping-zones-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 44, 'shipping-zones-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 45, 'shipping-configuration-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 46, 'shipping-configuration-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 47, 'sale-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 48, 'sale-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 49, 'variables-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 50, 'variables-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 51, 'template-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 52, 'template-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 53, 'tax-rule-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 54, 'tax-rule-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 55, 'tax-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 56, 'tax-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 57, 'order-edit.product-list', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 58, 'order.tab', 2, 0, 1, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 59, 'account-order.product', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 60, 'tab-seo.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 61, 'tab-seo.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 62, 'tab-image.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 63, 'tab-image.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 64, 'tab-document.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 65, 'tab-document.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Profile - table header' locale=$locale}, '', ''),
|
||||
(@max_id + 2, '{$locale}', {intl l='Profile - table row' locale=$locale}, '', ''),
|
||||
(@max_id + 3, '{$locale}', {intl l='Import - table header' locale=$locale}, '', ''),
|
||||
(@max_id + 4, '{$locale}', {intl l='Import - table row' locale=$locale}, '', ''),
|
||||
(@max_id + 5, '{$locale}', {intl l='Export - table header' locale=$locale}, '', ''),
|
||||
(@max_id + 6, '{$locale}', {intl l='Export - table row' locale=$locale}, '', ''),
|
||||
(@max_id + 7, '{$locale}', {intl l='Category edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 8, '{$locale}', {intl l='Category edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 9, '{$locale}', {intl l='Brand edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 10, '{$locale}', {intl l='Brand edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 11, '{$locale}', {intl l='Attribute edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 12, '{$locale}', {intl l='Attribute edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 13, '{$locale}', {intl l='Currency edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 14, '{$locale}', {intl l='Currency edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 15, '{$locale}', {intl l='Country edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 16, '{$locale}', {intl l='Country edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 17, '{$locale}', {intl l='Content edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 18, '{$locale}', {intl l='Content edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 19, '{$locale}', {intl l='Feature edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 20, '{$locale}', {intl l='Feature edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 21, '{$locale}', {intl l='Document edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 22, '{$locale}', {intl l='Document edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 23, '{$locale}', {intl l='Client edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 24, '{$locale}', {intl l='Client edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 25, '{$locale}', {intl l='Image edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 26, '{$locale}', {intl l='Image edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 27, '{$locale}', {intl l='Hook edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 28, '{$locale}', {intl l='Hook edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 29, '{$locale}', {intl l='Folder edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 30, '{$locale}', {intl l='Folder edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 31, '{$locale}', {intl l='Module hook edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 32, '{$locale}', {intl l='Module hook edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 33, '{$locale}', {intl l='Module edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 34, '{$locale}', {intl l='Module edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 35, '{$locale}', {intl l='Message edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 36, '{$locale}', {intl l='Message edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 37, '{$locale}', {intl l='Profile edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 38, '{$locale}', {intl l='Profile edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 39, '{$locale}', {intl l='Product edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 40, '{$locale}', {intl l='Product edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 41, '{$locale}', {intl l='Order edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 42, '{$locale}', {intl l='Order edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 43, '{$locale}', {intl l='Shipping zones edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 44, '{$locale}', {intl l='Shipping zones edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 45, '{$locale}', {intl l='Shipping configuration edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 46, '{$locale}', {intl l='Shipping configuration edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 47, '{$locale}', {intl l='Sale edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 48, '{$locale}', {intl l='Sale edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 49, '{$locale}', {intl l='Variable edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 50, '{$locale}', {intl l='Variable edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 51, '{$locale}', {intl l='Template edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 52, '{$locale}', {intl l='Template edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 53, '{$locale}', {intl l='Tax rule edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 54, '{$locale}', {intl l='Tax rule edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 55, '{$locale}', {intl l='Tax edit - top' locale=$locale}, '', ''),
|
||||
(@max_id + 56, '{$locale}', {intl l='Tax edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 57, '{$locale}', {intl l='Order edit - displayed after product information' locale=$locale}, '', ''),
|
||||
(@max_id + 58, '{$locale}', {intl l='Order - Tab' locale=$locale}, '', ''),
|
||||
(@max_id + 59, '{$locale}', {intl l='Order details - after product' locale=$locale}, '', ''),
|
||||
(@max_id + 60, '{$locale}', {intl l='Tab SEO - top' locale=$locale}, '', ''),
|
||||
(@max_id + 61, '{$locale}', {intl l='Tab SEO - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 62, '{$locale}', {intl l='Tab image - top' locale=$locale}, '', ''),
|
||||
(@max_id + 63, '{$locale}', {intl l='Tab image - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 64, '{$locale}', {intl l='Tab document - top' locale=$locale}, '', ''),
|
||||
(@max_id + 65, '{$locale}', {intl l='Tab document - bottom' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Fix attribute_template and feature_template relations
|
||||
ALTER TABLE `attribute_template` DROP FOREIGN KEY `fk_attribute_template`; ALTER TABLE `attribute_template` ADD CONSTRAINT `fk_attribute_template` FOREIGN KEY (`template_id`) REFERENCES `template`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
|
||||
ALTER TABLE `feature_template` DROP FOREIGN KEY `fk_feature_template`; ALTER TABLE `feature_template` ADD CONSTRAINT `fk_feature_template` FOREIGN KEY (`template_id`) REFERENCES `template`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
36
setup/update/tpl/2.2.0-alpha2.sql.tpl
Normal file
36
setup/update/tpl/2.2.0-alpha2.sql.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.0-alpha2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='alpha2' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- Add cellphone column in order_address table
|
||||
ALTER TABLE `order_address` ADD COLUMN `cellphone` VARCHAR (20) AFTER `phone`;
|
||||
|
||||
-- new hook --
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'order-edit.customer-information-bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 2, 'order-edit.payment-module-bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 3, 'order-edit.delivery-module-bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 4, 'invoice.after-payment-module', 3, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 5, 'invoice.after-delivery-module', 3, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 6, 'delivery.after-delivery-module', 3, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Order - customer information bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 2, '{$locale}', {intl l='Order - payment module bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 3, '{$locale}', {intl l='Order - delivery module bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 4, '{$locale}', {intl l='Invoice - After payment module' locale=$locale}, NULL, NULL),
|
||||
(@max_id + 5, '{$locale}', {intl l='Invoice - After delivery module' locale=$locale}, NULL, NULL),
|
||||
(@max_id + 6, '{$locale}', {intl l='Delivery - After delivery module' locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
34
setup/update/tpl/2.2.0-beta1.sql.tpl
Normal file
34
setup/update/tpl/2.2.0-beta1.sql.tpl
Normal file
@@ -0,0 +1,34 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.0-beta1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='beta1' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- fix currency already created
|
||||
update currency set by_default = 0 where by_default is NULL;
|
||||
|
||||
ALTER TABLE `category_version` ADD COLUMN `default_template_id` INTEGER AFTER `position`;
|
||||
|
||||
-- new hook --
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'order-edit.table-header', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 2, 'order-edit.table-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 3, 'mini-cart', 1, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Order - table header' locale=$locale}, '', ''),
|
||||
(@max_id + 2, '{$locale}', {intl l='Order - table row' locale=$locale}, '', ''),
|
||||
(@max_id + 3, '{$locale}', {intl l='Mini cart' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
ALTER TABLE `rewriting_url` CHANGE `url` `url` VARBINARY( 255 ) NOT NULL;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
5
setup/update/tpl/2.2.0-beta2.sql.tpl
Normal file
5
setup/update/tpl/2.2.0-beta2.sql.tpl
Normal file
@@ -0,0 +1,5 @@
|
||||
UPDATE `config` SET `value`='2.2.0-beta2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='beta2' WHERE `name`='thelia_extra_version';
|
||||
51
setup/update/tpl/2.2.0-beta3.sql.tpl
Normal file
51
setup/update/tpl/2.2.0-beta3.sql.tpl
Normal file
@@ -0,0 +1,51 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.0-beta3' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='beta3' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- fix hook --
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'tab-seo.update-form', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 2, 'order-edit.order-product-table-header', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 3, 'order-edit.order-product-table-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 4, 'administrators.header', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 5, 'administrators.row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 6, 'advanced-configuration', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 7, 'advanced-configuration.js', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Tab SEO - update form' locale=$locale}, '', ''),
|
||||
(@max_id + 2, '{$locale}', {intl l='Order edit - order product table header' locale=$locale}, '', ''),
|
||||
(@max_id + 3, '{$locale}', {intl l='Order edit - order product table row' locale=$locale}, '', ''),
|
||||
(@max_id + 4, '{$locale}', {intl l='Administrators - header' locale=$locale}, '', ''),
|
||||
(@max_id + 5, '{$locale}', {intl l='Administrators - row' locale=$locale}, '', ''),
|
||||
(@max_id + 6, '{$locale}', {intl l='Advanced Configuration' locale=$locale}, '', ''),
|
||||
(@max_id + 7, '{$locale}', {intl l='Advanced Configuration - Javascript' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'main.topbar-top' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'main.topbar-bottom' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'product.combinations-row' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'brands.top' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'brands.table-header' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'brands.table-row' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'brands.bottom' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'brand.create-form' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'brand.delete-form' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'brand.js' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'brand.tab-content' AND `type` = 2;
|
||||
UPDATE `hook` SET `block` = '0', `updated_at` = NOW() WHERE `code` = 'brand.edit-js' AND `type` = 2;
|
||||
|
||||
-- add index --
|
||||
ALTER TABLE `rewriting_url` ADD INDEX `idx_rewriting_url` (`view_locale`, `view`, `view_id`, `redirected`);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.2.0.sql.tpl
Normal file
9
setup/update/tpl/2.2.0.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.0' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
45
setup/update/tpl/2.2.1.sql.tpl
Normal file
45
setup/update/tpl/2.2.1.sql.tpl
Normal file
@@ -0,0 +1,45 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
ALTER TABLE `product_sale_elements_product_image` DROP FOREIGN KEY `fk_pse_product_image_product_sale_elements_id`;
|
||||
|
||||
ALTER TABLE product_sale_elements_product_image
|
||||
ADD CONSTRAINT `fk_pse_product_image_product_sale_elements_id`
|
||||
FOREIGN KEY (`product_sale_elements_id`)
|
||||
REFERENCES `product_sale_elements` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `product_sale_elements_product_image` DROP FOREIGN KEY `fk_pse_product_image_product_image_id`;
|
||||
|
||||
ALTER TABLE product_sale_elements_product_image
|
||||
ADD CONSTRAINT `fk_pse_product_image_product_image_id`
|
||||
FOREIGN KEY (`product_image_id`)
|
||||
REFERENCES `product_image` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `product_sale_elements_product_document` DROP FOREIGN KEY `fk_pse_product_document_product_sale_elements_id`;
|
||||
|
||||
ALTER TABLE product_sale_elements_product_document
|
||||
ADD CONSTRAINT `fk_pse_product_document_product_sale_elements_id`
|
||||
FOREIGN KEY (`product_sale_elements_id`)
|
||||
REFERENCES `product_sale_elements` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `product_sale_elements_product_document` DROP FOREIGN KEY `fk_pse_product_document_product_document_id`;
|
||||
|
||||
ALTER TABLE product_sale_elements_product_document
|
||||
ADD CONSTRAINT `fk_pse_product_document_product_document_id`
|
||||
FOREIGN KEY (`product_document_id`)
|
||||
REFERENCES `product_document` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.2.2.sql.tpl
Normal file
9
setup/update/tpl/2.2.2.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
11
setup/update/tpl/2.2.3.sql.tpl
Normal file
11
setup/update/tpl/2.2.3.sql.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.3' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
ALTER TABLE `module` MODIFY `version` varchar(25) NOT NULL DEFAULT '';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.2.4.sql.tpl
Normal file
9
setup/update/tpl/2.2.4.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.4' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.2.6.sql.tpl
Normal file
9
setup/update/tpl/2.2.6.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.6' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='6' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
909
setup/update/tpl/2.3.0-alpha1.sql.tpl
Normal file
909
setup/update/tpl/2.3.0-alpha1.sql.tpl
Normal file
@@ -0,0 +1,909 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.0-alpha1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='alpha1' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- Add new column in module_hook table
|
||||
ALTER TABLE `module_hook` ADD `templates` TEXT AFTER`position`;
|
||||
|
||||
-- Add new columns in currency table
|
||||
ALTER TABLE `currency` ADD `format` CHAR( 10 ) NOT NULL AFTER `symbol`;
|
||||
ALTER TABLE `currency` ADD `visible` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `rate`;
|
||||
|
||||
-- Update currencies
|
||||
UPDATE `currency` SET `visible` = 1 WHERE 1;
|
||||
UPDATE `currency` SET `format` = '%n %s' WHERE `code` NOT IN ('USD', 'GBP');
|
||||
UPDATE `currency` SET `format` = '%s%n' WHERE `code` IN ('USD', 'GBP');
|
||||
|
||||
-- Additional hooks
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'brand.modification.form-right.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+2, 'brand.modification.form-right.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+3, 'category.modification.form-right.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+4, 'category.modification.form-right.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+5, 'content.modification.form-right.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+6, 'content.modification.form-right.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+7, 'folder.modification.form-right.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+8, 'folder.modification.form-right.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+9, 'product.modification.form-right.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+10, 'product.modification.form-right.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Brand edit - right column top' locale=$locale}, NULL, NULL),
|
||||
(@max_id+2, '{$locale}', {intl l='Brand edit - right column bottom' locale=$locale}, NULL, NULL),
|
||||
(@max_id+3, '{$locale}', {intl l='Category edit - right column top' locale=$locale}, NULL, NULL),
|
||||
(@max_id+4, '{$locale}', {intl l='Category edit - right column bottom' locale=$locale}, NULL, NULL),
|
||||
(@max_id+5, '{$locale}', {intl l='Content edit - right column top' locale=$locale}, NULL, NULL),
|
||||
(@max_id+6, '{$locale}', {intl l='Content edit - right column bottom' locale=$locale}, NULL, NULL),
|
||||
(@max_id+7, '{$locale}', {intl l='Folder edit - right column top' locale=$locale}, NULL, NULL),
|
||||
(@max_id+8, '{$locale}', {intl l='Folder edit - right column bottom' locale=$locale}, NULL, NULL),
|
||||
(@max_id+9, '{$locale}', {intl l='Product edit - right column top' locale=$locale}, NULL, NULL),
|
||||
(@max_id+10, '{$locale}', {intl l='Product edit - right column bottom' locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
/* States */
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'state-edit.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 2, 'state-edit.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 3, 'state.edit-js', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 4, 'states.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 5, 'states.table-header', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 6, 'states.table-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 7, 'states.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 8, 'state.create-form', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 9, 'state.delete-form', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id + 10, 'states.js', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='state-edit - at the top' locale=$locale}, '', ''),
|
||||
(@max_id + 2, '{$locale}', {intl l='state-edit - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 3, '{$locale}', {intl l='state - Edit JavaScript' locale=$locale}, '', ''),
|
||||
(@max_id + 4, '{$locale}', {intl l='states - at the top' locale=$locale}, '', ''),
|
||||
(@max_id + 5, '{$locale}', {intl l='states - table header' locale=$locale}, '', ''),
|
||||
(@max_id + 6, '{$locale}', {intl l='states - table row' locale=$locale}, '', ''),
|
||||
(@max_id + 7, '{$locale}', {intl l='states - bottom' locale=$locale}, '', ''),
|
||||
(@max_id + 8, '{$locale}', {intl l='state - creation form' locale=$locale}, '', ''),
|
||||
(@max_id + 9, '{$locale}', {intl l='state - delete form' locale=$locale}, '', ''),
|
||||
(@max_id + 10, '{$locale}', {intl l='states - JavaScript' locale=$locale}, '', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'email-html.template.css', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+2, 'email-html.layout.footer', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+3, 'email-html.order-confirmation.before-address', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+4, 'email-html.order-confirmation.delivery-address', 4, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+5, 'email-html.order-confirmation.after-address', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+6, 'email-html.order-confirmation.order-product', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+7, 'email-html.order-confirmation.before-products', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+8, 'email-html.order-confirmation.after-products', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+9, 'email-html.order-confirmation.footer', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+10, 'email-html.order-notification.before-address', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+11, 'email-html.order-notification.delivery-address', 4, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+12, 'email-html.order-notification.after-address', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+13, 'email-html.order-notification.order-product', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+14, 'email-html.order-notification.before-products', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+15, 'email-html.order-notification.after-products', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+16, 'email-txt.order-confirmation.before-address', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+17, 'email-txt.order-confirmation.delivery-address', 4, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+18, 'email-txt.order-confirmation.after-address', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+19, 'email-txt.order-confirmation.order-product', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+20, 'email-txt.order-confirmation.before-products', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+21, 'email-txt.order-confirmation.after-products', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+22, 'email-txt.order-notification.before-address', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+23, 'email-txt.order-notification.delivery-address', 4, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+24, 'email-txt.order-notification.after-address', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+25, 'email-txt.order-notification.order-product', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+26, 'email-txt.order-notification.before-products', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+27, 'email-txt.order-notification.after-products', 4, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Email html - layout - CSS' locale=$locale}, NULL, NULL),
|
||||
(@max_id+2, '{$locale}', {intl l='Email html - layout - footer' locale=$locale}, NULL, NULL),
|
||||
(@max_id+3, '{$locale}', {intl l='Email html - order confirmation - before address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+4, '{$locale}', {intl l='Email html - order confirmation - delivery address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+5, '{$locale}', {intl l='Email html - order confirmation - after address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+6, '{$locale}', {intl l='Email html - order confirmation - order product' locale=$locale}, NULL, NULL),
|
||||
(@max_id+7, '{$locale}', {intl l='Email html - order confirmation - before products' locale=$locale}, NULL, NULL),
|
||||
(@max_id+8, '{$locale}', {intl l='Email html - order confirmation - after products' locale=$locale}, NULL, NULL),
|
||||
(@max_id+9, '{$locale}', {intl l='Email html - order confirmation - footer' locale=$locale}, NULL, NULL),
|
||||
(@max_id+10, '{$locale}', {intl l='Email html - order notification - before address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+11, '{$locale}', {intl l='Email html - order notification - delivery address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+12, '{$locale}', {intl l='Email html - order notification - after address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+13, '{$locale}', {intl l='Email html - order notification - order product' locale=$locale}, NULL, NULL),
|
||||
(@max_id+14, '{$locale}', {intl l='Email html - order notification - before products' locale=$locale}, NULL, NULL),
|
||||
(@max_id+15, '{$locale}', {intl l='Email html - order notification - after products' locale=$locale}, NULL, NULL),
|
||||
(@max_id+16, '{$locale}', {intl l='Email txt - order confirmation - before address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+17, '{$locale}', {intl l='Email txt - order confirmation - delivery address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+18, '{$locale}', {intl l='Email txt - order confirmation - after address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+19, '{$locale}', {intl l='Email txt - order confirmation - order product' locale=$locale}, NULL, NULL),
|
||||
(@max_id+20, '{$locale}', {intl l='Email txt - order confirmation - before products' locale=$locale}, NULL, NULL),
|
||||
(@max_id+21, '{$locale}', {intl l='Email txt - order confirmation - after products' locale=$locale}, NULL, NULL),
|
||||
(@max_id+22, '{$locale}', {intl l='Email txt - order notification - before address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+23, '{$locale}', {intl l='Email txt - order notification - delivery address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+24, '{$locale}', {intl l='Email txt - order notification - after address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+25, '{$locale}', {intl l='Email txt - order notification - order product' locale=$locale}, NULL, NULL),
|
||||
(@max_id+26, '{$locale}', {intl l='Email txt - order notification - before products' locale=$locale}, NULL, NULL),
|
||||
(@max_id+27, '{$locale}', {intl l='Email txt - order notification - after products' locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
/* countries and states */
|
||||
|
||||
ALTER TABLE `country`
|
||||
ADD COLUMN `visible` TINYINT DEFAULT 0 NOT NULL AFTER `id`,
|
||||
ADD COLUMN `has_states` TINYINT DEFAULT 0 AFTER `isoalpha3`,
|
||||
ADD COLUMN `need_zip_code` TINYINT DEFAULT 0 AFTER `has_states`,
|
||||
ADD COLUMN `zip_code_format` VARCHAR(20) AFTER `need_zip_code`;
|
||||
|
||||
CREATE TABLE `state`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`visible` TINYINT DEFAULT 0 NOT NULL,
|
||||
`isocode` VARCHAR(4) NOT NULL,
|
||||
`country_id` INTEGER NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FI_state_country_id` (`country_id`),
|
||||
CONSTRAINT `fk_state_country_id`
|
||||
FOREIGN KEY (`country_id`)
|
||||
REFERENCES `country` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
CREATE TABLE `state_i18n`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255),
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `state_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
REFERENCES `state` (`id`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB CHARACTER SET='utf8';
|
||||
|
||||
ALTER TABLE `address`
|
||||
ADD COLUMN `state_id` INTEGER AFTER `country_id`,
|
||||
ADD CONSTRAINT `fk_address_state_id`
|
||||
FOREIGN KEY (`state_id`)
|
||||
REFERENCES `state` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT,
|
||||
ADD INDEX `FI_address_state_id` (`state_id`);
|
||||
|
||||
ALTER TABLE `order_address`
|
||||
ADD COLUMN `state_id` INTEGER AFTER `country_id`,
|
||||
ADD CONSTRAINT `fk_order_address_state_id`
|
||||
FOREIGN KEY (`state_id`)
|
||||
REFERENCES `state` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE RESTRICT,
|
||||
ADD INDEX `FI_order_address_state_id` (`state_id`);
|
||||
|
||||
ALTER TABLE `tax_rule_country`
|
||||
DROP PRIMARY KEY,
|
||||
ADD COLUMN `id` INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST,
|
||||
ADD COLUMN `state_id` INTEGER AFTER `country_id`,
|
||||
ADD CONSTRAINT `fk_tax_rule_country_state_id`
|
||||
FOREIGN KEY (`state_id`)
|
||||
REFERENCES `state` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE,
|
||||
ADD INDEX `idx_tax_rule_country_state_id` (`state_id`);
|
||||
|
||||
ALTER TABLE `country_area`
|
||||
ADD COLUMN `id` INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST,
|
||||
ADD COLUMN `state_id` INTEGER AFTER `country_id`,
|
||||
ADD INDEX `fk_country_area_state_id_idx` (`state_id`);
|
||||
|
||||
/*
|
||||
we create new countries (not visible) and link them to states
|
||||
the migration will be done with the module migrateCountryState
|
||||
*/
|
||||
|
||||
UPDATE `country` SET `visible` = 1 WHERE 1;
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `country`;
|
||||
|
||||
INSERT INTO `country` (`visible`, `isocode`, `isoalpha2`, `isoalpha3`, `by_default`, `shop_country`, `has_states`, `need_zip_code`, `zip_code_format`, `created_at`, `updated_at`) VALUES
|
||||
(0, '840', 'US', 'USA', 0, 0, '1', '1', 'NNNNN', NOW(), NOW()),
|
||||
(0, '124', 'CA', 'CAN', 0, 0, '1', '1', 'LNL NLN', NOW(), NOW()),
|
||||
(0, '32', 'AR', 'ARG', 0, 0, '1', '1', 'LNNNN', NOW(), NOW()),
|
||||
(0, '360', 'ID', 'IDN', 0, 0, '1', '1', 'NNNNN', NOW(), NOW()),
|
||||
(0, '380', 'IT', 'ITA', 0, 0, '1', '1', 'NNNNN', NOW(), NOW()),
|
||||
(0, '392', 'JP', 'JPN', 0, 0, '1', '1', 'NNN-NNNN', NOW(), NOW()),
|
||||
(0, '484', 'MX', 'MEX', 0, 0, '1', '1', 'NNNNN', NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `country_i18n` (`id`, `locale`, `title`, `chapo`, `description`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='USA' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 2, '{$locale}', {intl l='Canada' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 3, '{$locale}', {intl l='Argentina' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 4, '{$locale}', {intl l='Indonesia' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 5, '{$locale}', {intl l='Italy' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 6, '{$locale}', {intl l='Japan' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 7, '{$locale}', {intl l='Mexico' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
INSERT INTO `state` (`id`, `visible`, `isocode`, `country_id`, `created_at`, `updated_at`) VALUES
|
||||
(1, 1, 'AL', @max_id + 1, NOW(), NOW()),
|
||||
(2, 1, 'AK', @max_id + 1, NOW(), NOW()),
|
||||
(3, 1, 'AZ', @max_id + 1, NOW(), NOW()),
|
||||
(4, 1, 'AR', @max_id + 1, NOW(), NOW()),
|
||||
(5, 1, 'CA', @max_id + 1, NOW(), NOW()),
|
||||
(6, 1, 'CO', @max_id + 1, NOW(), NOW()),
|
||||
(7, 1, 'CT', @max_id + 1, NOW(), NOW()),
|
||||
(8, 1, 'DE', @max_id + 1, NOW(), NOW()),
|
||||
(9, 1, 'FL', @max_id + 1, NOW(), NOW()),
|
||||
(10, 1, 'GA', @max_id + 1, NOW(), NOW()),
|
||||
(11, 1, 'HI', @max_id + 1, NOW(), NOW()),
|
||||
(12, 1, 'ID', @max_id + 1, NOW(), NOW()),
|
||||
(13, 1, 'IL', @max_id + 1, NOW(), NOW()),
|
||||
(14, 1, 'IN', @max_id + 1, NOW(), NOW()),
|
||||
(15, 1, 'IA', @max_id + 1, NOW(), NOW()),
|
||||
(16, 1, 'KS', @max_id + 1, NOW(), NOW()),
|
||||
(17, 1, 'KY', @max_id + 1, NOW(), NOW()),
|
||||
(18, 1, 'LA', @max_id + 1, NOW(), NOW()),
|
||||
(19, 1, 'ME', @max_id + 1, NOW(), NOW()),
|
||||
(20, 1, 'MD', @max_id + 1, NOW(), NOW()),
|
||||
(21, 1, 'MA', @max_id + 1, NOW(), NOW()),
|
||||
(22, 1, 'MI', @max_id + 1, NOW(), NOW()),
|
||||
(23, 1, 'MN', @max_id + 1, NOW(), NOW()),
|
||||
(24, 1, 'MS', @max_id + 1, NOW(), NOW()),
|
||||
(25, 1, 'MO', @max_id + 1, NOW(), NOW()),
|
||||
(26, 1, 'MT', @max_id + 1, NOW(), NOW()),
|
||||
(27, 1, 'NE', @max_id + 1, NOW(), NOW()),
|
||||
(28, 1, 'NV', @max_id + 1, NOW(), NOW()),
|
||||
(29, 1, 'NH', @max_id + 1, NOW(), NOW()),
|
||||
(30, 1, 'NJ', @max_id + 1, NOW(), NOW()),
|
||||
(31, 1, 'NM', @max_id + 1, NOW(), NOW()),
|
||||
(32, 1, 'NY', @max_id + 1, NOW(), NOW()),
|
||||
(33, 1, 'NC', @max_id + 1, NOW(), NOW()),
|
||||
(34, 1, 'ND', @max_id + 1, NOW(), NOW()),
|
||||
(35, 1, 'OH', @max_id + 1, NOW(), NOW()),
|
||||
(36, 1, 'OK', @max_id + 1, NOW(), NOW()),
|
||||
(37, 1, 'OR', @max_id + 1, NOW(), NOW()),
|
||||
(38, 1, 'PA', @max_id + 1, NOW(), NOW()),
|
||||
(39, 1, 'RI', @max_id + 1, NOW(), NOW()),
|
||||
(40, 1, 'SC', @max_id + 1, NOW(), NOW()),
|
||||
(41, 1, 'SD', @max_id + 1, NOW(), NOW()),
|
||||
(42, 1, 'TN', @max_id + 1, NOW(), NOW()),
|
||||
(43, 1, 'TX', @max_id + 1, NOW(), NOW()),
|
||||
(44, 1, 'UT', @max_id + 1, NOW(), NOW()),
|
||||
(45, 1, 'VT', @max_id + 1, NOW(), NOW()),
|
||||
(46, 1, 'VA', @max_id + 1, NOW(), NOW()),
|
||||
(47, 1, 'WA', @max_id + 1, NOW(), NOW()),
|
||||
(48, 1, 'WV', @max_id + 1, NOW(), NOW()),
|
||||
(49, 1, 'WI', @max_id + 1, NOW(), NOW()),
|
||||
(50, 1, 'WY', @max_id + 1, NOW(), NOW()),
|
||||
(51, 1, 'PR', @max_id + 1, NOW(), NOW()),
|
||||
(52, 1, 'VI', @max_id + 1, NOW(), NOW()),
|
||||
(53, 1, 'DC', @max_id + 1, NOW(), NOW()),
|
||||
(54, 1, 'AGS', @max_id + 7, NOW(), NOW()),
|
||||
(55, 1, 'BCN', @max_id + 7, NOW(), NOW()),
|
||||
(56, 1, 'BCS', @max_id + 7, NOW(), NOW()),
|
||||
(57, 1, 'CAM', @max_id + 7, NOW(), NOW()),
|
||||
(58, 1, 'CHP', @max_id + 7, NOW(), NOW()),
|
||||
(59, 1, 'CHH', @max_id + 7, NOW(), NOW()),
|
||||
(60, 1, 'COA', @max_id + 7, NOW(), NOW()),
|
||||
(61, 1, 'COL', @max_id + 7, NOW(), NOW()),
|
||||
(62, 1, 'DIF', @max_id + 7, NOW(), NOW()),
|
||||
(63, 1, 'DUR', @max_id + 7, NOW(), NOW()),
|
||||
(64, 1, 'GUA', @max_id + 7, NOW(), NOW()),
|
||||
(65, 1, 'GRO', @max_id + 7, NOW(), NOW()),
|
||||
(66, 1, 'HID', @max_id + 7, NOW(), NOW()),
|
||||
(67, 1, 'JAL', @max_id + 7, NOW(), NOW()),
|
||||
(68, 1, 'MEX', @max_id + 7, NOW(), NOW()),
|
||||
(69, 1, 'MIC', @max_id + 7, NOW(), NOW()),
|
||||
(70, 1, 'MOR', @max_id + 7, NOW(), NOW()),
|
||||
(71, 1, 'NAY', @max_id + 7, NOW(), NOW()),
|
||||
(72, 1, 'NLE', @max_id + 7, NOW(), NOW()),
|
||||
(73, 1, 'OAX', @max_id + 7, NOW(), NOW()),
|
||||
(74, 1, 'PUE', @max_id + 7, NOW(), NOW()),
|
||||
(75, 1, 'QUE', @max_id + 7, NOW(), NOW()),
|
||||
(76, 1, 'ROO', @max_id + 7, NOW(), NOW()),
|
||||
(77, 1, 'SLP', @max_id + 7, NOW(), NOW()),
|
||||
(78, 1, 'SIN', @max_id + 7, NOW(), NOW()),
|
||||
(79, 1, 'SON', @max_id + 7, NOW(), NOW()),
|
||||
(80, 1, 'TAB', @max_id + 7, NOW(), NOW()),
|
||||
(81, 1, 'TAM', @max_id + 7, NOW(), NOW()),
|
||||
(82, 1, 'TLA', @max_id + 7, NOW(), NOW()),
|
||||
(83, 1, 'VER', @max_id + 7, NOW(), NOW()),
|
||||
(84, 1, 'YUC', @max_id + 7, NOW(), NOW()),
|
||||
(85, 1, 'ZAC', @max_id + 7, NOW(), NOW()),
|
||||
(86, 1, 'ON', @max_id + 2, NOW(), NOW()),
|
||||
(87, 1, 'QC', @max_id + 2, NOW(), NOW()),
|
||||
(88, 1, 'BC', @max_id + 2, NOW(), NOW()),
|
||||
(89, 1, 'AB', @max_id + 2, NOW(), NOW()),
|
||||
(90, 1, 'MB', @max_id + 2, NOW(), NOW()),
|
||||
(91, 1, 'SK', @max_id + 2, NOW(), NOW()),
|
||||
(92, 1, 'NS', @max_id + 2, NOW(), NOW()),
|
||||
(93, 1, 'NB', @max_id + 2, NOW(), NOW()),
|
||||
(94, 1, 'NL', @max_id + 2, NOW(), NOW()),
|
||||
(95, 1, 'PE', @max_id + 2, NOW(), NOW()),
|
||||
(96, 1, 'NT', @max_id + 2, NOW(), NOW()),
|
||||
(97, 1, 'YT', @max_id + 2, NOW(), NOW()),
|
||||
(98, 1, 'NU', @max_id + 2, NOW(), NOW()),
|
||||
(99, 1, 'B', @max_id + 3, NOW(), NOW()),
|
||||
(100, 1, 'K', @max_id + 3, NOW(), NOW()),
|
||||
(101, 1, 'H', @max_id + 3, NOW(), NOW()),
|
||||
(102, 1, 'U', @max_id + 3, NOW(), NOW()),
|
||||
(103, 1, 'C', @max_id + 3, NOW(), NOW()),
|
||||
(104, 1, 'X', @max_id + 3, NOW(), NOW()),
|
||||
(105, 1, 'W', @max_id + 3, NOW(), NOW()),
|
||||
(106, 1, 'E', @max_id + 3, NOW(), NOW()),
|
||||
(107, 1, 'P', @max_id + 3, NOW(), NOW()),
|
||||
(108, 1, 'Y', @max_id + 3, NOW(), NOW()),
|
||||
(109, 1, 'L', @max_id + 3, NOW(), NOW()),
|
||||
(110, 1, 'F', @max_id + 3, NOW(), NOW()),
|
||||
(111, 1, 'M', @max_id + 3, NOW(), NOW()),
|
||||
(112, 1, 'N', @max_id + 3, NOW(), NOW()),
|
||||
(113, 1, 'Q', @max_id + 3, NOW(), NOW()),
|
||||
(114, 1, 'R', @max_id + 3, NOW(), NOW()),
|
||||
(115, 1, 'A', @max_id + 3, NOW(), NOW()),
|
||||
(116, 1, 'J', @max_id + 3, NOW(), NOW()),
|
||||
(117, 1, 'D', @max_id + 3, NOW(), NOW()),
|
||||
(118, 1, 'Z', @max_id + 3, NOW(), NOW()),
|
||||
(119, 1, 'S', @max_id + 3, NOW(), NOW()),
|
||||
(120, 1, 'G', @max_id + 3, NOW(), NOW()),
|
||||
(121, 1, 'V', @max_id + 3, NOW(), NOW()),
|
||||
(122, 1, 'T', @max_id + 3, NOW(), NOW()),
|
||||
(123, 1, 'AG', @max_id + 5, NOW(), NOW()),
|
||||
(124, 1, 'AL', @max_id + 5, NOW(), NOW()),
|
||||
(125, 1, 'AN', @max_id + 5, NOW(), NOW()),
|
||||
(126, 1, 'AO', @max_id + 5, NOW(), NOW()),
|
||||
(127, 1, 'AR', @max_id + 5, NOW(), NOW()),
|
||||
(128, 1, 'AP', @max_id + 5, NOW(), NOW()),
|
||||
(129, 1, 'AT', @max_id + 5, NOW(), NOW()),
|
||||
(130, 1, 'AV', @max_id + 5, NOW(), NOW()),
|
||||
(131, 1, 'BA', @max_id + 5, NOW(), NOW()),
|
||||
(132, 1, 'BT', @max_id + 5, NOW(), NOW()),
|
||||
(133, 1, 'BL', @max_id + 5, NOW(), NOW()),
|
||||
(134, 1, 'BN', @max_id + 5, NOW(), NOW()),
|
||||
(135, 1, 'BG', @max_id + 5, NOW(), NOW()),
|
||||
(136, 1, 'BI', @max_id + 5, NOW(), NOW()),
|
||||
(137, 1, 'BO', @max_id + 5, NOW(), NOW()),
|
||||
(138, 1, 'BZ', @max_id + 5, NOW(), NOW()),
|
||||
(139, 1, 'BS', @max_id + 5, NOW(), NOW()),
|
||||
(140, 1, 'BR', @max_id + 5, NOW(), NOW()),
|
||||
(141, 1, 'CA', @max_id + 5, NOW(), NOW()),
|
||||
(142, 1, 'CL', @max_id + 5, NOW(), NOW()),
|
||||
(143, 1, 'CB', @max_id + 5, NOW(), NOW()),
|
||||
(144, 1, 'CI', @max_id + 5, NOW(), NOW()),
|
||||
(145, 1, 'CE', @max_id + 5, NOW(), NOW()),
|
||||
(146, 1, 'CT', @max_id + 5, NOW(), NOW()),
|
||||
(147, 1, 'CZ', @max_id + 5, NOW(), NOW()),
|
||||
(148, 1, 'CH', @max_id + 5, NOW(), NOW()),
|
||||
(149, 1, 'CO', @max_id + 5, NOW(), NOW()),
|
||||
(150, 1, 'CS', @max_id + 5, NOW(), NOW()),
|
||||
(151, 1, 'CR', @max_id + 5, NOW(), NOW()),
|
||||
(152, 1, 'KR', @max_id + 5, NOW(), NOW()),
|
||||
(153, 1, 'CN', @max_id + 5, NOW(), NOW()),
|
||||
(154, 1, 'EN', @max_id + 5, NOW(), NOW()),
|
||||
(155, 1, 'FM', @max_id + 5, NOW(), NOW()),
|
||||
(156, 1, 'FE', @max_id + 5, NOW(), NOW()),
|
||||
(157, 1, 'FI', @max_id + 5, NOW(), NOW()),
|
||||
(158, 1, 'FG', @max_id + 5, NOW(), NOW()),
|
||||
(159, 1, 'FC', @max_id + 5, NOW(), NOW()),
|
||||
(160, 1, 'FR', @max_id + 5, NOW(), NOW()),
|
||||
(161, 1, 'GE', @max_id + 5, NOW(), NOW()),
|
||||
(162, 1, 'GO', @max_id + 5, NOW(), NOW()),
|
||||
(163, 1, 'GR', @max_id + 5, NOW(), NOW()),
|
||||
(164, 1, 'IM', @max_id + 5, NOW(), NOW()),
|
||||
(165, 1, 'IS', @max_id + 5, NOW(), NOW()),
|
||||
(166, 1, 'AQ', @max_id + 5, NOW(), NOW()),
|
||||
(167, 1, 'SP', @max_id + 5, NOW(), NOW()),
|
||||
(168, 1, 'LT', @max_id + 5, NOW(), NOW()),
|
||||
(169, 1, 'LE', @max_id + 5, NOW(), NOW()),
|
||||
(170, 1, 'LC', @max_id + 5, NOW(), NOW()),
|
||||
(171, 1, 'LI', @max_id + 5, NOW(), NOW()),
|
||||
(172, 1, 'LO', @max_id + 5, NOW(), NOW()),
|
||||
(173, 1, 'LU', @max_id + 5, NOW(), NOW()),
|
||||
(174, 1, 'MC', @max_id + 5, NOW(), NOW()),
|
||||
(175, 1, 'MN', @max_id + 5, NOW(), NOW()),
|
||||
(176, 1, 'MS', @max_id + 5, NOW(), NOW()),
|
||||
(177, 1, 'MT', @max_id + 5, NOW(), NOW()),
|
||||
(178, 1, 'VS', @max_id + 5, NOW(), NOW()),
|
||||
(179, 1, 'ME', @max_id + 5, NOW(), NOW()),
|
||||
(180, 1, 'MI', @max_id + 5, NOW(), NOW()),
|
||||
(181, 1, 'MO', @max_id + 5, NOW(), NOW()),
|
||||
(182, 1, 'MB', @max_id + 5, NOW(), NOW()),
|
||||
(183, 1, 'NA', @max_id + 5, NOW(), NOW()),
|
||||
(184, 1, 'NO', @max_id + 5, NOW(), NOW()),
|
||||
(185, 1, 'NU', @max_id + 5, NOW(), NOW()),
|
||||
(186, 1, 'OG', @max_id + 5, NOW(), NOW()),
|
||||
(187, 1, 'OT', @max_id + 5, NOW(), NOW()),
|
||||
(188, 1, 'OR', @max_id + 5, NOW(), NOW()),
|
||||
(189, 1, 'PD', @max_id + 5, NOW(), NOW()),
|
||||
(190, 1, 'PA', @max_id + 5, NOW(), NOW()),
|
||||
(191, 1, 'PR', @max_id + 5, NOW(), NOW()),
|
||||
(192, 1, 'PV', @max_id + 5, NOW(), NOW()),
|
||||
(193, 1, 'PG', @max_id + 5, NOW(), NOW()),
|
||||
(194, 1, 'PU', @max_id + 5, NOW(), NOW()),
|
||||
(195, 1, 'PE', @max_id + 5, NOW(), NOW()),
|
||||
(196, 1, 'PC', @max_id + 5, NOW(), NOW()),
|
||||
(197, 1, 'PI', @max_id + 5, NOW(), NOW()),
|
||||
(198, 1, 'PT', @max_id + 5, NOW(), NOW()),
|
||||
(199, 1, 'PN', @max_id + 5, NOW(), NOW()),
|
||||
(200, 1, 'PZ', @max_id + 5, NOW(), NOW()),
|
||||
(201, 1, 'PO', @max_id + 5, NOW(), NOW()),
|
||||
(202, 1, 'RG', @max_id + 5, NOW(), NOW()),
|
||||
(203, 1, 'RA', @max_id + 5, NOW(), NOW()),
|
||||
(204, 1, 'RC', @max_id + 5, NOW(), NOW()),
|
||||
(205, 1, 'RE', @max_id + 5, NOW(), NOW()),
|
||||
(206, 1, 'RI', @max_id + 5, NOW(), NOW()),
|
||||
(207, 1, 'RN', @max_id + 5, NOW(), NOW()),
|
||||
(208, 1, 'RM', @max_id + 5, NOW(), NOW()),
|
||||
(209, 1, 'RO', @max_id + 5, NOW(), NOW()),
|
||||
(210, 1, 'SA', @max_id + 5, NOW(), NOW()),
|
||||
(211, 1, 'SS', @max_id + 5, NOW(), NOW()),
|
||||
(212, 1, 'SV', @max_id + 5, NOW(), NOW()),
|
||||
(213, 1, 'SI', @max_id + 5, NOW(), NOW()),
|
||||
(214, 1, 'SR', @max_id + 5, NOW(), NOW()),
|
||||
(215, 1, 'SO', @max_id + 5, NOW(), NOW()),
|
||||
(216, 1, 'TA', @max_id + 5, NOW(), NOW()),
|
||||
(217, 1, 'TE', @max_id + 5, NOW(), NOW()),
|
||||
(218, 1, 'TR', @max_id + 5, NOW(), NOW()),
|
||||
(219, 1, 'TO', @max_id + 5, NOW(), NOW()),
|
||||
(220, 1, 'TP', @max_id + 5, NOW(), NOW()),
|
||||
(221, 1, 'TN', @max_id + 5, NOW(), NOW()),
|
||||
(222, 1, 'TV', @max_id + 5, NOW(), NOW()),
|
||||
(223, 1, 'TS', @max_id + 5, NOW(), NOW()),
|
||||
(224, 1, 'UD', @max_id + 5, NOW(), NOW()),
|
||||
(225, 1, 'VA', @max_id + 5, NOW(), NOW()),
|
||||
(226, 1, 'VE', @max_id + 5, NOW(), NOW()),
|
||||
(227, 1, 'VB', @max_id + 5, NOW(), NOW()),
|
||||
(228, 1, 'VC', @max_id + 5, NOW(), NOW()),
|
||||
(229, 1, 'VR', @max_id + 5, NOW(), NOW()),
|
||||
(230, 1, 'VV', @max_id + 5, NOW(), NOW()),
|
||||
(231, 1, 'VI', @max_id + 5, NOW(), NOW()),
|
||||
(232, 1, 'VT', @max_id + 5, NOW(), NOW()),
|
||||
(233, 1, 'AC', @max_id + 4, NOW(), NOW()),
|
||||
(234, 1, 'BA', @max_id + 4, NOW(), NOW()),
|
||||
(235, 1, 'BB', @max_id + 4, NOW(), NOW()),
|
||||
(236, 1, 'BT', @max_id + 4, NOW(), NOW()),
|
||||
(237, 1, 'BE', @max_id + 4, NOW(), NOW()),
|
||||
(238, 1, 'JT', @max_id + 4, NOW(), NOW()),
|
||||
(239, 1, 'KT', @max_id + 4, NOW(), NOW()),
|
||||
(240, 1, 'ST', @max_id + 4, NOW(), NOW()),
|
||||
(241, 1, 'JI', @max_id + 4, NOW(), NOW()),
|
||||
(242, 1, 'KI', @max_id + 4, NOW(), NOW()),
|
||||
(243, 1, 'NT', @max_id + 4, NOW(), NOW()),
|
||||
(244, 1, 'GO', @max_id + 4, NOW(), NOW()),
|
||||
(245, 1, 'JK', @max_id + 4, NOW(), NOW()),
|
||||
(246, 1, 'JA', @max_id + 4, NOW(), NOW()),
|
||||
(247, 1, 'LA', @max_id + 4, NOW(), NOW()),
|
||||
(248, 1, 'MA', @max_id + 4, NOW(), NOW()),
|
||||
(249, 1, 'MU', @max_id + 4, NOW(), NOW()),
|
||||
(250, 1, 'SA', @max_id + 4, NOW(), NOW()),
|
||||
(251, 1, 'SU', @max_id + 4, NOW(), NOW()),
|
||||
(252, 1, 'PA', @max_id + 4, NOW(), NOW()),
|
||||
(253, 1, 'RI', @max_id + 4, NOW(), NOW()),
|
||||
(254, 1, 'KR', @max_id + 4, NOW(), NOW()),
|
||||
(255, 1, 'SG', @max_id + 4, NOW(), NOW()),
|
||||
(256, 1, 'KS', @max_id + 4, NOW(), NOW()),
|
||||
(257, 1, 'SN', @max_id + 4, NOW(), NOW()),
|
||||
(258, 1, 'SS', @max_id + 4, NOW(), NOW()),
|
||||
(259, 1, 'JB', @max_id + 4, NOW(), NOW()),
|
||||
(260, 1, 'KB', @max_id + 4, NOW(), NOW()),
|
||||
(261, 1, 'NB', @max_id + 4, NOW(), NOW()),
|
||||
(262, 1, 'PB', @max_id + 4, NOW(), NOW()),
|
||||
(263, 1, 'SR', @max_id + 4, NOW(), NOW()),
|
||||
(264, 1, 'SB', @max_id + 4, NOW(), NOW()),
|
||||
(265, 1, 'YO', @max_id + 4, NOW(), NOW()),
|
||||
(266, 1, '23', @max_id + 6, NOW(), NOW()),
|
||||
(267, 1, '05', @max_id + 6, NOW(), NOW()),
|
||||
(268, 1, '02', @max_id + 6, NOW(), NOW()),
|
||||
(269, 1, '12', @max_id + 6, NOW(), NOW()),
|
||||
(270, 1, '38', @max_id + 6, NOW(), NOW()),
|
||||
(271, 1, '18', @max_id + 6, NOW(), NOW()),
|
||||
(272, 1, '40', @max_id + 6, NOW(), NOW()),
|
||||
(273, 1, '07', @max_id + 6, NOW(), NOW()),
|
||||
(274, 1, '21', @max_id + 6, NOW(), NOW()),
|
||||
(275, 1, '10', @max_id + 6, NOW(), NOW()),
|
||||
(276, 1, '34', @max_id + 6, NOW(), NOW()),
|
||||
(277, 1, '01', @max_id + 6, NOW(), NOW()),
|
||||
(278, 1, '28', @max_id + 6, NOW(), NOW()),
|
||||
(279, 1, '08', @max_id + 6, NOW(), NOW()),
|
||||
(280, 1, '17', @max_id + 6, NOW(), NOW()),
|
||||
(281, 1, '03', @max_id + 6, NOW(), NOW()),
|
||||
(282, 1, '37', @max_id + 6, NOW(), NOW()),
|
||||
(283, 1, '46', @max_id + 6, NOW(), NOW()),
|
||||
(284, 1, '14', @max_id + 6, NOW(), NOW()),
|
||||
(285, 1, '39', @max_id + 6, NOW(), NOW()),
|
||||
(286, 1, '43', @max_id + 6, NOW(), NOW()),
|
||||
(287, 1, '26', @max_id + 6, NOW(), NOW()),
|
||||
(288, 1, '24', @max_id + 6, NOW(), NOW()),
|
||||
(289, 1, '04', @max_id + 6, NOW(), NOW()),
|
||||
(290, 1, '45', @max_id + 6, NOW(), NOW()),
|
||||
(291, 1, '20', @max_id + 6, NOW(), NOW()),
|
||||
(292, 1, '42', @max_id + 6, NOW(), NOW()),
|
||||
(293, 1, '29', @max_id + 6, NOW(), NOW()),
|
||||
(294, 1, '15', @max_id + 6, NOW(), NOW()),
|
||||
(295, 1, '44', @max_id + 6, NOW(), NOW()),
|
||||
(296, 1, '33', @max_id + 6, NOW(), NOW()),
|
||||
(297, 1, '47', @max_id + 6, NOW(), NOW()),
|
||||
(298, 1, '27', @max_id + 6, NOW(), NOW()),
|
||||
(299, 1, '41', @max_id + 6, NOW(), NOW()),
|
||||
(300, 1, '11', @max_id + 6, NOW(), NOW()),
|
||||
(301, 1, '25', @max_id + 6, NOW(), NOW()),
|
||||
(302, 1, '32', @max_id + 6, NOW(), NOW()),
|
||||
(303, 1, '22', @max_id + 6, NOW(), NOW()),
|
||||
(304, 1, '09', @max_id + 6, NOW(), NOW()),
|
||||
(305, 1, '36', @max_id + 6, NOW(), NOW()),
|
||||
(306, 1, '13', @max_id + 6, NOW(), NOW()),
|
||||
(307, 1, '31', @max_id + 6, NOW(), NOW()),
|
||||
(308, 1, '16', @max_id + 6, NOW(), NOW()),
|
||||
(309, 1, '30', @max_id + 6, NOW(), NOW()),
|
||||
(310, 1, '06', @max_id + 6, NOW(), NOW()),
|
||||
(311, 1, '35', @max_id + 6, NOW(), NOW()),
|
||||
(312, 1, '19', @max_id + 6, NOW(), NOW()),
|
||||
(313, 1, '', @max_id + 3, NOW(), NOW()),
|
||||
(314, 1, '', @max_id + 4, NOW(), NOW()),
|
||||
(315, 1, '', @max_id + 5, NOW(), NOW()),
|
||||
(316, 1, '', @max_id + 6, NOW(), NOW()),
|
||||
(317, 1, '', @max_id + 7, NOW(), NOW());
|
||||
|
||||
|
||||
INSERT INTO `state_i18n` (`id`, `locale`, `title`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
|
||||
(1, '{$locale}', {intl l='Alabama' locale=$locale}),
|
||||
(2, '{$locale}', {intl l='Alaska' locale=$locale}),
|
||||
(3, '{$locale}', {intl l='Arizona' locale=$locale}),
|
||||
(4, '{$locale}', {intl l='Arkansas' locale=$locale}),
|
||||
(5, '{$locale}', {intl l='California' locale=$locale}),
|
||||
(6, '{$locale}', {intl l='Colorado' locale=$locale}),
|
||||
(7, '{$locale}', {intl l='Connecticut' locale=$locale}),
|
||||
(8, '{$locale}', {intl l='Delaware' locale=$locale}),
|
||||
(9, '{$locale}', {intl l='Florida' locale=$locale}),
|
||||
(10, '{$locale}', {intl l='Georgia' locale=$locale}),
|
||||
(11, '{$locale}', {intl l='Hawaii' locale=$locale}),
|
||||
(12, '{$locale}', {intl l='Idaho' locale=$locale}),
|
||||
(13, '{$locale}', {intl l='Illinois' locale=$locale}),
|
||||
(14, '{$locale}', {intl l='Indiana' locale=$locale}),
|
||||
(15, '{$locale}', {intl l='Iowa' locale=$locale}),
|
||||
(16, '{$locale}', {intl l='Kansas' locale=$locale}),
|
||||
(17, '{$locale}', {intl l='Kentucky' locale=$locale}),
|
||||
(18, '{$locale}', {intl l='Louisiana' locale=$locale}),
|
||||
(19, '{$locale}', {intl l='Maine' locale=$locale}),
|
||||
(20, '{$locale}', {intl l='Maryland' locale=$locale}),
|
||||
(21, '{$locale}', {intl l='Massachusetts' locale=$locale}),
|
||||
(22, '{$locale}', {intl l='Michigan' locale=$locale}),
|
||||
(23, '{$locale}', {intl l='Minnesota' locale=$locale}),
|
||||
(24, '{$locale}', {intl l='Mississippi' locale=$locale}),
|
||||
(25, '{$locale}', {intl l='Missouri' locale=$locale}),
|
||||
(26, '{$locale}', {intl l='Montana' locale=$locale}),
|
||||
(27, '{$locale}', {intl l='Nebraska' locale=$locale}),
|
||||
(28, '{$locale}', {intl l='Nevada' locale=$locale}),
|
||||
(29, '{$locale}', {intl l='New Hampshire' locale=$locale}),
|
||||
(30, '{$locale}', {intl l='New Jersey' locale=$locale}),
|
||||
(31, '{$locale}', {intl l='New Mexico' locale=$locale}),
|
||||
(32, '{$locale}', {intl l='New York' locale=$locale}),
|
||||
(33, '{$locale}', {intl l='North Carolina' locale=$locale}),
|
||||
(34, '{$locale}', {intl l='North Dakota' locale=$locale}),
|
||||
(35, '{$locale}', {intl l='Ohio' locale=$locale}),
|
||||
(36, '{$locale}', {intl l='Oklahoma' locale=$locale}),
|
||||
(37, '{$locale}', {intl l='Oregon' locale=$locale}),
|
||||
(38, '{$locale}', {intl l='Pennsylvania' locale=$locale}),
|
||||
(39, '{$locale}', {intl l='Rhode Island' locale=$locale}),
|
||||
(40, '{$locale}', {intl l='South Carolina' locale=$locale}),
|
||||
(41, '{$locale}', {intl l='South Dakota' locale=$locale}),
|
||||
(42, '{$locale}', {intl l='Tennessee' locale=$locale}),
|
||||
(43, '{$locale}', {intl l='Texas' locale=$locale}),
|
||||
(44, '{$locale}', {intl l='Utah' locale=$locale}),
|
||||
(45, '{$locale}', {intl l='Vermont' locale=$locale}),
|
||||
(46, '{$locale}', {intl l='Virginia' locale=$locale}),
|
||||
(47, '{$locale}', {intl l='Washington' locale=$locale}),
|
||||
(48, '{$locale}', {intl l='West Virginia' locale=$locale}),
|
||||
(49, '{$locale}', {intl l='Wisconsin' locale=$locale}),
|
||||
(50, '{$locale}', {intl l='Wyoming' locale=$locale}),
|
||||
(51, '{$locale}', {intl l='Puerto Rico' locale=$locale}),
|
||||
(52, '{$locale}', {intl l='US Virgin Islands' locale=$locale}),
|
||||
(53, '{$locale}', {intl l='District of Columbia' locale=$locale}),
|
||||
(54, '{$locale}', {intl l='Aguascalientes' locale=$locale}),
|
||||
(55, '{$locale}', {intl l='Baja California' locale=$locale}),
|
||||
(56, '{$locale}', {intl l='Baja California Sur' locale=$locale}),
|
||||
(57, '{$locale}', {intl l='Campeche' locale=$locale}),
|
||||
(58, '{$locale}', {intl l='Chiapas' locale=$locale}),
|
||||
(59, '{$locale}', {intl l='Chihuahua' locale=$locale}),
|
||||
(60, '{$locale}', {intl l='Coahuila' locale=$locale}),
|
||||
(61, '{$locale}', {intl l='Colima' locale=$locale}),
|
||||
(62, '{$locale}', {intl l='Distrito Federal' locale=$locale}),
|
||||
(63, '{$locale}', {intl l='Durango' locale=$locale}),
|
||||
(64, '{$locale}', {intl l='Guanajuato' locale=$locale}),
|
||||
(65, '{$locale}', {intl l='Guerrero' locale=$locale}),
|
||||
(66, '{$locale}', {intl l='Hidalgo' locale=$locale}),
|
||||
(67, '{$locale}', {intl l='Jalisco' locale=$locale}),
|
||||
(68, '{$locale}', {intl l='Estado de México' locale=$locale}),
|
||||
(69, '{$locale}', {intl l='Michoacán' locale=$locale}),
|
||||
(70, '{$locale}', {intl l='Morelos' locale=$locale}),
|
||||
(71, '{$locale}', {intl l='Nayarit' locale=$locale}),
|
||||
(72, '{$locale}', {intl l='Nuevo León' locale=$locale}),
|
||||
(73, '{$locale}', {intl l='Oaxaca' locale=$locale}),
|
||||
(74, '{$locale}', {intl l='Puebla' locale=$locale}),
|
||||
(75, '{$locale}', {intl l='Querétaro' locale=$locale}),
|
||||
(76, '{$locale}', {intl l='Quintana Roo' locale=$locale}),
|
||||
(77, '{$locale}', {intl l='San Luis Potosí' locale=$locale}),
|
||||
(78, '{$locale}', {intl l='Sinaloa' locale=$locale}),
|
||||
(79, '{$locale}', {intl l='Sonora' locale=$locale}),
|
||||
(80, '{$locale}', {intl l='Tabasco' locale=$locale}),
|
||||
(81, '{$locale}', {intl l='Tamaulipas' locale=$locale}),
|
||||
(82, '{$locale}', {intl l='Tlaxcala' locale=$locale}),
|
||||
(83, '{$locale}', {intl l='Veracruz' locale=$locale}),
|
||||
(84, '{$locale}', {intl l='Yucatán' locale=$locale}),
|
||||
(85, '{$locale}', {intl l='Zacatecas' locale=$locale}),
|
||||
(86, '{$locale}', {intl l='Ontario' locale=$locale}),
|
||||
(87, '{$locale}', {intl l='Quebec' locale=$locale}),
|
||||
(88, '{$locale}', {intl l='British Columbia' locale=$locale}),
|
||||
(89, '{$locale}', {intl l='Alberta' locale=$locale}),
|
||||
(90, '{$locale}', {intl l='Manitoba' locale=$locale}),
|
||||
(91, '{$locale}', {intl l='Saskatchewan' locale=$locale}),
|
||||
(92, '{$locale}', {intl l='Nova Scotia' locale=$locale}),
|
||||
(93, '{$locale}', {intl l='New Brunswick' locale=$locale}),
|
||||
(94, '{$locale}', {intl l='Newfoundland and Labrador' locale=$locale}),
|
||||
(95, '{$locale}', {intl l='Prince Edward Island' locale=$locale}),
|
||||
(96, '{$locale}', {intl l='Northwest Territories' locale=$locale}),
|
||||
(97, '{$locale}', {intl l='Yukon' locale=$locale}),
|
||||
(98, '{$locale}', {intl l='Nunavut' locale=$locale}),
|
||||
(99, '{$locale}', {intl l='Buenos Aires' locale=$locale}),
|
||||
(100, '{$locale}', {intl l='Catamarca' locale=$locale}),
|
||||
(101, '{$locale}', {intl l='Chaco' locale=$locale}),
|
||||
(102, '{$locale}', {intl l='Chubut' locale=$locale}),
|
||||
(103, '{$locale}', {intl l='Ciudad de Buenos Aires' locale=$locale}),
|
||||
(104, '{$locale}', {intl l='Córdoba' locale=$locale}),
|
||||
(105, '{$locale}', {intl l='Corrientes' locale=$locale}),
|
||||
(106, '{$locale}', {intl l='Entre Ríos' locale=$locale}),
|
||||
(107, '{$locale}', {intl l='Formosa' locale=$locale}),
|
||||
(108, '{$locale}', {intl l='Jujuy' locale=$locale}),
|
||||
(109, '{$locale}', {intl l='La Pampa' locale=$locale}),
|
||||
(110, '{$locale}', {intl l='La Rioja' locale=$locale}),
|
||||
(111, '{$locale}', {intl l='Mendoza' locale=$locale}),
|
||||
(112, '{$locale}', {intl l='Misiones' locale=$locale}),
|
||||
(113, '{$locale}', {intl l='Neuquén' locale=$locale}),
|
||||
(114, '{$locale}', {intl l='Río Negro' locale=$locale}),
|
||||
(115, '{$locale}', {intl l='Salta' locale=$locale}),
|
||||
(116, '{$locale}', {intl l='San Juan' locale=$locale}),
|
||||
(117, '{$locale}', {intl l='San Luis' locale=$locale}),
|
||||
(118, '{$locale}', {intl l='Santa Cruz' locale=$locale}),
|
||||
(119, '{$locale}', {intl l='Santa Fe' locale=$locale}),
|
||||
(120, '{$locale}', {intl l='Santiago del Estero' locale=$locale}),
|
||||
(121, '{$locale}', {intl l='Tierra del Fuego' locale=$locale}),
|
||||
(122, '{$locale}', {intl l='Tucumán' locale=$locale}),
|
||||
(123, '{$locale}', {intl l='Agrigento' locale=$locale}),
|
||||
(124, '{$locale}', {intl l='Alessandria' locale=$locale}),
|
||||
(125, '{$locale}', {intl l='Ancona' locale=$locale}),
|
||||
(126, '{$locale}', {intl l='Aosta' locale=$locale}),
|
||||
(127, '{$locale}', {intl l='Arezzo' locale=$locale}),
|
||||
(128, '{$locale}', {intl l='Ascoli Piceno' locale=$locale}),
|
||||
(129, '{$locale}', {intl l='Asti' locale=$locale}),
|
||||
(130, '{$locale}', {intl l='Avellino' locale=$locale}),
|
||||
(131, '{$locale}', {intl l='Bari' locale=$locale}),
|
||||
(132, '{$locale}', {intl l='Barletta-Andria-Trani' locale=$locale}),
|
||||
(133, '{$locale}', {intl l='Belluno' locale=$locale}),
|
||||
(134, '{$locale}', {intl l='Benevento' locale=$locale}),
|
||||
(135, '{$locale}', {intl l='Bergamo' locale=$locale}),
|
||||
(136, '{$locale}', {intl l='Biella' locale=$locale}),
|
||||
(137, '{$locale}', {intl l='Bologna' locale=$locale}),
|
||||
(138, '{$locale}', {intl l='Bolzano' locale=$locale}),
|
||||
(139, '{$locale}', {intl l='Brescia' locale=$locale}),
|
||||
(140, '{$locale}', {intl l='Brindisi' locale=$locale}),
|
||||
(141, '{$locale}', {intl l='Cagliari' locale=$locale}),
|
||||
(142, '{$locale}', {intl l='Caltanissetta' locale=$locale}),
|
||||
(143, '{$locale}', {intl l='Campobasso' locale=$locale}),
|
||||
(144, '{$locale}', {intl l='Carbonia-Iglesias' locale=$locale}),
|
||||
(145, '{$locale}', {intl l='Caserta' locale=$locale}),
|
||||
(146, '{$locale}', {intl l='Catania' locale=$locale}),
|
||||
(147, '{$locale}', {intl l='Catanzaro' locale=$locale}),
|
||||
(148, '{$locale}', {intl l='Chieti' locale=$locale}),
|
||||
(149, '{$locale}', {intl l='Como' locale=$locale}),
|
||||
(150, '{$locale}', {intl l='Cosenza' locale=$locale}),
|
||||
(151, '{$locale}', {intl l='Cremona' locale=$locale}),
|
||||
(152, '{$locale}', {intl l='Crotone' locale=$locale}),
|
||||
(153, '{$locale}', {intl l='Cuneo' locale=$locale}),
|
||||
(154, '{$locale}', {intl l='Enna' locale=$locale}),
|
||||
(155, '{$locale}', {intl l='Fermo' locale=$locale}),
|
||||
(156, '{$locale}', {intl l='Ferrara' locale=$locale}),
|
||||
(157, '{$locale}', {intl l='Firenze' locale=$locale}),
|
||||
(158, '{$locale}', {intl l='Foggia' locale=$locale}),
|
||||
(159, '{$locale}', {intl l='Forlì-Cesena' locale=$locale}),
|
||||
(160, '{$locale}', {intl l='Frosinone' locale=$locale}),
|
||||
(161, '{$locale}', {intl l='Genova' locale=$locale}),
|
||||
(162, '{$locale}', {intl l='Gorizia' locale=$locale}),
|
||||
(163, '{$locale}', {intl l='Grosseto' locale=$locale}),
|
||||
(164, '{$locale}', {intl l='Imperia' locale=$locale}),
|
||||
(165, '{$locale}', {intl l='Isernia' locale=$locale}),
|
||||
(166, '{$locale}', {intl l='L\'Aquila' locale=$locale}),
|
||||
(167, '{$locale}', {intl l='La Spezia' locale=$locale}),
|
||||
(168, '{$locale}', {intl l='Latina' locale=$locale}),
|
||||
(169, '{$locale}', {intl l='Lecce' locale=$locale}),
|
||||
(170, '{$locale}', {intl l='Lecco' locale=$locale}),
|
||||
(171, '{$locale}', {intl l='Livorno' locale=$locale}),
|
||||
(172, '{$locale}', {intl l='Lodi' locale=$locale}),
|
||||
(173, '{$locale}', {intl l='Lucca' locale=$locale}),
|
||||
(174, '{$locale}', {intl l='Macerata' locale=$locale}),
|
||||
(175, '{$locale}', {intl l='Mantova' locale=$locale}),
|
||||
(176, '{$locale}', {intl l='Massa' locale=$locale}),
|
||||
(177, '{$locale}', {intl l='Matera' locale=$locale}),
|
||||
(178, '{$locale}', {intl l='Medio Campidano' locale=$locale}),
|
||||
(179, '{$locale}', {intl l='Messina' locale=$locale}),
|
||||
(180, '{$locale}', {intl l='Milano' locale=$locale}),
|
||||
(181, '{$locale}', {intl l='Modena' locale=$locale}),
|
||||
(182, '{$locale}', {intl l='Monza e della Brianza' locale=$locale}),
|
||||
(183, '{$locale}', {intl l='Napoli' locale=$locale}),
|
||||
(184, '{$locale}', {intl l='Novara' locale=$locale}),
|
||||
(185, '{$locale}', {intl l='Nuoro' locale=$locale}),
|
||||
(186, '{$locale}', {intl l='Ogliastra' locale=$locale}),
|
||||
(187, '{$locale}', {intl l='Olbia-Tempio' locale=$locale}),
|
||||
(188, '{$locale}', {intl l='Oristano' locale=$locale}),
|
||||
(189, '{$locale}', {intl l='Padova' locale=$locale}),
|
||||
(190, '{$locale}', {intl l='Palermo' locale=$locale}),
|
||||
(191, '{$locale}', {intl l='Parma' locale=$locale}),
|
||||
(192, '{$locale}', {intl l='Pavia' locale=$locale}),
|
||||
(193, '{$locale}', {intl l='Perugia' locale=$locale}),
|
||||
(194, '{$locale}', {intl l='Pesaro-Urbino' locale=$locale}),
|
||||
(195, '{$locale}', {intl l='Pescara' locale=$locale}),
|
||||
(196, '{$locale}', {intl l='Piacenza' locale=$locale}),
|
||||
(197, '{$locale}', {intl l='Pisa' locale=$locale}),
|
||||
(198, '{$locale}', {intl l='Pistoia' locale=$locale}),
|
||||
(199, '{$locale}', {intl l='Pordenone' locale=$locale}),
|
||||
(200, '{$locale}', {intl l='Potenza' locale=$locale}),
|
||||
(201, '{$locale}', {intl l='Prato' locale=$locale}),
|
||||
(202, '{$locale}', {intl l='Ragusa' locale=$locale}),
|
||||
(203, '{$locale}', {intl l='Ravenna' locale=$locale}),
|
||||
(204, '{$locale}', {intl l='Reggio Calabria' locale=$locale}),
|
||||
(205, '{$locale}', {intl l='Reggio Emilia' locale=$locale}),
|
||||
(206, '{$locale}', {intl l='Rieti' locale=$locale}),
|
||||
(207, '{$locale}', {intl l='Rimini' locale=$locale}),
|
||||
(208, '{$locale}', {intl l='Roma' locale=$locale}),
|
||||
(209, '{$locale}', {intl l='Rovigo' locale=$locale}),
|
||||
(210, '{$locale}', {intl l='Salerno' locale=$locale}),
|
||||
(211, '{$locale}', {intl l='Sassari' locale=$locale}),
|
||||
(212, '{$locale}', {intl l='Savona' locale=$locale}),
|
||||
(213, '{$locale}', {intl l='Siena' locale=$locale}),
|
||||
(214, '{$locale}', {intl l='Siracusa' locale=$locale}),
|
||||
(215, '{$locale}', {intl l='Sondrio' locale=$locale}),
|
||||
(216, '{$locale}', {intl l='Taranto' locale=$locale}),
|
||||
(217, '{$locale}', {intl l='Teramo' locale=$locale}),
|
||||
(218, '{$locale}', {intl l='Terni' locale=$locale}),
|
||||
(219, '{$locale}', {intl l='Torino' locale=$locale}),
|
||||
(220, '{$locale}', {intl l='Trapani' locale=$locale}),
|
||||
(221, '{$locale}', {intl l='Trento' locale=$locale}),
|
||||
(222, '{$locale}', {intl l='Treviso' locale=$locale}),
|
||||
(223, '{$locale}', {intl l='Trieste' locale=$locale}),
|
||||
(224, '{$locale}', {intl l='Udine' locale=$locale}),
|
||||
(225, '{$locale}', {intl l='Varese' locale=$locale}),
|
||||
(226, '{$locale}', {intl l='Venezia' locale=$locale}),
|
||||
(227, '{$locale}', {intl l='Verbano-Cusio-Ossola' locale=$locale}),
|
||||
(228, '{$locale}', {intl l='Vercelli' locale=$locale}),
|
||||
(229, '{$locale}', {intl l='Verona' locale=$locale}),
|
||||
(230, '{$locale}', {intl l='Vibo Valentia' locale=$locale}),
|
||||
(231, '{$locale}', {intl l='Vicenza' locale=$locale}),
|
||||
(232, '{$locale}', {intl l='Viterbo' locale=$locale}),
|
||||
(233, '{$locale}', {intl l='Aceh' locale=$locale}),
|
||||
(234, '{$locale}', {intl l='Bali' locale=$locale}),
|
||||
(235, '{$locale}', {intl l='Bangka' locale=$locale}),
|
||||
(236, '{$locale}', {intl l='Banten' locale=$locale}),
|
||||
(237, '{$locale}', {intl l='Bengkulu' locale=$locale}),
|
||||
(238, '{$locale}', {intl l='Central Java' locale=$locale}),
|
||||
(239, '{$locale}', {intl l='Central Kalimantan' locale=$locale}),
|
||||
(240, '{$locale}', {intl l='Central Sulawesi' locale=$locale}),
|
||||
(241, '{$locale}', {intl l='Coat of arms of East Java' locale=$locale}),
|
||||
(242, '{$locale}', {intl l='East kalimantan' locale=$locale}),
|
||||
(243, '{$locale}', {intl l='East Nusa Tenggara' locale=$locale}),
|
||||
(244, '{$locale}', {intl l='Lambang propinsi' locale=$locale}),
|
||||
(245, '{$locale}', {intl l='Jakarta' locale=$locale}),
|
||||
(246, '{$locale}', {intl l='Jambi' locale=$locale}),
|
||||
(247, '{$locale}', {intl l='Lampung' locale=$locale}),
|
||||
(248, '{$locale}', {intl l='Maluku' locale=$locale}),
|
||||
(249, '{$locale}', {intl l='North Maluku' locale=$locale}),
|
||||
(250, '{$locale}', {intl l='North Sulawesi' locale=$locale}),
|
||||
(251, '{$locale}', {intl l='North Sumatra' locale=$locale}),
|
||||
(252, '{$locale}', {intl l='Papua' locale=$locale}),
|
||||
(253, '{$locale}', {intl l='Riau' locale=$locale}),
|
||||
(254, '{$locale}', {intl l='Lambang Riau' locale=$locale}),
|
||||
(255, '{$locale}', {intl l='Southeast Sulawesi' locale=$locale}),
|
||||
(256, '{$locale}', {intl l='South Kalimantan' locale=$locale}),
|
||||
(257, '{$locale}', {intl l='South Sulawesi' locale=$locale}),
|
||||
(258, '{$locale}', {intl l='South Sumatra' locale=$locale}),
|
||||
(259, '{$locale}', {intl l='West Java' locale=$locale}),
|
||||
(260, '{$locale}', {intl l='West Kalimantan' locale=$locale}),
|
||||
(261, '{$locale}', {intl l='West Nusa Tenggara' locale=$locale}),
|
||||
(262, '{$locale}', {intl l='Lambang Provinsi Papua Barat' locale=$locale}),
|
||||
(263, '{$locale}', {intl l='West Sulawesi' locale=$locale}),
|
||||
(264, '{$locale}', {intl l='West Sumatra' locale=$locale}),
|
||||
(265, '{$locale}', {intl l='Yogyakarta' locale=$locale}),
|
||||
(266, '{$locale}', {intl l='Aichi' locale=$locale}),
|
||||
(267, '{$locale}', {intl l='Akita' locale=$locale}),
|
||||
(268, '{$locale}', {intl l='Aomori' locale=$locale}),
|
||||
(269, '{$locale}', {intl l='Chiba' locale=$locale}),
|
||||
(270, '{$locale}', {intl l='Ehime' locale=$locale}),
|
||||
(271, '{$locale}', {intl l='Fukui' locale=$locale}),
|
||||
(272, '{$locale}', {intl l='Fukuoka' locale=$locale}),
|
||||
(273, '{$locale}', {intl l='Fukushima' locale=$locale}),
|
||||
(274, '{$locale}', {intl l='Gifu' locale=$locale}),
|
||||
(275, '{$locale}', {intl l='Gunma' locale=$locale}),
|
||||
(276, '{$locale}', {intl l='Hiroshima' locale=$locale}),
|
||||
(277, '{$locale}', {intl l='Hokkaido' locale=$locale}),
|
||||
(278, '{$locale}', {intl l='Hyogo' locale=$locale}),
|
||||
(279, '{$locale}', {intl l='Ibaraki' locale=$locale}),
|
||||
(280, '{$locale}', {intl l='Ishikawa' locale=$locale}),
|
||||
(281, '{$locale}', {intl l='Iwate' locale=$locale}),
|
||||
(282, '{$locale}', {intl l='Kagawa' locale=$locale}),
|
||||
(283, '{$locale}', {intl l='Kagoshima' locale=$locale}),
|
||||
(284, '{$locale}', {intl l='Kanagawa' locale=$locale}),
|
||||
(285, '{$locale}', {intl l='Kochi' locale=$locale}),
|
||||
(286, '{$locale}', {intl l='Kumamoto' locale=$locale}),
|
||||
(287, '{$locale}', {intl l='Kyoto' locale=$locale}),
|
||||
(288, '{$locale}', {intl l='Mie' locale=$locale}),
|
||||
(289, '{$locale}', {intl l='Miyagi' locale=$locale}),
|
||||
(290, '{$locale}', {intl l='Miyazaki' locale=$locale}),
|
||||
(291, '{$locale}', {intl l='Nagano' locale=$locale}),
|
||||
(292, '{$locale}', {intl l='Nagasaki' locale=$locale}),
|
||||
(293, '{$locale}', {intl l='Nara' locale=$locale}),
|
||||
(294, '{$locale}', {intl l='Niigata' locale=$locale}),
|
||||
(295, '{$locale}', {intl l='Oita' locale=$locale}),
|
||||
(296, '{$locale}', {intl l='Okayama' locale=$locale}),
|
||||
(297, '{$locale}', {intl l='Okinawa' locale=$locale}),
|
||||
(298, '{$locale}', {intl l='Osaka' locale=$locale}),
|
||||
(299, '{$locale}', {intl l='Saga' locale=$locale}),
|
||||
(300, '{$locale}', {intl l='Saitama' locale=$locale}),
|
||||
(301, '{$locale}', {intl l='Shiga' locale=$locale}),
|
||||
(302, '{$locale}', {intl l='Shimane' locale=$locale}),
|
||||
(303, '{$locale}', {intl l='Shizuoka' locale=$locale}),
|
||||
(304, '{$locale}', {intl l='Tochigi' locale=$locale}),
|
||||
(305, '{$locale}', {intl l='Tokushima' locale=$locale}),
|
||||
(306, '{$locale}', {intl l='Tokyo' locale=$locale}),
|
||||
(307, '{$locale}', {intl l='Tottori' locale=$locale}),
|
||||
(308, '{$locale}', {intl l='Toyama' locale=$locale}),
|
||||
(309, '{$locale}', {intl l='Wakayama' locale=$locale}),
|
||||
(310, '{$locale}', {intl l='Yamagata' locale=$locale}),
|
||||
(311, '{$locale}', {intl l='Yamaguchi' locale=$locale}),
|
||||
(312, '{$locale}', {intl l='Yamanashi' locale=$locale}),
|
||||
(313, '{$locale}', ''),
|
||||
(314, '{$locale}', ''),
|
||||
(315, '{$locale}', ''),
|
||||
(316, '{$locale}', ''),
|
||||
(317, '{$locale}', ''){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Add new column in lang table
|
||||
ALTER TABLE `lang` ADD `active` BOOLEAN NOT NULL DEFAULT FALSE AFTER `decimals` ;
|
||||
ALTER TABLE `lang` ADD `visible` TINYINT NOT NULL DEFAULT '0' AFTER `active` ;
|
||||
|
||||
-- Update lang
|
||||
UPDATE `lang` SET `active` = '1', `visible` = '1' WHERE 1;
|
||||
|
||||
-- add missing primary key
|
||||
ALTER TABLE `coupon_customer_count` ADD PRIMARY KEY(`coupon_id`, `customer_id`);
|
||||
ALTER TABLE `ignored_module_hook` ADD PRIMARY KEY(`module_id`, `hook_id`);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
182
setup/update/tpl/2.3.0-alpha2.sql.tpl
Normal file
182
setup/update/tpl/2.3.0-alpha2.sql.tpl
Normal file
@@ -0,0 +1,182 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.0-alpha2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='alpha2' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- Add column unsubscribed in newsletter table
|
||||
ALTER TABLE `newsletter` ADD `unsubscribed` TINYINT(1) NOT NULL DEFAULT '0' AFTER `locale`;
|
||||
|
||||
-- add admin email
|
||||
ALTER TABLE `admin` ADD `email` VARCHAR(255) NOT NULL AFTER `remember_me_serial` ;
|
||||
ALTER TABLE `admin` ADD `password_renew_token` VARCHAR(255) NOT NULL AFTER `email` ;
|
||||
|
||||
-- add admin password renew message
|
||||
|
||||
SELECT @max := MAX(`id`) FROM `message`;
|
||||
SET @max := @max+1;
|
||||
|
||||
INSERT INTO `message` (`id`, `name`, `secured`, `text_layout_file_name`, `text_template_file_name`, `html_layout_file_name`, `html_template_file_name`, `created_at`, `updated_at`) VALUES
|
||||
(@max, 'new_admin_password', NULL, NULL, 'admin_password.txt', NULL, 'admin_password.html', NOW(), NOW());
|
||||
|
||||
INSERT INTO `message_i18n` (`id`, `locale`, `title`, `subject`, `text_message`, `html_message`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max, '{$locale}', {intl l='Mail sent to an administrator who requested a new password' locale=$locale}, {intl l='New password request on %store' store={config key="store_name"} locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Insert a fake email address for administrators, to trigger the admin update dialog
|
||||
-- at next admin login.
|
||||
|
||||
UPDATE `admin` set email = CONCAT('CHANGE_ME_', ID);
|
||||
|
||||
ALTER TABLE `admin` ADD UNIQUE `email_UNIQUE` (`email`);
|
||||
|
||||
-- additional config variables
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `config`;
|
||||
|
||||
INSERT INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'minimum_admin_password_length', '4', 0, 0, NOW(), NOW()),
|
||||
(@max_id + 2, 'enable_lost_admin_password_recovery', '1', 0, 0, NOW(), NOW()),
|
||||
(@max_id + 3, 'notify_newsletter_subscription', '1', 0, 0, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='The minimum length required for an administrator password' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 2, '{$locale}', {intl l='Allow an administrator to recreate a lost password (1 = yes, 0 = no)' locale=$locale}, NULL, NULL, NULL),
|
||||
(@max_id + 3, '{$locale}', {intl l='Send a confirmation email to newsletter subscribers (1 = yes, 0 = no)' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Additional hooks
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'sale.top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+2, 'sale.bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+3, 'sale.main-top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+4, 'sale.main-bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+5, 'sale.content-top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+6, 'sale.content-bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+7, 'sale.stylesheet', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+8, 'sale.after-javascript-include', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+9, 'sale.javascript-initialization', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+10, 'account-order.invoice-address-bottom', 1, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+11, 'account-order.delivery-address-bottom', 1, 1, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+12, 'newsletter-unsubscribe.top', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+13, 'newsletter-unsubscribe.bottom', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+14, 'newsletter-unsubscribe.stylesheet', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+15, 'newsletter-unsubscribe.after-javascript-include', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+16, 'newsletter-unsubscribe.javascript-initialization', 1, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Sale - at the top' locale=$locale}, NULL, NULL),
|
||||
(@max_id+2, '{$locale}', {intl l='Sale - at the bottom' locale=$locale}, NULL, NULL),
|
||||
(@max_id+3, '{$locale}', {intl l='Sale - at the top of the main area' locale=$locale}, NULL, NULL),
|
||||
(@max_id+4, '{$locale}', {intl l='Sale - at the bottom of the main area' locale=$locale}, NULL, NULL),
|
||||
(@max_id+5, '{$locale}', {intl l='Sale - before the main content area' locale=$locale}, NULL, NULL),
|
||||
(@max_id+6, '{$locale}', {intl l='Sale - after the main content area' locale=$locale}, NULL, NULL),
|
||||
(@max_id+7, '{$locale}', {intl l='Sale - CSS stylesheet' locale=$locale}, NULL, NULL),
|
||||
(@max_id+8, '{$locale}', {intl l='Sale - after javascript include' locale=$locale}, NULL, NULL),
|
||||
(@max_id+9, '{$locale}', {intl l='Sale - javascript initialization' locale=$locale}, NULL, NULL),
|
||||
(@max_id+10, '{$locale}', {intl l='Order details - after invoice address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+11, '{$locale}', {intl l='Order details - after delivery address' locale=$locale}, NULL, NULL),
|
||||
(@max_id+12, '{$locale}', {intl l='Newsletter unsubscribe page - at the top' locale=$locale}, NULL, NULL),
|
||||
(@max_id+13, '{$locale}', {intl l='Newsletter unsubscribe page - at the bottom' locale=$locale}, NULL, NULL),
|
||||
(@max_id+14, '{$locale}', {intl l='Newsletter unsubscribe page - CSS stylesheet' locale=$locale}, NULL, NULL),
|
||||
(@max_id+15, '{$locale}', {intl l='Newsletter unsubscribe page - after javascript include' locale=$locale}, NULL, NULL),
|
||||
(@max_id+16, '{$locale}', {intl l='Newsletter unsubscribe page - after javascript initialisation' locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Update module version column
|
||||
ALTER TABLE `module` MODIFY `version` varchar(25) NOT NULL DEFAULT '';
|
||||
|
||||
-- Add new column in coupon table
|
||||
ALTER TABLE `coupon` ADD `start_date` DATETIME AFTER`is_enabled`;
|
||||
ALTER TABLE `coupon` ADD INDEX `idx_start_date` (`start_date`);
|
||||
|
||||
-- Add new column in coupon version table
|
||||
ALTER TABLE `coupon_version` ADD `start_date` DATETIME AFTER`is_enabled`;
|
||||
|
||||
-- Add new column in order coupon table
|
||||
ALTER TABLE `order_coupon` ADD `start_date` DATETIME AFTER`description`;
|
||||
|
||||
-- Add new column in attribute combination table
|
||||
ALTER TABLE `attribute_combination` ADD `position` INT NULL AFTER `product_sale_elements_id`;
|
||||
|
||||
-- Add newsletter subscription confirmation message
|
||||
|
||||
SELECT @max := MAX(`id`) FROM `message`;
|
||||
SET @max := @max+1;
|
||||
|
||||
INSERT INTO `message` (`id`, `name`, `secured`, `text_layout_file_name`, `text_template_file_name`, `html_layout_file_name`, `html_template_file_name`, `created_at`, `updated_at`) VALUES
|
||||
(@max, 'newsletter_subscription_confirmation', NULL, NULL, 'newsletter_subscription_confirmation.txt', NULL, 'newsletter_subscription_confirmation.html', NOW(), NOW());
|
||||
|
||||
INSERT INTO `message_i18n` (`id`, `locale`, `title`, `subject`, `text_message`, `html_message`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max, '{$locale}', {intl l='Mail sent after a subscription to newsletter' locale=$locale}, {intl l='Your subscription to %store newsletter' locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- add new config variables number_default_results_per_page
|
||||
SELECT @max := IFNULL(MAX(`id`),0) FROM `config`;
|
||||
|
||||
INSERT INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES (@max+1, 'number_default_results_per_page.product_list', '20', '0', '0', NOW(), NOW());
|
||||
INSERT INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES (@max+2, 'number_default_results_per_page.order_list', '20', '0', '0', NOW(), NOW());
|
||||
INSERT INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES (@max+3, 'number_default_results_per_page.customer_list', '20', '0', '0', NOW(), NOW());
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `chapo`, `description`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max+1, '{$locale}', {intl l='Number by default of results per page for product list' locale=$locale}, NUll, NULL, NULL),
|
||||
(@max+2, '{$locale}', {intl l='Number by default of results per page for order list' locale=$locale}, NUll, NULL, NULL),
|
||||
(@max+3, '{$locale}', {intl l='Number by default of results per page for customer list' locale=$locale}, NUll, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Add module HookAdminHome
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `module`;
|
||||
SELECT @max_classic_position := IFNULL(MAX(`position`),0) FROM `module` WHERE `type`=1;
|
||||
|
||||
INSERT INTO `module` (`id`, `code`, `type`, `activate`, `position`, `full_namespace`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'HookAdminHome', 1, 1, @max_classic_position+1, 'HookAdminHome\\HookAdminHome', NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `module_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Displays the default blocks on the homepage of the administration' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Update customer lang FK
|
||||
ALTER TABLE `customer` CHANGE `lang` `lang_id` INT(11) NULL DEFAULT NULL;
|
||||
ALTER TABLE `customer` ADD INDEX `idx_email` (`email`);
|
||||
ALTER TABLE `customer` ADD INDEX `idx_customer_lang_id` (`lang_id`);
|
||||
ALTER TABLE `customer` ADD CONSTRAINT `fk_customer_lang_id` FOREIGN KEY (`lang_id`) REFERENCES `lang` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT;
|
||||
|
||||
OPTIMIZE TABLE `customer`;
|
||||
|
||||
|
||||
-- Update customer version
|
||||
ALTER TABLE `customer_version` CHANGE `lang` `lang_id` INT(11) NULL DEFAULT NULL;
|
||||
|
||||
|
||||
-- Update newletter index
|
||||
ALTER TABLE `newsletter` ADD INDEX `idx_unsubscribed` (`unsubscribed`);
|
||||
|
||||
OPTIMIZE TABLE `newsletter`;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
18
setup/update/tpl/2.3.0-beta1.sql.tpl
Normal file
18
setup/update/tpl/2.3.0-beta1.sql.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.0-beta1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='beta1' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- Add column position in the product_category and content_folder table
|
||||
ALTER TABLE `product_category` ADD `position` INT(11) NOT NULL AFTER `default_category`;
|
||||
ALTER TABLE `content_folder` ADD `position` INT(11) NOT NULL AFTER `default_folder`;
|
||||
|
||||
UPDATE `product_category` INNER JOIN `product` ON `product_category`.`product_id`=`product`.`id` SET `product_category`.`position`=`product`.`position`;
|
||||
|
||||
ALTER TABLE `product` CHANGE `position` `position` INT(11) COMMENT 'This column is deprecated since 2.3, and will be removed in 2.5';
|
||||
ALTER TABLE `content` CHANGE `position` `position` INT(11) COMMENT 'This column is deprecated since 2.3, and will be removed in 2.5';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
12
setup/update/tpl/2.3.0-beta2.sql.tpl
Normal file
12
setup/update/tpl/2.3.0-beta2.sql.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.0-beta2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='beta2' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- Fix content folder position
|
||||
UPDATE `content_folder` INNER JOIN `content` ON `content_folder`.`content_id`=`content`.`id` SET `content_folder`.`position`=`content`.`position`;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
12
setup/update/tpl/2.3.0.sql.tpl
Normal file
12
setup/update/tpl/2.3.0.sql.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.0' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- Fix lang date/time format for fr_FR
|
||||
UPDATE `lang` SET datetime_format = 'd/m/Y H:i:s' WHERE locale = 'fr_FR' and datetime_format = 'd/m/y H:i:s';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.3.1.sql.tpl
Normal file
9
setup/update/tpl/2.3.1.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.3.2.sql.tpl
Normal file
9
setup/update/tpl/2.3.2.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.3.3.sql.tpl
Normal file
9
setup/update/tpl/2.3.3.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.3' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
143
setup/update/tpl/2.3.4.sql.tpl
Normal file
143
setup/update/tpl/2.3.4.sql.tpl
Normal file
@@ -0,0 +1,143 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.4' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
-- Additional hooks on order-invoice page
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'order-invoice.coupon-form', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+2, 'order-invoice.payment-form', 1, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+3, 'delivery.product-list', 3, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+4, 'invoice.product-list', 3, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+5, 'email-html.order-confirmation.product-list', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+6, 'email-txt.order-confirmation.product-list', 4, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+7, 'account-order.product-list', 1, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Order invoice page - bottom of coupon form' locale=$locale}, NULL, NULL),
|
||||
(@max_id+2, '{$locale}', {intl l='Order invoice page - bottom of payment form' locale=$locale}, NULL, NULL),
|
||||
(@max_id+3, '{$locale}', {intl l='Delivery - after product information' locale=$locale}, NULL, NULL),
|
||||
(@max_id+4, '{$locale}', {intl l='Invoice - after product information' locale=$locale}, NULL, NULL),
|
||||
(@max_id+5, '{$locale}', {intl l='Email html - order notification - after product information' locale=$locale}, NULL, NULL),
|
||||
(@max_id+6, '{$locale}', {intl l='Email txt - order notification - after product information' locale=$locale}, NULL, NULL),
|
||||
(@max_id+7, '{$locale}', {intl l='Account order - after product information' locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Customer confirmation
|
||||
|
||||
ALTER TABLE `customer` ADD `enable` TINYINT DEFAULT 0 AFTER `remember_me_serial`;
|
||||
ALTER TABLE `customer` ADD `confirmation_token` VARCHAR(255) AFTER `enable`;
|
||||
ALTER TABLE `customer_version` ADD `enable` TINYINT DEFAULT 0 AFTER `remember_me_serial`;
|
||||
ALTER TABLE `customer_version` ADD `confirmation_token` VARCHAR(255) AFTER `enable`;
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `config`;
|
||||
|
||||
INSERT INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id + 1, 'customer_email_confirmation', '0', 0, 0, NOW(), NOW());
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `chapo`, `description`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id + 1, '{$locale}', {intl l='Customer account creation should be confirmed by email (1: yes, 0: no)' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SELECT @max_id :=IFNULL(MAX(`id`),0) FROM `message`;
|
||||
INSERT INTO `message` (`id`, `name`, `secured`, `text_layout_file_name`, `text_template_file_name`, `html_layout_file_name`, `html_template_file_name`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'customer_confirmation', NULL, NULL, 'customer_confirmation.txt', NULL, 'customer_confirmation.html', NOW(), NOW());
|
||||
|
||||
INSERT INTO `message_i18n` (`id`, `locale`, `title`, `subject`, `text_message`, `html_message`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Mail sent to the customer to confirm its account' locale=$locale}, {intl l='Confirm your %store account' locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
-- Order status improvement
|
||||
|
||||
ALTER TABLE `order_status` ADD `color` CHAR(7) NOT NULL AFTER `code`;
|
||||
ALTER TABLE `order_status` ADD `position` INT(11) NOT NULL AFTER `color`;
|
||||
ALTER TABLE `order_status` ADD `protected_status` TINYINT(1) NOT NULL DEFAULT '0' AFTER `position`;
|
||||
|
||||
UPDATE `order_status` SET `position` = `id` WHERE 1;
|
||||
UPDATE `order_status` SET `color` = '#f0ad4e' WHERE `code` = 'not_paid';
|
||||
UPDATE `order_status` SET `color` = '#5cb85c' WHERE `code` = 'paid';
|
||||
UPDATE `order_status` SET `color` = '#f39922' WHERE `code` = 'processing';
|
||||
UPDATE `order_status` SET `color` = '#5bc0de' WHERE `code` = 'sent';
|
||||
UPDATE `order_status` SET `color` = '#d9534f' WHERE `code` = 'canceled';
|
||||
UPDATE `order_status` SET `color` = '#986dff' WHERE `code` = 'refunded';
|
||||
UPDATE `order_status` SET `color` = '#777777' WHERE `code` NOT IN ('not_paid', 'paid', 'processing', 'sent', 'canceled', 'refunded');
|
||||
UPDATE `order_status` SET `protected_status` = 1 WHERE `code` IN ('not_paid', 'paid', 'processing', 'sent', 'canceled', 'refunded');
|
||||
|
||||
SELECT @max_id := MAX(`id`) FROM `resource`;
|
||||
|
||||
INSERT INTO resource (`id`, `code`, `created_at`, `updated_at`) VALUES (@max_id+1, 'admin.configuration.order-status', NOW(), NOW());
|
||||
|
||||
INSERT INTO resource_i18n (`id`, `locale`, `title`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Configuration order status' locale=$locale}){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SELECT @max_id := IFNULL(MAX(`id`),0) FROM `hook`;
|
||||
|
||||
INSERT INTO `hook` (`id`, `code`, `type`, `by_module`, `block`, `native`, `activate`, `position`, `created_at`, `updated_at`) VALUES
|
||||
(@max_id+1, 'configuration.order-path.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+2, 'configuration.order-path.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+3, 'order-status.top', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+4, 'order-status.table-header', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+5, 'order-status.table-row', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+6, 'order-status.bottom', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+7, 'order-status.form.creation', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+8, 'order-status.form.modification', 2, 0, 0, 1, 1, 1, NOW(), NOW()),
|
||||
(@max_id+9, 'order-status.js', 2, 0, 0, 1, 1, 1, NOW(), NOW())
|
||||
;
|
||||
|
||||
INSERT INTO `hook_i18n` (`id`, `locale`, `title`, `description`, `chapo`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max_id+1, '{$locale}', {intl l='Configuration - Order path - top' locale=$locale}, NULL, NULL),
|
||||
(@max_id+2, '{$locale}', {intl l='Configuration - Order path - bottom' locale=$locale}, NULL, NULL),
|
||||
(@max_id+3, '{$locale}', {intl l='Order status - top' locale=$locale}, NULL, NULL),
|
||||
(@max_id+4, '{$locale}', {intl l='Order status - bottom' locale=$locale}, NULL, NULL),
|
||||
(@max_id+5, '{$locale}', {intl l='Order status - table header' locale=$locale}, NULL, NULL),
|
||||
(@max_id+6, '{$locale}', {intl l='Order status - table row' locale=$locale}, NULL, NULL),
|
||||
(@max_id+7, '{$locale}', {intl l='Order status - form creation' locale=$locale}, NULL, NULL),
|
||||
(@max_id+8, '{$locale}', {intl l='Order status - form modification' locale=$locale}, NULL, NULL),
|
||||
(@max_id+9, '{$locale}', {intl l='Order status - JavaScript' locale=$locale}, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
|
||||
-- Additional usage_canceled column in order_coupon table
|
||||
ALTER TABLE `order_coupon` ADD `usage_canceled` TINYINT(1) DEFAULT '0' AFTER `per_customer_usage_count`;
|
||||
|
||||
-- add new config variables number_default_results_per_page
|
||||
SELECT @max := IFNULL(MAX(`id`),0) FROM `config`;
|
||||
|
||||
INSERT INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
(@max+1, 'number_default_results_per_page.coupon_list', '20', '0', '0', NOW(), NOW());
|
||||
|
||||
INSERT INTO `config_i18n` (`id`, `locale`, `title`, `chapo`, `description`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@max+1, '{$locale}', {intl l='Default number of coupons per page on coupon list' locale=$locale}, NUll, NULL, NULL){if ! $locale@last},{/if}
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
ALTER TABLE `module` ADD `mandatory` TINYINT NOT NULL DEFAULT '0' AFTER `full_namespace`, ADD `hidden` TINYINT NOT NULL DEFAULT '0' AFTER `mandatory`;
|
||||
UPDATE `module` SET `mandatory` = 0, `hidden` = 0;
|
||||
UPDATE `module` SET `hidden` = 1 WHERE `code` = 'Front';
|
||||
UPDATE `module` SET `mandatory` = 1, `hidden` = 1 WHERE `code` = 'TheliaSmarty';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.3.5.sql.tpl
Normal file
9
setup/update/tpl/2.3.5.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.3.5' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='5' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.4.0-alpha1.sql.tpl
Normal file
9
setup/update/tpl/2.4.0-alpha1.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.4.0' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='alpha1' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
21
setup/update/tpl/2.4.0-alpha2.sql.tpl
Normal file
21
setup/update/tpl/2.4.0-alpha2.sql.tpl
Normal file
@@ -0,0 +1,21 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.4.0-alpha2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='alpha2' WHERE `name`='thelia_extra_version';
|
||||
|
||||
ALTER TABLE `feature_product` ADD `is_free_text` TINYINT(1) NOT NULL DEFAULT '0' AFTER `free_text_value`;
|
||||
ALTER TABLE `feature_product` MODIFY COLUMN `free_text_value` TEXT COMMENT 'deprecated';
|
||||
UPDATE `feature_product` SET `is_free_text`=IF(`free_text_value` IS NULL, 0, 1);
|
||||
|
||||
DELIMITER $$
|
||||
CREATE TRIGGER `remove_free_text_feature_av` AFTER DELETE ON `feature_product`
|
||||
FOR EACH ROW IF OLD.`is_free_text` = 1 THEN
|
||||
DELETE FROM `feature_av` WHERE `id` = OLD.`feature_av_id`;
|
||||
END IF
|
||||
$$
|
||||
DELIMITER ;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.4.0.sql.tpl
Normal file
9
setup/update/tpl/2.4.0.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.4.0' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='0' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.4.1.sql.tpl
Normal file
9
setup/update/tpl/2.4.1.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.4.1' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='1' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/tpl/2.4.2.sql.tpl
Normal file
9
setup/update/tpl/2.4.2.sql.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.4.2' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
25
setup/update/tpl/2.4.3.sql.tpl
Normal file
25
setup/update/tpl/2.4.3.sql.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.4.3' WHERE `name`='thelia_version';
|
||||
UPDATE `config` SET `value`='2' WHERE `name`='thelia_major_version';
|
||||
UPDATE `config` SET `value`='4' WHERE `name`='thelia_minus_version';
|
||||
UPDATE `config` SET `value`='3' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SELECT @configIdMax := IFNULL(MAX(`id`),0) FROM `config`;
|
||||
|
||||
-- add new config variable allow_module_zip_install if it doesn't exists
|
||||
INSERT IGNORE INTO `config` (`id`, `name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
|
||||
(@configIdMax+1, 'allow_module_zip_install', '1', 0, 0, NOW(), NOW())
|
||||
|
||||
;
|
||||
|
||||
-- add new locales for allow_module_zip_install config variable if it doesn't exists
|
||||
INSERT IGNORE INTO `config_i18n` (`id`, `locale`, `title`, `chapo`, `description`, `postscriptum`) VALUES
|
||||
{foreach $locales as $locale}
|
||||
(@configIdMax+1, '{$locale}', {intl l='Allow module installation from ZIP files.' locale=$locale}, NULL, NULL, NULL){if ! $locale@last},{/if}
|
||||
|
||||
{/foreach}
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
Reference in New Issue
Block a user