Inital commit
This commit is contained in:
10
setup/update/instruction/2.3.0-alpha1.md
Normal file
10
setup/update/instruction/2.3.0-alpha1.md
Normal file
@@ -0,0 +1,10 @@
|
||||
The system of country has changed.
|
||||
Countries has been split in countries and states.
|
||||
|
||||
The migration process is tricky and couldn't be automated.
|
||||
|
||||
The update proccess has created new countries (even if it exists) and associated states.
|
||||
A module (**TheliaMigrateCountry**) has been created to help you to migrate between the 2 systems.
|
||||
|
||||
If you want to use states/provinces please activate the module **TheliaMigrateCountry** in your backoffice,
|
||||
and go to the *migrate country* page to execute the migration process.
|
||||
0
setup/update/php/.gitkeep
Normal file
0
setup/update/php/.gitkeep
Normal file
7
setup/update/php/2.0.7.php
Normal file
7
setup/update/php/2.0.7.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$secret = \Thelia\Tools\TokenProvider::generateToken();
|
||||
|
||||
$sql = "UPDATE `config` SET `value`=? WHERE `name`='form.secret'";
|
||||
|
||||
$database->execute($sql, [$secret]);
|
||||
7
setup/update/php/2.1.3.php
Normal file
7
setup/update/php/2.1.3.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
$secret = \Thelia\Tools\TokenProvider::generateToken();
|
||||
|
||||
$sql = "UPDATE `config` SET `value`=? WHERE `name`='form.secret'";
|
||||
|
||||
$database->execute($sql, [$secret]);
|
||||
42
setup/update/php/2.2.0-beta1.php
Normal file
42
setup/update/php/2.2.0-beta1.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
$pdo = $database->getConnection();
|
||||
|
||||
// Get locale
|
||||
$locale = 'fr_FR';
|
||||
|
||||
$sqlGetLocale = "SELECT `locale` FROM `lang` WHERE `by_default` = :by_default";
|
||||
$stmtGetLocale = $pdo->prepare($sqlGetLocale);
|
||||
$stmtGetLocale->execute([':by_default' => 1]);
|
||||
$resultLocales = $stmtGetLocale->fetchAll();
|
||||
|
||||
foreach ($resultLocales as $defaultLocale) {
|
||||
$locale = $defaultLocale['locale'];
|
||||
}
|
||||
|
||||
// Get id, feature_id and free_text_value from feature_product
|
||||
$sqlGetFeatureProduct = "SELECT `id`, `feature_id`, `free_text_value` FROM `feature_product` WHERE `feature_av_id` IS NULL";
|
||||
$stmtGetFeatureProduct = $pdo->prepare($sqlGetFeatureProduct);
|
||||
$stmtGetFeatureProduct->execute([':feature_av_id' => NULL]);
|
||||
|
||||
while ($featureProduct = $stmtGetFeatureProduct->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
// Create new feature_av with the feature_id
|
||||
$sqlCreateFeatureAv = "INSERT INTO `feature_av` (feature_id, `position`) VALUES (:feature_id, :feature_position)";
|
||||
$stmtCreateFeatureAv = $pdo->prepare($sqlCreateFeatureAv);
|
||||
$stmtCreateFeatureAv->execute([':feature_id' => $featureProduct['feature_id'], ':feature_position' => 1]);
|
||||
|
||||
// Get id from created feature_av
|
||||
$createdFeatureAvId = $pdo->lastInsertId();
|
||||
|
||||
// Create new feature_av_i18n
|
||||
$sqlCreateFeatureAvI18n = "INSERT INTO `feature_av_i18n` (id, locale, title) VALUES (:id, :locale, :title)";
|
||||
$stmtCreateFeatureAvI18n = $pdo->prepare($sqlCreateFeatureAvI18n);
|
||||
$stmtCreateFeatureAvI18n->execute([':id' => $createdFeatureAvId, ':locale' => $locale, ':title' => $featureProduct['free_text_value']]);
|
||||
|
||||
// Update old NULL feature_av_id and textual free_text_value values from feature_product
|
||||
$sqlUpdateFeatureProduct = "UPDATE feature_product SET feature_av_id = :feature_av_id, free_text_value = :free_text_value WHERE id = :featureProductId";
|
||||
$stmtUpdateFeatureProduct = $pdo->prepare($sqlUpdateFeatureProduct);
|
||||
$stmtUpdateFeatureProduct->execute([':feature_av_id' => $createdFeatureAvId, ':free_text_value' => 1, ':featureProductId' => $featureProduct['id']]);
|
||||
}
|
||||
|
||||
53
setup/update/php/2.2.0-beta3.php
Normal file
53
setup/update/php/2.2.0-beta3.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
$pdo = $database->getConnection();
|
||||
|
||||
// Test if price columns are in float
|
||||
$sqlGetFloat = "SELECT COLUMN_NAME "
|
||||
. "FROM INFORMATION_SCHEMA.COLUMNS "
|
||||
. "WHERE TABLE_SCHEMA LIKE DATABASE() AND TABLE_NAME LIKE 'product_price' AND COLUMN_NAME LIKE 'price' AND COLUMN_TYPE LIKE 'float%'";
|
||||
|
||||
$stmtGetFloat = $pdo->query($sqlGetFloat);
|
||||
|
||||
// alter tables to convert float to decimal
|
||||
if ($stmtGetFloat->rowCount() !== 0) {
|
||||
$columns = [
|
||||
['product_price', 'price'],
|
||||
['product_price', 'promo_price'],
|
||||
['order_product', 'price'],
|
||||
['order', 'discount'],
|
||||
['order', 'postage'],
|
||||
['order', 'postage_tax'],
|
||||
['order_version', 'discount'],
|
||||
['order_version', 'postage'],
|
||||
['order_version', 'postage_tax'],
|
||||
['order_product_tax', 'amount'],
|
||||
['order_product_tax', 'promo_amount'],
|
||||
['cart', 'discount'],
|
||||
['cart_item', 'price'],
|
||||
['cart_item', 'promo_price'],
|
||||
['order_coupon', 'amount']
|
||||
];
|
||||
|
||||
$queries = [
|
||||
"ALTER TABLE `:table:` ADD COLUMN `:column:_temp` DECIMAL( 16, 6 ) NOT NULL DEFAULT '0.00000000' AFTER `:column:`",
|
||||
"UPDATE `:table:` SET `:column:_temp` = CAST(`:column:` as CHAR)",
|
||||
"ALTER TABLE `:table:` DROP COLUMN `:column:`",
|
||||
"ALTER TABLE `:table:` CHANGE COLUMN `:column:_temp` `:column:` DECIMAL( 16, 6 ) NOT NULL DEFAULT '0.00000000'",
|
||||
];
|
||||
|
||||
foreach ($columns as $column) {
|
||||
$args = [
|
||||
':table:' => $column[0],
|
||||
':column:' => $column[1]
|
||||
];
|
||||
|
||||
foreach ($queries as $query) {
|
||||
$stmtConvert = $pdo->prepare(strtr($query, $args));
|
||||
$stmtConvert->execute();
|
||||
}
|
||||
}
|
||||
|
||||
$stmtConvert = $pdo->prepare("ALTER TABLE `order_product` CHANGE `promo_price` `promo_price` DECIMAL( 16, 6 ) NOT NULL DEFAULT '0.00000000'");
|
||||
$stmtConvert->execute();
|
||||
}
|
||||
29
setup/update/php/2.3.0-alpha2.php
Normal file
29
setup/update/php/2.3.0-alpha2.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
$fs = new \Symfony\Component\Filesystem\Filesystem();
|
||||
|
||||
$modules = [
|
||||
'Carousel',
|
||||
'Cheque',
|
||||
'Colissimo',
|
||||
'HookAnalytics',
|
||||
'HookSocial',
|
||||
'Tinymce'
|
||||
];
|
||||
|
||||
foreach ($modules as $moduleCode) {
|
||||
$path = THELIA_MODULE_DIR . $moduleCode . DS . 'AdminIncludes';
|
||||
|
||||
if ($fs->exists($path)) {
|
||||
try {
|
||||
$fs->remove($path);
|
||||
} catch (Exception $e) {
|
||||
$message = sprintf(
|
||||
$this->trans('The update cannot delete the folder : "%s". Please delete this folder manually.'),
|
||||
$path
|
||||
);
|
||||
$this->log('warning', $message);
|
||||
$this->setMessage($message, 'warning');
|
||||
}
|
||||
}
|
||||
}
|
||||
0
setup/update/sql/.gitkeep
Normal file
0
setup/update/sql/.gitkeep
Normal file
24
setup/update/sql/2.0.0-RC1.sql
Normal file
24
setup/update/sql/2.0.0-RC1.sql
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
|
||||
(@max, 'de_DE', 'Ihr neues Passwort', 'Ihr neues Passwort', 'Ihr neues Passwort ist : {$password}', '<!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>Passwort Änderung für {config key="urlsite"} </title>\r\n{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}\r\n</head>\r\n<body>\r\n<div id="wrapper">\r\n<div id="entete">\r\n<h1 id="logotexte">{config key="store_name"}</h1>\r\n<h2 id="info">Passwort Änderung für</h2>\r\n<h5 id="mdp"> Sie haben Ihr Passwort vergessen <br />\\r\\nIhr neues Passwort ist <span style="font-size:80%">{$password}</span>.</h5>\r\n</div>\r\n</div>\r\n<p id="liencompte">Sie können Ihnen anmelden bei <a href="{config key="urlsite"}">{config key="urlsite"}</a>.<br /> Sie haben Ihr Passwort vergessen br />\\r\\nBitte ändern Sie das Passwort nach Ihre erste Anmeldung</p>\r\n</body>\r\n</html>'),
|
||||
(@max, 'en_US', 'Your new password', 'Your new password', 'Your new passord is : {$password}', '<!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>changing password email for {config key="urlsite"} </title>\r\n{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}\r\n</head>\r\n<body>\r\n<div id="wrapper">\r\n<div id="entete">\r\n<h1 id="logotexte">{config key="store_name"}</h1>\r\n<h2 id="info">changing password email for</h2>\r\n<h5 id="mdp"> You have lost your password <br />\\r\\nYour new password is <span style="font-size:80%">{$password}</span>.</h5>\r\n</div>\r\n</div>\r\n<p id="liencompte">You can now login at <a href="{config key="urlsite"}">{config key="urlsite"}</a>.<br /> You have lost your password <br />\\r\\nPlease, change this password after your first connection</p>\r\n</body>\r\n</html>'),
|
||||
(@max, 'es_ES', 'Su nueva contraseña', 'Su nueva contraseña', 'Su nueva contraseña es: {$password}', '<!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>cambio de correo electrónico contraseña para {config key="urlsite"} </title>\r\n{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}\r\n</head>\r\n<body>\r\n<div id="wrapper">\r\n<div id="entete">\r\n<h1 id="logotexte">{config key="store_name"}</h1>\r\n<h2 id="info">cambio de correo electrónico contraseña para</h2>\r\n<h5 id="mdp"> Ha perdido su contraseña < br / > \\r\\nSu nueva contraseña es <span style="font-size:80%">{$password}</span>.</h5>\r\n</div>\r\n</div>\r\n<p id="liencompte">Ahora puede entrar <a href="{config key="urlsite"}">{config key="urlsite"}</a>.<br /> Ha perdido su contraseña < br / > \\r\\nPor favor, cambiar esta contraseña después de su primera conexión</p>\r\n</body>\r\n</html>'),
|
||||
(@max, 'fr_FR', 'Votre nouveau mot de passe', 'Votre nouveau mot de passe', 'Votre nouveau mot de passe est : {$password}', '<!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>Changement du mot de passe pour {config key="urlsite"} </title>\r\n{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}\r\n</head>\r\n<body>\r\n<div id="wrapper">\r\n<div id="entete">\r\n<h1 id="logotexte">{config key="store_name"}</h1>\r\n<h2 id="info">Changement du mot de passe pour</h2>\r\n<h5 id="mdp"> Vous avez oublié votre mot de passe <br />\\r\\nVotre nouveau mot de passe est <span style="font-size:80%">{$password}</span>.</h5>\r\n</div>\r\n</div>\r\n<p id="liencompte">Vous pouvez maintenant vous connecter sur <a href="{config key="urlsite"}">{config key="urlsite"}</a>.<br /> Vous avez oublié votre mot de passe <br />\\r\\nVeuillez modifier ce mot de passe après votre première connexion</p>\r\n</body>\r\n</html>')
|
||||
;
|
||||
|
||||
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/sql/2.0.0-beta2.sql
Normal file
362
setup/update/sql/2.0.0-beta2.sql
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/sql/2.0.0-beta3.sql
Normal file
53
setup/update/sql/2.0.0-beta3.sql
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/sql/2.0.0-beta4.sql
Normal file
26
setup/update/sql/2.0.0-beta4.sql
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
|
||||
(LAST_INSERT_ID(), 'de_DE', 'Tinymce Wysiwyg Editor', NULL, NULL, NULL),
|
||||
(LAST_INSERT_ID(), 'en_US', 'tinymce wysiwyg editor', NULL, NULL, NULL),
|
||||
(LAST_INSERT_ID(), 'es_ES', 'editor tinymce wysiwyg', NULL, NULL, NULL),
|
||||
(LAST_INSERT_ID(), 'fr_FR', 'Editeur TinyMCE', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
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/sql/2.0.0.sql
Normal file
60
setup/update/sql/2.0.0.sql
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
|
||||
(@max, 'de_DE', 'Konfiguration / Cache'),
|
||||
(@max, 'en_US', 'Configuration / Cache'),
|
||||
(@max, 'es_ES', 'Configuración / caché'),
|
||||
(@max, 'fr_FR', 'Configuration / Cache')
|
||||
;
|
||||
|
||||
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
|
||||
(@max, 'de_DE', 'Back-Office Startseite'),
|
||||
(@max, 'en_US', 'Back-office home page'),
|
||||
(@max, 'es_ES', 'Página de inicio de back office'),
|
||||
(@max, 'fr_FR', 'Page d\'acceuil de l\'administration')
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
86
setup/update/sql/2.0.1.sql
Normal file
86
setup/update/sql/2.0.1.sql
Normal file
@@ -0,0 +1,86 @@
|
||||
# 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
|
||||
(@max, 'de_DE', 'Shop Informationen'),
|
||||
(@max+1, 'de_DE', 'Konfigurations Variablen'),
|
||||
(@max+2, 'de_DE', 'Administration Logs ansehen'),
|
||||
(@max+3, 'de_DE', 'Logs System Konfiguration'),
|
||||
(@max+4, 'de_DE', 'Erweiterte Konfiguration'),
|
||||
(@max+5, 'de_DE', 'Übersetzungen'),
|
||||
(@max+6, 'de_DE', 'Tools'),
|
||||
(@max+7, 'de_DE', 'Exporten-Verwaltung'),
|
||||
(@max+8, 'de_DE', 'Export für die Newsletter Angemeldeten'),
|
||||
(@max, 'en_US', 'Store information configuration'),
|
||||
(@max+1, 'en_US', 'Configuration variables'),
|
||||
(@max+2, 'en_US', 'View administration logs'),
|
||||
(@max+3, 'en_US', 'Logging system configuration'),
|
||||
(@max+4, 'en_US', 'Advanced configuration'),
|
||||
(@max+5, 'en_US', 'Translations'),
|
||||
(@max+6, 'en_US', 'Tools panel'),
|
||||
(@max+7, 'en_US', 'Back-office export management'),
|
||||
(@max+8, 'en_US', 'export of newsletter subscribers'),
|
||||
(@max, 'es_ES', 'Configuración de la información de tienda'),
|
||||
(@max+1, 'es_ES', 'Variables de configuración'),
|
||||
(@max+2, 'es_ES', 'Ver logs de administración'),
|
||||
(@max+3, 'es_ES', 'Configuración de sistema de registro'),
|
||||
(@max+4, 'es_ES', 'Configuración avanzada'),
|
||||
(@max+5, 'es_ES', 'Traducciones'),
|
||||
(@max+6, 'es_ES', 'Panel de herramientas'),
|
||||
(@max+7, 'es_ES', 'Gestor de exportación de Back Office'),
|
||||
(@max+8, 'es_ES', 'exportación de los suscriptores del boletín de noticias'),
|
||||
(@max, 'fr_FR', 'Configuration des informations sur la boutique'),
|
||||
(@max+1, 'fr_FR', 'Variables de configuration'),
|
||||
(@max+2, 'fr_FR', 'Consulter les logs d\'administration'),
|
||||
(@max+3, 'fr_FR', 'Configuration du système de log'),
|
||||
(@max+4, 'fr_FR', 'Configuration avancée'),
|
||||
(@max+5, 'fr_FR', 'Traductions'),
|
||||
(@max+6, 'fr_FR', 'Outils'),
|
||||
(@max+7, 'fr_FR', 'gestion des exports'),
|
||||
(@max+8, 'fr_FR', 'Export des inscrits à la newsletter')
|
||||
;
|
||||
|
||||
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/sql/2.0.10.sql
Normal file
8
setup/update/sql/2.0.10.sql
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/sql/2.0.11.sql
Normal file
8
setup/update/sql/2.0.11.sql
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/sql/2.0.12.sql
Normal file
8
setup/update/sql/2.0.12.sql
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/sql/2.0.2.sql
Normal file
129
setup/update/sql/2.0.2.sql
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
|
||||
(@max, 'de_DE', 'Hong Kong', '', '', ''),
|
||||
(@max, 'en_US', 'Hong Kong', '', '', ''),
|
||||
(@max, 'es_ES', 'Hong Kong', '', '', ''),
|
||||
(@max, 'fr_FR', 'Hong Kong', '', '', '')
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
596
setup/update/sql/2.0.3-beta.sql
Normal file
596
setup/update/sql/2.0.3-beta.sql
Normal file
@@ -0,0 +1,596 @@
|
||||
# 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
|
||||
(@max + 1, 'de_DE', 'Standart verfügbaren Bestand wenn check-available-stock gleich 0.', NULL, NULL, NULL),
|
||||
(@max + 2, 'de_DE', 'Die ID des Ordners mit Ihren Informations-Seiten: AGB, Impressum, ...', NULL, NULL, NULL),
|
||||
(@max + 3, 'de_DE', 'Ihr \'Allgemeine Geschäftsbedingungen \' ID.', NULL, NULL, NULL),
|
||||
(@max + 1, 'en_US', 'Default available stock when check-available-stock is set to 0.', NULL, NULL, NULL),
|
||||
(@max + 2, 'en_US', 'The ID of the folder containing your information pages : terms, imprint, ...', NULL, NULL, NULL),
|
||||
(@max + 3, 'en_US', 'The ID of the \'Terms & Conditions\' content.', NULL, NULL, NULL),
|
||||
(@max + 1, 'es_ES', 'Cuando check-available-stock es 0 stock disponible por defecto.', NULL, NULL, NULL),
|
||||
(@max + 2, 'es_ES', 'El ID de la carpeta que contiene sus páginas de información: términos, impresión,...', NULL, NULL, NULL),
|
||||
(@max + 3, 'es_ES', 'El ID de los contenidos de \'Términos y condiciones\'.', NULL, NULL, NULL),
|
||||
(@max + 1, 'fr_FR', 'Stock disponible par défaut quand check-available-stock est à 0.', NULL, NULL, NULL),
|
||||
(@max + 2, 'fr_FR', 'L\'ID du dossier contenant vos pages d\'informations : CGV, mentions légales, ...', NULL, NULL, NULL),
|
||||
(@max + 3, 'fr_FR', 'L\'ID du contenu de vos \'CGV\'.', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
# 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/sql/2.0.3-beta2.sql
Normal file
9
setup/update/sql/2.0.3-beta2.sql
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/sql/2.0.3.sql
Normal file
6
setup/update/sql/2.0.3.sql
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/sql/2.0.4.sql
Normal file
42
setup/update/sql/2.0.4.sql
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/sql/2.0.5.sql
Normal file
24
setup/update/sql/2.0.5.sql
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
|
||||
(@max_id + 1, 'de_DE', 'Suchen'),
|
||||
(@max_id + 1, 'en_US', 'Search'),
|
||||
(@max_id + 1, 'es_ES', 'Buscar'),
|
||||
(@max_id + 1, 'fr_FR', 'Recherche')
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
8
setup/update/sql/2.0.6.sql
Normal file
8
setup/update/sql/2.0.6.sql
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/sql/2.0.7.sql
Normal file
8
setup/update/sql/2.0.7.sql
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/sql/2.0.8.sql
Normal file
8
setup/update/sql/2.0.8.sql
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/sql/2.0.9.sql
Normal file
8
setup/update/sql/2.0.9.sql
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;
|
||||
3209
setup/update/sql/2.1.0-alpha1.sql
Normal file
3209
setup/update/sql/2.1.0-alpha1.sql
Normal file
File diff suppressed because it is too large
Load Diff
181
setup/update/sql/2.1.0-alpha2.sql
Normal file
181
setup/update/sql/2.1.0-alpha2.sql
Normal file
@@ -0,0 +1,181 @@
|
||||
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
|
||||
(@max_id + 1, 'de_DE', 'Ein dauerhaftes Cookie verwenden, um den Kundes-Warenkorb zu merken', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'de_DE', 'Name der Warenkorb-Cookie', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'de_DE', 'Dauer der Warenkorb-Cookie in dem Kunden-Browser, in Sekunden', NULL, NULL, NULL),
|
||||
(@max_id + 4, 'de_DE', 'URI mit Slash beendet erlauben', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'en_US', 'Use a persistent cookie to keep track of customer cart', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'en_US', 'Name the cart cookie', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'en_US', 'Life time of the cart cookie in the customer browser, in seconds', NULL, NULL, NULL),
|
||||
(@max_id + 4, 'en_US', 'Allow slash ended uri', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'es_ES', 'Usa una \'cookie\' persistente para mantener el trayecto del carrito del cliente', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'es_ES', 'Nombre la cookie de carrito', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'es_ES', 'Tiempo de vida de la cookie del carro en el navegador del cliente, en segundos', NULL, NULL, NULL),
|
||||
(@max_id + 4, 'es_ES', 'Permitir barra de fín de url', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'fr_FR', 'Utiliser un cookie persistant pour mémoriser le panier du client', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'fr_FR', 'Nom du cookie pour le panier', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'fr_FR', 'Durée de vie du cookie du panier dans le navigateur du client, en secondes', NULL, NULL, NULL),
|
||||
(@max_id + 4, 'fr_FR', 'Autoriser les URI terminées par un slash', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
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
|
||||
(@max_id+1, 'de_DE', 'Bestellung - Warenkorb oben', '', ''),
|
||||
(@max_id+2, 'de_DE', 'Bestellung - Warenkorb unten', '', ''),
|
||||
(@max_id+3, 'de_DE', 'Bestellung - Rechnung oben', '', ''),
|
||||
(@max_id+4, 'de_DE', 'Bestellung - Rechnung unten', '', ''),
|
||||
(@max_id+5, 'de_DE', 'Bestellung - Vor der Produktliste', '', ''),
|
||||
(@max_id+6, 'de_DE', 'Bestellung - Vor der Öffnung der Produktzeile', '', ''),
|
||||
(@max_id+7, 'de_DE', 'Bestellung - Nach Sperrung der Produkt Zeile', '', ''),
|
||||
(@max_id+8, 'de_DE', 'Bestellung - Nach der Produktliste', '', ''),
|
||||
(@max_id+9, 'de_DE', 'Sonderangebote - oben', '', ''),
|
||||
(@max_id+10, 'de_DE', 'Sonderangebote - Tabellenkopf', '', ''),
|
||||
(@max_id+11, 'de_DE', 'Sonderangebote - Tabellenzeile', '', ''),
|
||||
(@max_id+12, 'de_DE', 'Sonderangebote - unten', '', ''),
|
||||
(@max_id+13, 'de_DE', 'Sonderangebot - Erstellungsformular', '', ''),
|
||||
(@max_id+14, 'de_DE', 'Sonderangebot - Löschungsformular', '', ''),
|
||||
(@max_id+15, 'de_DE', 'Sonderangebote - JavaScript', '', ''),
|
||||
(@max_id+16, 'de_DE', 'Produkt - unten einer Produkt-Kombination', '', ''),
|
||||
(@max_id+17, 'de_DE', 'Layout - vor dem Hauptinhaltsbereich', '', ''),
|
||||
(@max_id+18, 'de_DE', 'Admin layout - Nach dem Hauptinhalt', '', ''),
|
||||
(@max_id+1, 'en_US', 'Order - cart top', '', ''),
|
||||
(@max_id+2, 'en_US', 'Order - cart bottom', '', ''),
|
||||
(@max_id+3, 'en_US', 'Order - bill top', '', ''),
|
||||
(@max_id+4, 'en_US', 'Order - bill bottom', '', ''),
|
||||
(@max_id+5, 'en_US', 'Order - Before product list', '', ''),
|
||||
(@max_id+6, 'en_US', 'Order - Before starting product row', '', ''),
|
||||
(@max_id+7, 'en_US', 'Order - After closing product row', '', ''),
|
||||
(@max_id+8, 'en_US', 'Order - After product list', '', ''),
|
||||
(@max_id+9, 'en_US', 'Sales - at the top', '', ''),
|
||||
(@max_id+10, 'en_US', 'Sales - table header', '', ''),
|
||||
(@max_id+11, 'en_US', 'Sales - table row', '', ''),
|
||||
(@max_id+12, 'en_US', 'Sales - at the bottom', '', ''),
|
||||
(@max_id+13, 'en_US', 'Sale - create form', '', ''),
|
||||
(@max_id+14, 'en_US', 'Sale - delete form', '', ''),
|
||||
(@max_id+15, 'en_US', 'Sales - JavaScript', '', ''),
|
||||
(@max_id+16, 'en_US', 'Product - at the bottom of a product combination', '', ''),
|
||||
(@max_id+17, 'en_US', 'Layout - Before the main content', '', ''),
|
||||
(@max_id+18, 'en_US', 'Admin layout - After the main content', '', ''),
|
||||
(@max_id+1, 'es_ES', 'Orden - parte superior del carro', '', ''),
|
||||
(@max_id+2, 'es_ES', 'Orden - parte inferior del carro', '', ''),
|
||||
(@max_id+3, 'es_ES', 'Orden - parte superior de la cuenta', '', ''),
|
||||
(@max_id+4, 'es_ES', 'Orden - parte inferior de la cuenta', '', ''),
|
||||
(@max_id+5, 'es_ES', 'Orden - antes de la lista de productos', '', ''),
|
||||
(@max_id+6, 'es_ES', 'Orden - antes de comenzar la fila de producto', '', ''),
|
||||
(@max_id+7, 'es_ES', 'Orden - después de cerrar la fila de producto', '', ''),
|
||||
(@max_id+8, 'es_ES', 'Orden - después de la lista de productos', '', ''),
|
||||
(@max_id+9, 'es_ES', 'Ventas - en la parte superior', '', ''),
|
||||
(@max_id+10, 'es_ES', 'Ventas - encabezado de tabla', '', ''),
|
||||
(@max_id+11, 'es_ES', 'Ventas - fila de la tabla', '', ''),
|
||||
(@max_id+12, 'es_ES', 'Ventas - en la parte inferior', '', ''),
|
||||
(@max_id+13, 'es_ES', 'Venta - formulario de creación', '', ''),
|
||||
(@max_id+14, 'es_ES', 'Venta - formulario de borrado', '', ''),
|
||||
(@max_id+15, 'es_ES', 'Ventas - JavaScript', '', ''),
|
||||
(@max_id+16, 'es_ES', 'Producto - al pie de la combinación de un producto', '', ''),
|
||||
(@max_id+17, 'es_ES', 'Diseño - antes el contenido principal', '', ''),
|
||||
(@max_id+18, 'es_ES', 'Diseño de administración - Después del contenido principal', '', ''),
|
||||
(@max_id+1, 'fr_FR', 'Commande - panier haut', '', ''),
|
||||
(@max_id+2, 'fr_FR', 'Commande - panier bas', '', ''),
|
||||
(@max_id+3, 'fr_FR', 'Commande - facture haut', '', ''),
|
||||
(@max_id+4, 'fr_FR', 'Commande - facture bas', '', ''),
|
||||
(@max_id+5, 'fr_FR', 'Commande - Avant la liste des produits', '', ''),
|
||||
(@max_id+6, 'fr_FR', 'Commande - Avant d\'ouvrir la ligne produit', '', ''),
|
||||
(@max_id+7, 'fr_FR', 'Commande - Après avoir fermé la ligne produit', '', ''),
|
||||
(@max_id+8, 'fr_FR', 'Commande - Après la liste des produits', '', ''),
|
||||
(@max_id+9, 'fr_FR', 'Promotions - en haut', '', ''),
|
||||
(@max_id+10, 'fr_FR', 'Promotions - colonne tableau', '', ''),
|
||||
(@max_id+11, 'fr_FR', 'Promotions - ligne du tableau', '', ''),
|
||||
(@max_id+12, 'fr_FR', 'Promotions - en bas', '', ''),
|
||||
(@max_id+13, 'fr_FR', 'Promotion - formulaire de création', '', ''),
|
||||
(@max_id+14, 'fr_FR', 'Promotion - formulaire de suppression', '', ''),
|
||||
(@max_id+15, 'fr_FR', 'Promotions - JavaScript', '', ''),
|
||||
(@max_id+16, 'fr_FR', 'Produit - en bas d\'une combinaison de déclinaisons', '', ''),
|
||||
(@max_id+17, 'fr_FR', 'Layout - Avant le contenu principal', '', ''),
|
||||
(@max_id+18, 'fr_FR', 'Admin layout - Après le contenu principal', '', '')
|
||||
;
|
||||
|
||||
# ======================================================================================================================
|
||||
# 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
|
||||
(@max_id+1, 'de_DE', 'Smarty Template Engine Integration', NULL, NULL, NULL),
|
||||
(@max_id+2, 'de_DE', 'Steuerung für virtuelle Produkte', 'Prüfen ob ein Liefermodul für virtuellen Produkte aktiviert ist, wenn es mindestens ein virtuelles Produkt gibt', NULL, NULL),
|
||||
(@max_id+1, 'en_US', 'Smarty template engine integration', NULL, NULL, NULL),
|
||||
(@max_id+2, 'en_US', 'Virtual Product Controller', 'Check if a virtual product delivery module is enabled if at least one product is virtual', NULL, NULL),
|
||||
(@max_id+1, 'es_ES', 'Integración del motor de plantillas Smarty', NULL, NULL, NULL),
|
||||
(@max_id+2, 'es_ES', 'Controlador de producto virtual', 'Compruebe si un módulo de entrega de producto virtual está habilitado si es virtual por lo menos un producto', NULL, NULL),
|
||||
(@max_id+1, 'fr_FR', 'Intégration du moteur de template Smarty', NULL, NULL, NULL),
|
||||
(@max_id+2, 'fr_FR', 'Contôle de produit virtuel', 'Vérifie qu\'un module de livraison pour produit virtuel soit activé si des produits virtuels existent', NULL, NULL)
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
280
setup/update/sql/2.1.0-beta1.sql
Normal file
280
setup/update/sql/2.1.0-beta1.sql
Normal file
@@ -0,0 +1,280 @@
|
||||
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
|
||||
(@max_id + 1, 'de_DE', 'Dauer der Session-Cookie in dem Kunden-Browser, in Sekunden', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'de_DE', 'Fehlermeldung zeigen anstatt einer weißen Seite im Falle eines eines Serverfehlers', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'de_DE', 'Dateiname der Fehlerseite', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'en_US', 'Life time of the session cookie in the customer browser, in seconds', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'en_US', 'Show error message instead of a white page on a server error', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'en_US', 'Filename of the error page', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'es_ES', 'Tiempo de vida de la cookie de la sesión en el navegador del cliente, en segundos', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'es_ES', 'Mostrar mensaje de error en lugar de una página en blanco cuando ocurre un error de servidor', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'es_ES', 'Nombre de archivo de la página de error', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'fr_FR', 'Durée de vie du cookie de la session dans le navigateur du client, en secondes', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'fr_FR', 'Afficher un message d\'erreur à la place d\'une page blanche lors d\'une erreur serveur', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'fr_FR', 'Nom du fichier de la page d\'erreur', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max_id + 1, 'de_DE', 'Kategorieseite - vor dem Hauptinhaltsbereich', '', ''),
|
||||
(@max_id + 2, 'de_DE', 'Kategorieseite - nach dem Hauptinhaltsbereich', '', ''),
|
||||
(@max_id + 3, 'de_DE', 'Inhaltseite- vor dem Hauptinhaltsbereich', '', ''),
|
||||
(@max_id + 4, 'de_DE', 'Inhaltseite - nach dem Hauptinhaltsbereich', '', ''),
|
||||
(@max_id + 5, 'de_DE', 'Ordnerseite - vor dem Hauptinhaltsbereich', '', ''),
|
||||
(@max_id + 6, 'de_DE', 'Ordnerseite - nach dem Hauptinhaltsbereich', '', ''),
|
||||
(@max_id + 7, 'de_DE', 'Marken Seite - oben', '', ''),
|
||||
(@max_id + 8, 'de_DE', 'Marken Seite - unten', '', ''),
|
||||
(@max_id + 9, 'de_DE', 'Marken Seite - oben des Hauptbereichs', '', ''),
|
||||
(@max_id + 10, 'de_DE', 'Marken Seite - unten des Hauptbereichs', '', ''),
|
||||
(@max_id + 11, 'de_DE', 'Marken Seite - vor dem Hauptinhaltsbereich', '', ''),
|
||||
(@max_id + 12, 'de_DE', 'Marken Seite - Nach dem Hauptinhalt Bereich', '', ''),
|
||||
(@max_id + 13, 'de_DE', 'Marken Seite - CSS-Stylesheet', '', ''),
|
||||
(@max_id + 14, 'de_DE', 'Marken Seite - Nach der Integration von Javascript', '', ''),
|
||||
(@max_id + 15, 'de_DE', 'Marken Seite - Javascript Initialisation', '', ''),
|
||||
(@max_id + 16, 'de_DE', 'Marken Seite - oben der Sidebar', '', ''),
|
||||
(@max_id + 17, 'de_DE', 'Marken Seite - Sidebars Body', '', ''),
|
||||
(@max_id + 18, 'de_DE', 'Marken Seite - unten der Sidebar', '', ''),
|
||||
(@max_id + 19, 'de_DE', 'Bestellungsdetails - oben', '', ''),
|
||||
(@max_id + 20, 'de_DE', 'Bestellungsdetails - weitere Informationen', '', ''),
|
||||
(@max_id + 21, 'de_DE', 'Bestellungsdetails - nach den allgemeinen Informationen', '', ''),
|
||||
(@max_id + 22, 'de_DE', 'Bestellungsdetails - weitere Informationen für den Versand', '', ''),
|
||||
(@max_id + 23, 'de_DE', 'Bestellungsdetails - Lieferadresse', '', ''),
|
||||
(@max_id + 24, 'de_DE', 'Bestellungsdetails - weitere Informationen für die Rechnung', '', ''),
|
||||
(@max_id + 25, 'de_DE', 'Bestellungsdetails - Rechnungsadresse', '', ''),
|
||||
(@max_id + 26, 'de_DE', 'Bestellungsdetails - Nach den Adressen', '', ''),
|
||||
(@max_id + 27, 'de_DE', 'Bestellungsdetails - vor der Produktliste', '', ''),
|
||||
(@max_id + 28, 'de_DE', 'Bestellungsdetails - weitere Informationen für ein Produkt', '', ''),
|
||||
(@max_id + 29, 'de_DE', 'Bestellungsdetails - nach der Produktliste', '', ''),
|
||||
(@max_id + 30, 'de_DE', 'Bestellungsdetails - nach den Produkten', '', ''),
|
||||
(@max_id + 31, 'de_DE', 'Bestellungsdetails - unten', '', ''),
|
||||
(@max_id + 32, 'de_DE', 'Bestellungsdetails - CSS-Stylesheet', '', ''),
|
||||
(@max_id + 33, 'de_DE', 'Bestellungsdetails - nach Integration von JavaScript', '', ''),
|
||||
(@max_id + 34, 'de_DE', 'Bestellungsdetails - Initialisierung von Javascript', '', ''),
|
||||
(@max_id + 1, 'en_US', 'Category page - before the main content area', '', ''),
|
||||
(@max_id + 2, 'en_US', 'Category page - after the main content area', '', ''),
|
||||
(@max_id + 3, 'en_US', 'Content page - before the main content area', '', ''),
|
||||
(@max_id + 4, 'en_US', 'Content page - after the main content area', '', ''),
|
||||
(@max_id + 5, 'en_US', 'Folder page - before the main content area', '', ''),
|
||||
(@max_id + 6, 'en_US', 'Folder page - after the main content area', '', ''),
|
||||
(@max_id + 7, 'en_US', 'Brands page - at the top', '', ''),
|
||||
(@max_id + 8, 'en_US', 'Brands page - at the bottom', '', ''),
|
||||
(@max_id + 9, 'en_US', 'Brands page - at the top of the main area', '', ''),
|
||||
(@max_id + 10, 'en_US', 'Brands page - at the bottom of the main area', '', ''),
|
||||
(@max_id + 11, 'en_US', 'Brands page - before the main content area', '', ''),
|
||||
(@max_id + 12, 'en_US', 'Brands page - after the main content area', '', ''),
|
||||
(@max_id + 13, 'en_US', 'Brands page - CSS stylesheet', '', ''),
|
||||
(@max_id + 14, 'en_US', 'Brands page - after javascript include', '', ''),
|
||||
(@max_id + 15, 'en_US', 'Brands page - javascript initialization', '', ''),
|
||||
(@max_id + 16, 'en_US', 'Brands page - at the top of the sidebar', '', ''),
|
||||
(@max_id + 17, 'en_US', 'Brands page - the body of the sidebar', '', ''),
|
||||
(@max_id + 18, 'en_US', 'Brands page - at the bottom of the sidebar', '', ''),
|
||||
(@max_id + 19, 'en_US', 'Order details - at the top', '', ''),
|
||||
(@max_id + 20, 'en_US', 'Order details - additional information', '', ''),
|
||||
(@max_id + 21, 'en_US', 'Order details - after global information', '', ''),
|
||||
(@max_id + 22, 'en_US', 'Order details - additional delivery information', '', ''),
|
||||
(@max_id + 23, 'en_US', 'Order details - delivery address', '', ''),
|
||||
(@max_id + 24, 'en_US', 'Order details - additional invoice information', '', ''),
|
||||
(@max_id + 25, 'en_US', 'Order details - invoice address', '', ''),
|
||||
(@max_id + 26, 'en_US', 'Order details - after addresses', '', ''),
|
||||
(@max_id + 27, 'en_US', 'Order details - before products list', '', ''),
|
||||
(@max_id + 28, 'en_US', 'Order details - additional product information', '', ''),
|
||||
(@max_id + 29, 'en_US', 'Order details - after products list', '', ''),
|
||||
(@max_id + 30, 'en_US', 'Order details - after products', '', ''),
|
||||
(@max_id + 31, 'en_US', 'Order details - at the bottom', '', ''),
|
||||
(@max_id + 32, 'en_US', 'Order details - CSS stylesheet', '', ''),
|
||||
(@max_id + 33, 'en_US', 'Order details - after javascript include', '', ''),
|
||||
(@max_id + 34, 'en_US', 'Order details - javascript initialization', '', ''),
|
||||
(@max_id + 1, 'es_ES', 'Página de categoría - antes el área de contenido principal', '', ''),
|
||||
(@max_id + 2, 'es_ES', 'Página de la categoría - después el área de contenido principal', '', ''),
|
||||
(@max_id + 3, 'es_ES', 'Página de contenido - antes del área de contenido principal', '', ''),
|
||||
(@max_id + 4, 'es_ES', 'Página de contenido - después del área de contenido principal', '', ''),
|
||||
(@max_id + 5, 'es_ES', 'Carpeta de página - antes del área de contenido principal', '', ''),
|
||||
(@max_id + 6, 'es_ES', 'Carpeta de página - después del área de contenido principal', '', ''),
|
||||
(@max_id + 7, 'es_ES', 'Página de las marcas - en la parte superior', '', ''),
|
||||
(@max_id + 8, 'es_ES', 'Página de las marcas - en la parte inferior', '', ''),
|
||||
(@max_id + 9, 'es_ES', 'Página de las marcas - en la parte inferior del área principal', '', ''),
|
||||
(@max_id + 10, 'es_ES', 'Página de las marcas - en la parte inferior del área principal', '', ''),
|
||||
(@max_id + 11, 'es_ES', 'Página de marcas - antes del área de contenido principal', '', ''),
|
||||
(@max_id + 12, 'es_ES', 'Página de marcas - después el área de contenido principal', '', ''),
|
||||
(@max_id + 13, 'es_ES', 'Página de marcas - hoja de estilos CSS', '', ''),
|
||||
(@max_id + 14, 'es_ES', 'Página de marcas - después de inclusión de javascript', '', ''),
|
||||
(@max_id + 15, 'es_ES', 'Página de marcas - inicialización de javascript', '', ''),
|
||||
(@max_id + 16, 'es_ES', 'Página de las marcas - en la parte inferior de la barra lateral', '', ''),
|
||||
(@max_id + 17, 'es_ES', 'Página de marcas - el cuerpo de la barra lateral', '', ''),
|
||||
(@max_id + 18, 'es_ES', 'Página de las marcas - en la parte inferior de la barra lateral', '', ''),
|
||||
(@max_id + 19, 'es_ES', 'Detalles de la orden - en la parte superior', '', ''),
|
||||
(@max_id + 20, 'es_ES', 'Detalles de la Orden - información adicional', '', ''),
|
||||
(@max_id + 21, 'es_ES', 'Detalles de la orden - después de la información global', '', ''),
|
||||
(@max_id + 22, 'es_ES', 'Detalles de la Orden - información adicional del envío', '', ''),
|
||||
(@max_id + 23, 'es_ES', 'Pedir detalles - dirección de envío', '', ''),
|
||||
(@max_id + 24, 'es_ES', 'Detalles de la Orden - información adicional de la factura', '', ''),
|
||||
(@max_id + 25, 'es_ES', 'Detalles de la orden - dirección de factura', '', ''),
|
||||
(@max_id + 26, 'es_ES', 'Detalles de la Orden - después de direcciones', '', ''),
|
||||
(@max_id + 27, 'es_ES', 'Detalles de la orden - antes de lista de productos', '', ''),
|
||||
(@max_id + 28, 'es_ES', 'Detalles de la Orden - información adicional del producto', '', ''),
|
||||
(@max_id + 29, 'es_ES', 'Detalles de la orden - después de la lista de productos', '', ''),
|
||||
(@max_id + 30, 'es_ES', 'Detalles de la orden - después de los productos', '', ''),
|
||||
(@max_id + 31, 'es_ES', 'Detalles de la orden - en la parte inferior', '', ''),
|
||||
(@max_id + 32, 'es_ES', 'Detalles de la Orden - hoja de estilos CSS', '', ''),
|
||||
(@max_id + 33, 'es_ES', 'Detalles de la orden - después de incluir JavaScript', '', ''),
|
||||
(@max_id + 34, 'es_ES', 'Detalles de la Orden - inicialización de JavaScript', '', ''),
|
||||
(@max_id + 1, 'fr_FR', 'Page catégorie - au dessus de la zone de contenu principale', '', ''),
|
||||
(@max_id + 2, 'fr_FR', 'Page catégorie - en dessous de la zone de contenu principale', '', ''),
|
||||
(@max_id + 3, 'fr_FR', 'Page de contenu - au dessus de la zone de contenu principale', '', ''),
|
||||
(@max_id + 4, 'fr_FR', 'Page de contenu - en dessous de la zone de contenu principale', '', ''),
|
||||
(@max_id + 5, 'fr_FR', 'Page dossier - au dessus de la zone de contenu principale', '', ''),
|
||||
(@max_id + 6, 'fr_FR', 'Page dossier - en dessous de la zone de contenu principale', '', ''),
|
||||
(@max_id + 7, 'fr_FR', 'Page des marques - en haut', '', ''),
|
||||
(@max_id + 8, 'fr_FR', 'Page des marques - en bas', '', ''),
|
||||
(@max_id + 9, 'fr_FR', 'Page des marques - en haut de la zone principal', '', ''),
|
||||
(@max_id + 10, 'fr_FR', 'Page des marques - en bas de la zone principal', '', ''),
|
||||
(@max_id + 11, 'fr_FR', 'Page des marques - au dessus de la zone de contenu principale', '', ''),
|
||||
(@max_id + 12, 'fr_FR', 'Page des marques - en dessous de la zone de contenu principale', '', ''),
|
||||
(@max_id + 13, 'fr_FR', 'Page des marques - feuille de style CSS', '', ''),
|
||||
(@max_id + 14, 'fr_FR', 'Page des marques - après l\'inclusion du JavaScript', '', ''),
|
||||
(@max_id + 15, 'fr_FR', 'Page des marques - initialisation du JavaScript', '', ''),
|
||||
(@max_id + 16, 'fr_FR', 'Page des marques - en haut de la sidebar', '', ''),
|
||||
(@max_id + 17, 'fr_FR', 'Page des marques - le corps de la sidebar', '', ''),
|
||||
(@max_id + 18, 'fr_FR', 'Page des marques - en bas de la sidebar', '', ''),
|
||||
(@max_id + 19, 'fr_FR', 'Détail d\'une commande - en haut', '', ''),
|
||||
(@max_id + 20, 'fr_FR', 'Détail d\'une commande - informations additionnelles', '', ''),
|
||||
(@max_id + 21, 'fr_FR', 'Détail d\'une commande - après les informations générales', '', ''),
|
||||
(@max_id + 22, 'fr_FR', 'Détail d\'une commande - informations additionnelles pour l\'expédition', '', ''),
|
||||
(@max_id + 23, 'fr_FR', 'Détail d\'une commande - adresse de livraison', '', ''),
|
||||
(@max_id + 24, 'fr_FR', 'Détail d\'une commande - informations additionnelles pour la facturation', '', ''),
|
||||
(@max_id + 25, 'fr_FR', 'Détail d\'une commande - adresse de facturation', '', ''),
|
||||
(@max_id + 26, 'fr_FR', 'Détail d\'une commande - Après les adresses', '', ''),
|
||||
(@max_id + 27, 'fr_FR', 'Détail d\'une commande - avant la liste des produits', '', ''),
|
||||
(@max_id + 28, 'fr_FR', 'Détail d\'une commande - informations additionnelles pour un produit', '', ''),
|
||||
(@max_id + 29, 'fr_FR', 'Détail d\'une commande - après la liste des produits', '', ''),
|
||||
(@max_id + 30, 'fr_FR', 'Détail d\'une commande - Après les produits', '', ''),
|
||||
(@max_id + 31, 'fr_FR', 'Détail d\'une commande - en bas', '', ''),
|
||||
(@max_id + 32, 'fr_FR', 'Détail d\'une commande - feuille de style CSS', '', ''),
|
||||
(@max_id + 33, 'fr_FR', 'Détail d\'une commande - après l\'inclusion du JavaScript', '', ''),
|
||||
(@max_id + 34, 'fr_FR', 'Détail d\'une commande - initialisation du JavaScript', '', '')
|
||||
;
|
||||
|
||||
|
||||
-- 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
|
||||
(@max_id + 1, 'de_DE', 'Kategorie - Tab', '', ''),
|
||||
(@max_id + 2, 'de_DE', 'Produkt - Tab', '', ''),
|
||||
(@max_id + 3, 'de_DE', 'Ordner - Tab', '', ''),
|
||||
(@max_id + 4, 'de_DE', 'Inhalt - Tab', '', ''),
|
||||
(@max_id + 5, 'de_DE', 'Marke - Tab', '', ''),
|
||||
(@max_id + 6, 'de_DE', 'Bestellungs-Änderung - Lieferadresse', '', ''),
|
||||
(@max_id + 1, 'en_US', 'Category - Tab', '', ''),
|
||||
(@max_id + 2, 'en_US', 'Product - Tab', '', ''),
|
||||
(@max_id + 3, 'en_US', 'Folder - Tab', '', ''),
|
||||
(@max_id + 4, 'en_US', 'Content - Tab', '', ''),
|
||||
(@max_id + 5, 'en_US', 'Brand - Tab', '', ''),
|
||||
(@max_id + 6, 'en_US', 'Order edit - delivery address', '', ''),
|
||||
(@max_id + 1, 'es_ES', 'Categoría - Tab', '', ''),
|
||||
(@max_id + 2, 'es_ES', 'Producto - Pestaña', '', ''),
|
||||
(@max_id + 3, 'es_ES', 'Carpeta - Pestaña', '', ''),
|
||||
(@max_id + 4, 'es_ES', 'Contenido - Pestaña', '', ''),
|
||||
(@max_id + 5, 'es_ES', 'Marca - Tab', '', ''),
|
||||
(@max_id + 6, 'es_ES', 'Editar Orden - dirección de envío', '', ''),
|
||||
(@max_id + 1, 'fr_FR', 'Catégorie - Onglet', '', ''),
|
||||
(@max_id + 2, 'fr_FR', 'Produit - Onglet', '', ''),
|
||||
(@max_id + 3, 'fr_FR', 'Dossier - Onglet', '', ''),
|
||||
(@max_id + 4, 'fr_FR', 'Contenu - Onglet', '', ''),
|
||||
(@max_id + 5, 'fr_FR', 'Marque - Onglet', '', ''),
|
||||
(@max_id + 6, 'fr_FR', 'Modification commande - adresse de livraison', '', '')
|
||||
;
|
||||
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
31
setup/update/sql/2.1.0-beta2.sql
Normal file
31
setup/update/sql/2.1.0-beta2.sql
Normal file
@@ -0,0 +1,31 @@
|
||||
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
|
||||
(@max_id + 1, 'de_DE', 'Kundenkonto - Erweitere Informationen', '', ''),
|
||||
(@max_id + 2, 'de_DE', 'Produktseite - oben im Formular', '', ''),
|
||||
(@max_id + 3, 'de_DE', 'Produktseite - unten an dem Formular', '', ''),
|
||||
(@max_id + 1, 'en_US', 'Customer account - additional information', '', ''),
|
||||
(@max_id + 2, 'en_US', 'Product page - On the top of the form', '', ''),
|
||||
(@max_id + 3, 'en_US', 'Product page - On the bottom of the form', '', ''),
|
||||
(@max_id + 1, 'es_ES', 'Cuenta de cliente - información adicional', '', ''),
|
||||
(@max_id + 2, 'es_ES', 'Página de producto - en la parte superior del formulario', '', ''),
|
||||
(@max_id + 3, 'es_ES', 'Página del producto - en la parte inferior del formulario', '', ''),
|
||||
(@max_id + 1, 'fr_FR', 'Compte client - informations additionnelles', '', ''),
|
||||
(@max_id + 2, 'fr_FR', 'Page produit - En haut du formulaire', '', ''),
|
||||
(@max_id + 3, 'fr_FR', 'Page produit - En bas du formulaire', '', '')
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
54
setup/update/sql/2.1.0.sql
Normal file
54
setup/update/sql/2.1.0.sql
Normal file
@@ -0,0 +1,54 @@
|
||||
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
|
||||
(@max_id + 1, 'de_DE', 'Brand edit Seite - im Formular', '', ''),
|
||||
(@max_id + 2, 'de_DE', 'Sonderangebot Änderungsseite - javascript last call block', '', ''),
|
||||
(@max_id + 3, 'de_DE', 'API Seite - oben', '', ''),
|
||||
(@max_id + 4, 'de_DE', 'API Seite - unten', '', ''),
|
||||
(@max_id + 5, 'de_DE', 'API Seite - Löschungsformular', '', ''),
|
||||
(@max_id + 1, 'en_US', 'Brand edit page - in the form', '', ''),
|
||||
(@max_id + 2, 'en_US', 'Sale edit page - javascript last call block', '', ''),
|
||||
(@max_id + 3, 'en_US', 'Api page - at top', '', ''),
|
||||
(@max_id + 4, 'en_US', 'Api page - at bottom', '', ''),
|
||||
(@max_id + 5, 'en_US', 'Api page - in deletion form', '', ''),
|
||||
(@max_id + 1, 'es_ES', 'Página de edición de marca - en formulario', '', ''),
|
||||
(@max_id + 2, 'es_ES', 'Página de edición de Venta - última bloque de llamada JavaScript', '', ''),
|
||||
(@max_id + 3, 'es_ES', 'Página de la API - en la parte superior', '', ''),
|
||||
(@max_id + 4, 'es_ES', 'Página de la API - en la parte inferior', '', ''),
|
||||
(@max_id + 5, 'es_ES', 'Página de Api - en formulario de eliminación', '', ''),
|
||||
(@max_id + 1, 'fr_FR', 'Page brand edit - dans formulaire', '', ''),
|
||||
(@max_id + 2, 'fr_FR', 'Page sale edit - appel javascript', '', ''),
|
||||
(@max_id + 3, 'fr_FR', 'Page api - en haut', '', ''),
|
||||
(@max_id + 4, 'fr_FR', 'Page api - en bas', '', ''),
|
||||
(@max_id + 5, 'fr_FR', 'Page api - formulaire de suppression', '', '')
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
10
setup/update/sql/2.1.1.sql
Normal file
10
setup/update/sql/2.1.1.sql
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/sql/2.1.10.sql
Normal file
9
setup/update/sql/2.1.10.sql
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/sql/2.1.11.sql
Normal file
9
setup/update/sql/2.1.11.sql
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/sql/2.1.2.sql
Normal file
46
setup/update/sql/2.1.2.sql
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
|
||||
(@maxHookId + 1, 'de_DE', 'Gutschein-Seite - Löschungsformular', '', ''),
|
||||
(@maxHookId + 1, 'en_US', 'Coupon page - in deletion form', '', ''),
|
||||
(@maxHookId + 1, 'es_ES', 'Página de cupón - en formulario de eliminación', '', ''),
|
||||
(@maxHookId + 1, 'fr_FR', 'Page coupon - formulaire de suppression', '', '')
|
||||
;
|
||||
|
||||
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/sql/2.1.3.sql
Normal file
16
setup/update/sql/2.1.3.sql
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;
|
||||
27
setup/update/sql/2.1.4.sql
Normal file
27
setup/update/sql/2.1.4.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
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
|
||||
(@max_id+1, 'de_DE', 'Export modal or page - oben', '', ''),
|
||||
(@max_id+2, 'de_DE', 'Export modal or page - unten', '', ''),
|
||||
(@max_id+1, 'en_US', 'Export modal or page - top', '', ''),
|
||||
(@max_id+2, 'en_US', 'Export modal or page - bottom', '', ''),
|
||||
(@max_id+1, 'es_ES', 'Modal o página de exportación - superior', '', ''),
|
||||
(@max_id+2, 'es_ES', 'Modal o página de exportación - inferior', '', ''),
|
||||
(@max_id+1, 'fr_FR', 'Modal ou page d\'export - en haut', '', ''),
|
||||
(@max_id+2, 'fr_FR', 'Modal ou page d\'export - en bas', '', '')
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
32
setup/update/sql/2.1.5.sql
Normal file
32
setup/update/sql/2.1.5.sql
Normal file
@@ -0,0 +1,32 @@
|
||||
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
|
||||
(@max_id+1, 'de_DE', 'Rechnung - Weitere Produktinformationen', '', ''),
|
||||
(@max_id+2, 'de_DE', 'Lieferung - Weitere Produktinformationen', '', ''),
|
||||
(@max_id+1, 'en_US', 'Invoice - additional product information', '', ''),
|
||||
(@max_id+2, 'en_US', 'Delivery - additional product information', '', ''),
|
||||
(@max_id+1, 'es_ES', 'Factura - información adicional del producto', '', ''),
|
||||
(@max_id+2, 'es_ES', 'Entrega - información adicional del producto', '', ''),
|
||||
(@max_id+1, 'fr_FR', 'Facture - informations additionnelles pour un produit', '', ''),
|
||||
(@max_id+2, 'fr_FR', 'Bon de livraison - informations additionnelles pour un produit', '', '')
|
||||
;
|
||||
|
||||
UPDATE `hook` SET `by_module` = 1 WHERE `code` = 'module.config-js';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
11
setup/update/sql/2.1.6.sql
Normal file
11
setup/update/sql/2.1.6.sql
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/sql/2.1.7.sql
Normal file
45
setup/update/sql/2.1.7.sql
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/sql/2.1.8.sql
Normal file
9
setup/update/sql/2.1.8.sql
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/sql/2.1.9.sql
Normal file
9
setup/update/sql/2.1.9.sql
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;
|
||||
417
setup/update/sql/2.2.0-alpha1.sql
Normal file
417
setup/update/sql/2.2.0-alpha1.sql
Normal file
@@ -0,0 +1,417 @@
|
||||
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
|
||||
(@max_id + 1, "de_DE", 'Zrückerstattet', "", "", ""),
|
||||
(@max_id + 1, "en_US", 'Refunded', "", "", ""),
|
||||
(@max_id + 1, "es_ES", 'Reembolsado', "", "", ""),
|
||||
(@max_id + 1, "fr_FR", 'Remboursé', "", "", "")
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max_id + 1, 'de_DE', 'Den Kunden erlauben ihre E-Mail-Adresse zu ändern. 1 für Ja, 0 für Nein', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'de_DE', 'Den Kunden fragen, ihre E-Mail-Adresse zu bestätigen. 1 für Jan, 0 für Nein', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'en_US', 'Allow customers to change their email. 1 for yes, 0 for no', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'en_US', 'Ask the customers to confirm their email, 1 for yes, 0 for no', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'es_ES', 'Permitir a los clientes cambiar su correo electrónico. 1 para sí, 0 para no', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'es_ES', 'Preguntar al cliente para confirmar su correo electrónico, 1 para sí, 0 no', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'fr_FR', 'Permettre aux utilisateurs de changer leur email. 1 pour oui, 0 pour non', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'fr_FR', 'Demander aux clients de confirmer leur email. 1 pour oui, 0 pour non', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max_id + 1, 'de_DE', 'Profil - Tabellenkopf', '', ''),
|
||||
(@max_id + 2, 'de_DE', 'Profil - Tabellenzeile', '', ''),
|
||||
(@max_id + 3, 'de_DE', 'Import - Tabellenkopf', '', ''),
|
||||
(@max_id + 4, 'de_DE', 'Import - Tabellenzeile', '', ''),
|
||||
(@max_id + 5, 'de_DE', 'Export - Tabellenkopf', '', ''),
|
||||
(@max_id + 6, 'de_DE', 'Export - Tabellenzeile', '', ''),
|
||||
(@max_id + 7, 'de_DE', 'Kategorie Bearbeitung - oben', '', ''),
|
||||
(@max_id + 8, 'de_DE', 'Kategorie Bearbeitung - unten', '', ''),
|
||||
(@max_id + 9, 'de_DE', 'Marke Bearbeitung - oben', '', ''),
|
||||
(@max_id + 10, 'de_DE', 'Marke Bearbeitung - unten', '', ''),
|
||||
(@max_id + 11, 'de_DE', 'Deklination Bearbeitung - oben', '', ''),
|
||||
(@max_id + 12, 'de_DE', 'Deklination Bearbeitung - unten', '', ''),
|
||||
(@max_id + 13, 'de_DE', 'Währung Bearbeitung - oben', '', ''),
|
||||
(@max_id + 14, 'de_DE', 'Währung Bearbeitung - unten', '', ''),
|
||||
(@max_id + 15, 'de_DE', 'Währung Bearbeitung - oben', '', ''),
|
||||
(@max_id + 16, 'de_DE', 'Währung Bearbeitung - unten', '', ''),
|
||||
(@max_id + 17, 'de_DE', 'Inhalt Bearbeitung - oben', '', ''),
|
||||
(@max_id + 18, 'de_DE', 'Inhalt Bearbeitung - unten', '', ''),
|
||||
(@max_id + 19, 'de_DE', 'Charakteristik Bearbeitung - oben', '', ''),
|
||||
(@max_id + 20, 'de_DE', 'Charakteristik Bearbeitung - unten', '', ''),
|
||||
(@max_id + 21, 'de_DE', 'Dokument Bearbeitung - oben', '', ''),
|
||||
(@max_id + 22, 'de_DE', 'Dokument Bearbeitung - unten', '', ''),
|
||||
(@max_id + 23, 'de_DE', 'Kunde Bearbeitung - oben', '', ''),
|
||||
(@max_id + 24, 'de_DE', 'Kunde Bearbeitung - unten', '', ''),
|
||||
(@max_id + 25, 'de_DE', 'Bild Bearbeitung - oben', '', ''),
|
||||
(@max_id + 26, 'de_DE', 'Bild Bearbeitung - unten', '', ''),
|
||||
(@max_id + 27, 'de_DE', 'Hook Bearbeitung - oben', '', ''),
|
||||
(@max_id + 28, 'de_DE', 'Hook Bearbeitung - unten', '', ''),
|
||||
(@max_id + 29, 'de_DE', 'Ordner Bearbeitung - oben', '', ''),
|
||||
(@max_id + 30, 'de_DE', 'Ordner Bearbeitung - unten', '', ''),
|
||||
(@max_id + 31, 'de_DE', 'Modul-Hook Bearbeitung - oben', '', ''),
|
||||
(@max_id + 32, 'de_DE', 'Modul-Hook Bearbeitung - unten', '', ''),
|
||||
(@max_id + 33, 'de_DE', 'Modul Bearbeitung - oben', '', ''),
|
||||
(@max_id + 34, 'de_DE', 'Modul Bearbeitung - unten', '', ''),
|
||||
(@max_id + 35, 'de_DE', 'Nachricht Bearbeitung - oben', '', ''),
|
||||
(@max_id + 36, 'de_DE', 'Nachricht Bearbeitung - unten', '', ''),
|
||||
(@max_id + 37, 'de_DE', 'Profil Bearbeitung - oben', '', ''),
|
||||
(@max_id + 38, 'de_DE', 'Profil Bearbeitung - unten', '', ''),
|
||||
(@max_id + 39, 'de_DE', 'Produkt Bearbeitung - oben', '', ''),
|
||||
(@max_id + 40, 'de_DE', 'Produkt Bearbeitung - unten', '', ''),
|
||||
(@max_id + 41, 'de_DE', 'Bestellung Bearbeitung - oben', '', ''),
|
||||
(@max_id + 42, 'de_DE', 'Bestellung Bearbeitung - unten', '', ''),
|
||||
(@max_id + 43, 'de_DE', 'Transporteur Lieferzonen Bearbeitung - oben', '', ''),
|
||||
(@max_id + 44, 'de_DE', 'Transporteur Lieferzonen Bearbeitung - unten', '', ''),
|
||||
(@max_id + 45, 'de_DE', 'Lieferzone Bearbeitung - oben', '', ''),
|
||||
(@max_id + 46, 'de_DE', 'Lieferzone Bearbeitung - unten', '', ''),
|
||||
(@max_id + 47, 'de_DE', 'Sonderangebot Bearbeitung - oben', '', ''),
|
||||
(@max_id + 48, 'de_DE', 'Sonderangebot Bearbeitung - unten', '', ''),
|
||||
(@max_id + 49, 'de_DE', 'Variable Bearbeitung - oben', '', ''),
|
||||
(@max_id + 50, 'de_DE', 'Variable Bearbeitung - unten', '', ''),
|
||||
(@max_id + 51, 'de_DE', 'Template Bearbeitung - oben', '', ''),
|
||||
(@max_id + 52, 'de_DE', 'Template Bearbeitung - unten', '', ''),
|
||||
(@max_id + 53, 'de_DE', 'Taxregel Bearbeitung - oben', '', ''),
|
||||
(@max_id + 54, 'de_DE', 'Taxregel Bearbeitung - unten', '', ''),
|
||||
(@max_id + 55, 'de_DE', 'Taxe Bearbeitung - oben', '', ''),
|
||||
(@max_id + 56, 'de_DE', 'Taxe Bearbeitung - unten', '', ''),
|
||||
(@max_id + 57, 'de_DE', 'Bestellungs Bearbeitung - unter die Produktdaten', '', ''),
|
||||
(@max_id + 58, 'de_DE', 'Bestellung - Tab', '', ''),
|
||||
(@max_id + 59, 'de_DE', 'Bestelldaten - nach einem Produkt', '', ''),
|
||||
(@max_id + 60, 'de_DE', 'SEO Tab - oben', '', ''),
|
||||
(@max_id + 61, 'de_DE', 'SEO Tab - unten', '', ''),
|
||||
(@max_id + 62, 'de_DE', 'Bild Tab - oben', '', ''),
|
||||
(@max_id + 63, 'de_DE', 'Bild Tab - unten', '', ''),
|
||||
(@max_id + 64, 'de_DE', 'Dokument Tab - oben', '', ''),
|
||||
(@max_id + 65, 'de_DE', 'Dokument Tab - unten', '', ''),
|
||||
(@max_id + 1, 'en_US', 'Profile - table header', '', ''),
|
||||
(@max_id + 2, 'en_US', 'Profile - table row', '', ''),
|
||||
(@max_id + 3, 'en_US', 'Import - table header', '', ''),
|
||||
(@max_id + 4, 'en_US', 'Import - table row', '', ''),
|
||||
(@max_id + 5, 'en_US', 'Export - table header', '', ''),
|
||||
(@max_id + 6, 'en_US', 'Export - table row', '', ''),
|
||||
(@max_id + 7, 'en_US', 'Category edit - top', '', ''),
|
||||
(@max_id + 8, 'en_US', 'Category edit - bottom', '', ''),
|
||||
(@max_id + 9, 'en_US', 'Brand edit - top', '', ''),
|
||||
(@max_id + 10, 'en_US', 'Brand edit - bottom', '', ''),
|
||||
(@max_id + 11, 'en_US', 'Attribute edit - top', '', ''),
|
||||
(@max_id + 12, 'en_US', 'Attribute edit - bottom', '', ''),
|
||||
(@max_id + 13, 'en_US', 'Currency edit - top', '', ''),
|
||||
(@max_id + 14, 'en_US', 'Currency edit - bottom', '', ''),
|
||||
(@max_id + 15, 'en_US', 'Country edit - top', '', ''),
|
||||
(@max_id + 16, 'en_US', 'Country edit - bottom', '', ''),
|
||||
(@max_id + 17, 'en_US', 'Content edit - top', '', ''),
|
||||
(@max_id + 18, 'en_US', 'Content edit - bottom', '', ''),
|
||||
(@max_id + 19, 'en_US', 'Feature edit - top', '', ''),
|
||||
(@max_id + 20, 'en_US', 'Feature edit - bottom', '', ''),
|
||||
(@max_id + 21, 'en_US', 'Document edit - top', '', ''),
|
||||
(@max_id + 22, 'en_US', 'Document edit - bottom', '', ''),
|
||||
(@max_id + 23, 'en_US', 'Client edit - top', '', ''),
|
||||
(@max_id + 24, 'en_US', 'Client edit - bottom', '', ''),
|
||||
(@max_id + 25, 'en_US', 'Image edit - top', '', ''),
|
||||
(@max_id + 26, 'en_US', 'Image edit - bottom', '', ''),
|
||||
(@max_id + 27, 'en_US', 'Hook edit - top', '', ''),
|
||||
(@max_id + 28, 'en_US', 'Hook edit - bottom', '', ''),
|
||||
(@max_id + 29, 'en_US', 'Folder edit - top', '', ''),
|
||||
(@max_id + 30, 'en_US', 'Folder edit - bottom', '', ''),
|
||||
(@max_id + 31, 'en_US', 'Module hook edit - top', '', ''),
|
||||
(@max_id + 32, 'en_US', 'Module hook edit - bottom', '', ''),
|
||||
(@max_id + 33, 'en_US', 'Module edit - top', '', ''),
|
||||
(@max_id + 34, 'en_US', 'Module edit - bottom', '', ''),
|
||||
(@max_id + 35, 'en_US', 'Message edit - top', '', ''),
|
||||
(@max_id + 36, 'en_US', 'Message edit - bottom', '', ''),
|
||||
(@max_id + 37, 'en_US', 'Profile edit - top', '', ''),
|
||||
(@max_id + 38, 'en_US', 'Profile edit - bottom', '', ''),
|
||||
(@max_id + 39, 'en_US', 'Product edit - top', '', ''),
|
||||
(@max_id + 40, 'en_US', 'Product edit - bottom', '', ''),
|
||||
(@max_id + 41, 'en_US', 'Order edit - top', '', ''),
|
||||
(@max_id + 42, 'en_US', 'Order edit - bottom', '', ''),
|
||||
(@max_id + 43, 'en_US', 'Shipping zones edit - top', '', ''),
|
||||
(@max_id + 44, 'en_US', 'Shipping zones edit - bottom', '', ''),
|
||||
(@max_id + 45, 'en_US', 'Shipping configuration edit - top', '', ''),
|
||||
(@max_id + 46, 'en_US', 'Shipping configuration edit - bottom', '', ''),
|
||||
(@max_id + 47, 'en_US', 'Sale edit - top', '', ''),
|
||||
(@max_id + 48, 'en_US', 'Sale edit - bottom', '', ''),
|
||||
(@max_id + 49, 'en_US', 'Variable edit - top', '', ''),
|
||||
(@max_id + 50, 'en_US', 'Variable edit - bottom', '', ''),
|
||||
(@max_id + 51, 'en_US', 'Template edit - top', '', ''),
|
||||
(@max_id + 52, 'en_US', 'Template edit - bottom', '', ''),
|
||||
(@max_id + 53, 'en_US', 'Tax rule edit - top', '', ''),
|
||||
(@max_id + 54, 'en_US', 'Tax rule edit - bottom', '', ''),
|
||||
(@max_id + 55, 'en_US', 'Tax edit - top', '', ''),
|
||||
(@max_id + 56, 'en_US', 'Tax edit - bottom', '', ''),
|
||||
(@max_id + 57, 'en_US', 'Order edit - displayed after product information', '', ''),
|
||||
(@max_id + 58, 'en_US', 'Order - Tab', '', ''),
|
||||
(@max_id + 59, 'en_US', 'Order details - after product', '', ''),
|
||||
(@max_id + 60, 'en_US', 'Tab SEO - top', '', ''),
|
||||
(@max_id + 61, 'en_US', 'Tab SEO - bottom', '', ''),
|
||||
(@max_id + 62, 'en_US', 'Tab image - top', '', ''),
|
||||
(@max_id + 63, 'en_US', 'Tab image - bottom', '', ''),
|
||||
(@max_id + 64, 'en_US', 'Tab document - top', '', ''),
|
||||
(@max_id + 65, 'en_US', 'Tab document - bottom', '', ''),
|
||||
(@max_id + 1, 'es_ES', 'Perfil - encabezado de tabla', '', ''),
|
||||
(@max_id + 2, 'es_ES', 'Perfil - fila de la tabla', '', ''),
|
||||
(@max_id + 3, 'es_ES', 'Importar - encabezado de tabla', '', ''),
|
||||
(@max_id + 4, 'es_ES', 'Importar - fila de la tabla', '', ''),
|
||||
(@max_id + 5, 'es_ES', 'Exportación - encabezado de tabla', '', ''),
|
||||
(@max_id + 6, 'es_ES', 'Exportación - fila de la tabla', '', ''),
|
||||
(@max_id + 7, 'es_ES', 'Categoría edición - superior', '', ''),
|
||||
(@max_id + 8, 'es_ES', 'Editar categoría - inferior', '', ''),
|
||||
(@max_id + 9, 'es_ES', 'Editar marca - superior', '', ''),
|
||||
(@max_id + 10, 'es_ES', 'Editar marca - inferior', '', ''),
|
||||
(@max_id + 11, 'es_ES', 'Editar atributo - superior', '', ''),
|
||||
(@max_id + 12, 'es_ES', 'Edición de atributos - inferior', '', ''),
|
||||
(@max_id + 13, 'es_ES', 'Editar Monedas - Cabecera', '', ''),
|
||||
(@max_id + 14, 'es_ES', 'Editar Monedas - Pie', '', ''),
|
||||
(@max_id + 15, 'es_ES', 'Edición de país - parte superior', '', ''),
|
||||
(@max_id + 16, 'es_ES', 'Edición de pais - parte inferior', '', ''),
|
||||
(@max_id + 17, 'es_ES', 'Editar contenido - superior', '', ''),
|
||||
(@max_id + 18, 'es_ES', 'Editar Contenido - inferior', '', ''),
|
||||
(@max_id + 19, 'es_ES', 'Editar Característica - superior', '', ''),
|
||||
(@max_id + 20, 'es_ES', 'Editar Característica - inferior', '', ''),
|
||||
(@max_id + 21, 'es_ES', 'Edición de documentos - cabecera', '', ''),
|
||||
(@max_id + 22, 'es_ES', 'Edición de documentos - pie', '', ''),
|
||||
(@max_id + 23, 'es_ES', 'Editar cliente - superior', '', ''),
|
||||
(@max_id + 24, 'es_ES', 'Editar cliente - parte inferior', '', ''),
|
||||
(@max_id + 25, 'es_ES', 'Edición de imagen - parte superior', '', ''),
|
||||
(@max_id + 26, 'es_ES', 'Edición de imagen - parte inferior', '', ''),
|
||||
(@max_id + 27, 'es_ES', 'Edición de Hook - superior', '', ''),
|
||||
(@max_id + 28, 'es_ES', 'Edición de Hook - inferior', '', ''),
|
||||
(@max_id + 29, 'es_ES', 'Edición de carpeta - superior', '', ''),
|
||||
(@max_id + 30, 'es_ES', 'Editar carpeta - parte inferior', '', ''),
|
||||
(@max_id + 31, 'es_ES', NULL, '', ''),
|
||||
(@max_id + 32, 'es_ES', NULL, '', ''),
|
||||
(@max_id + 33, 'es_ES', 'Edición de módulo - tope', '', ''),
|
||||
(@max_id + 34, 'es_ES', 'Edición de módulo - base', '', ''),
|
||||
(@max_id + 35, 'es_ES', 'Editar mensaje - tope', '', ''),
|
||||
(@max_id + 36, 'es_ES', 'Editar mensaje - base', '', ''),
|
||||
(@max_id + 37, 'es_ES', 'Editar Perfil - parte superior', '', ''),
|
||||
(@max_id + 38, 'es_ES', 'Editar Perfil - parte inferior', '', ''),
|
||||
(@max_id + 39, 'es_ES', 'Editar producto - parte superior', '', ''),
|
||||
(@max_id + 40, 'es_ES', 'Editar producto - parte inferior', '', ''),
|
||||
(@max_id + 41, 'es_ES', 'Edición de Pedido - al tope', '', ''),
|
||||
(@max_id + 42, 'es_ES', 'Editar Orden - parte inferior', '', ''),
|
||||
(@max_id + 43, 'es_ES', 'Edición zonas de envío - inicio', '', ''),
|
||||
(@max_id + 44, 'es_ES', 'Edición zonas de envío - base', '', ''),
|
||||
(@max_id + 45, 'es_ES', 'Configuración de envío - inicio', '', ''),
|
||||
(@max_id + 46, 'es_ES', 'Configuración de envío - base', '', ''),
|
||||
(@max_id + 47, 'es_ES', 'Editar Venta - parte superior', '', ''),
|
||||
(@max_id + 48, 'es_ES', 'Editar Venta - parte inferior', '', ''),
|
||||
(@max_id + 49, 'es_ES', 'Editar variable - parte superior', '', ''),
|
||||
(@max_id + 50, 'es_ES', 'Editar variable - parte inferior', '', ''),
|
||||
(@max_id + 51, 'es_ES', 'Editar plantilla - parte superior', '', ''),
|
||||
(@max_id + 52, 'es_ES', 'Editar plantilla - parte inferior', '', ''),
|
||||
(@max_id + 53, 'es_ES', 'Edición de regla de impuesto - parte superior', '', ''),
|
||||
(@max_id + 54, 'es_ES', 'Editar regla de Impuesto - base', '', ''),
|
||||
(@max_id + 55, 'es_ES', 'Editar Impuesto - parte superior', '', ''),
|
||||
(@max_id + 56, 'es_ES', 'Editar Impuesto - base', '', ''),
|
||||
(@max_id + 57, 'es_ES', 'Edición de Pedido - se muestra después de la información de producto', '', ''),
|
||||
(@max_id + 58, 'es_ES', 'Orden - Pestaña', '', ''),
|
||||
(@max_id + 59, 'es_ES', 'Detalles de la orden - después del producto', '', ''),
|
||||
(@max_id + 60, 'es_ES', 'Ficha SEO - arriba', '', ''),
|
||||
(@max_id + 61, 'es_ES', 'Ficha SEO - abajo', '', ''),
|
||||
(@max_id + 62, 'es_ES', 'Pestaña de imagen - arriba', '', ''),
|
||||
(@max_id + 63, 'es_ES', 'Pestaña de imagen - abajo', '', ''),
|
||||
(@max_id + 64, 'es_ES', 'Ficha de documento - arriba', '', ''),
|
||||
(@max_id + 65, 'es_ES', 'Ficha de documento - abajo', '', ''),
|
||||
(@max_id + 1, 'fr_FR', 'Profil - colonne tableau', '', ''),
|
||||
(@max_id + 2, 'fr_FR', 'Profil - ligne du tableau', '', ''),
|
||||
(@max_id + 3, 'fr_FR', 'Import - colonne tableau', '', ''),
|
||||
(@max_id + 4, 'fr_FR', 'Import - ligne du tableau', '', ''),
|
||||
(@max_id + 5, 'fr_FR', 'Export - colonne tableau', '', ''),
|
||||
(@max_id + 6, 'fr_FR', 'Export - ligne du tableau', '', ''),
|
||||
(@max_id + 7, 'fr_FR', 'Édition d\'une categorie - en haut', '', ''),
|
||||
(@max_id + 8, 'fr_FR', 'Édition d\'une categorie - en bas', '', ''),
|
||||
(@max_id + 9, 'fr_FR', 'Édition d\'une marque - en haut', '', ''),
|
||||
(@max_id + 10, 'fr_FR', 'Édition d\'une marque - en bas', '', ''),
|
||||
(@max_id + 11, 'fr_FR', 'Édition d\'une déclinaison - en haut', '', ''),
|
||||
(@max_id + 12, 'fr_FR', 'Édition d\'une déclinaison - en bas', '', ''),
|
||||
(@max_id + 13, 'fr_FR', 'Édition d\'une devise - en haut', '', ''),
|
||||
(@max_id + 14, 'fr_FR', 'Édition d\'une devise - en bas', '', ''),
|
||||
(@max_id + 15, 'fr_FR', 'Édition d\'un pays - en haut', '', ''),
|
||||
(@max_id + 16, 'fr_FR', 'Édition d\'un pays - en bas', '', ''),
|
||||
(@max_id + 17, 'fr_FR', 'Édition d\'un contenu - en haut', '', ''),
|
||||
(@max_id + 18, 'fr_FR', 'Édition d\'un contenu - en bas', '', ''),
|
||||
(@max_id + 19, 'fr_FR', 'Édition d\'une caractéristique - en haut', '', ''),
|
||||
(@max_id + 20, 'fr_FR', 'Édition d\'une caractéristique - en bas', '', ''),
|
||||
(@max_id + 21, 'fr_FR', 'Édition d\'un document - en haut', '', ''),
|
||||
(@max_id + 22, 'fr_FR', 'Édition d\'un document - en bas', '', ''),
|
||||
(@max_id + 23, 'fr_FR', 'Édition d\'un client - en haut', '', ''),
|
||||
(@max_id + 24, 'fr_FR', 'Édition d\'un client - en bas', '', ''),
|
||||
(@max_id + 25, 'fr_FR', 'Édition d\'image - en haut', '', ''),
|
||||
(@max_id + 26, 'fr_FR', 'Édition d\'image - en bas', '', ''),
|
||||
(@max_id + 27, 'fr_FR', 'Édition d\'hook - en haut', '', ''),
|
||||
(@max_id + 28, 'fr_FR', 'Édition d\'hook - en bas', '', ''),
|
||||
(@max_id + 29, 'fr_FR', 'Édition d\'un dossier - en haut', '', ''),
|
||||
(@max_id + 30, 'fr_FR', 'Édition d\'un dossier - en bas', '', ''),
|
||||
(@max_id + 31, 'fr_FR', 'Édition d\'un hook de module - en haut', '', ''),
|
||||
(@max_id + 32, 'fr_FR', 'Édition d\'un hook de module - en bas', '', ''),
|
||||
(@max_id + 33, 'fr_FR', 'Édition d\'un module - en haut', '', ''),
|
||||
(@max_id + 34, 'fr_FR', 'Édition d\'un module - en bas', '', ''),
|
||||
(@max_id + 35, 'fr_FR', 'Édition d\'un message - en haut', '', ''),
|
||||
(@max_id + 36, 'fr_FR', 'Édition d\'un message - en bas', '', ''),
|
||||
(@max_id + 37, 'fr_FR', 'Édition d\'un profil - en haut', '', ''),
|
||||
(@max_id + 38, 'fr_FR', 'Édition d\'un profil - en bas', '', ''),
|
||||
(@max_id + 39, 'fr_FR', 'Édition d\'un produit - en haut', '', ''),
|
||||
(@max_id + 40, 'fr_FR', 'Édition d\'un produit - en bas', '', ''),
|
||||
(@max_id + 41, 'fr_FR', 'Édition d\'une commande - en haut', '', ''),
|
||||
(@max_id + 42, 'fr_FR', 'Édition d\'une commande - en bas', '', ''),
|
||||
(@max_id + 43, 'fr_FR', 'Édition des zones de livraison d\'un transporteur - en haut', '', ''),
|
||||
(@max_id + 44, 'fr_FR', 'Édition des zones de livraison d\'un transporteur - en bas', '', ''),
|
||||
(@max_id + 45, 'fr_FR', 'Édition d\'une zone de livraison - en haut', '', ''),
|
||||
(@max_id + 46, 'fr_FR', 'Édition d\'une zone de livraiso - en bas', '', ''),
|
||||
(@max_id + 47, 'fr_FR', 'Édition d\'une promotion - en haut', '', ''),
|
||||
(@max_id + 48, 'fr_FR', 'Édition d\'une promotion - en bas', '', ''),
|
||||
(@max_id + 49, 'fr_FR', 'Édition d\'une variable - en haut', '', ''),
|
||||
(@max_id + 50, 'fr_FR', 'Édition d\'une variable - en bas', '', ''),
|
||||
(@max_id + 51, 'fr_FR', 'Édition d\'un gabarit - en haut', '', ''),
|
||||
(@max_id + 52, 'fr_FR', 'Édition d\'un gabarit - en bas', '', ''),
|
||||
(@max_id + 53, 'fr_FR', 'Édition d\'une règle de taxe - en haut', '', ''),
|
||||
(@max_id + 54, 'fr_FR', 'Édition d\'une règle de taxe - en bas', '', ''),
|
||||
(@max_id + 55, 'fr_FR', 'Édition d\'une taxe - en haut', '', ''),
|
||||
(@max_id + 56, 'fr_FR', 'Édition d\'une taxe - en bas', '', ''),
|
||||
(@max_id + 57, 'fr_FR', 'Édition d\'une commande - sous les informations du produit', '', ''),
|
||||
(@max_id + 58, 'fr_FR', 'Commande- Onglet', '', ''),
|
||||
(@max_id + 59, 'fr_FR', 'Détail d\'une commande - Après un produit', '', ''),
|
||||
(@max_id + 60, 'fr_FR', 'Onglet SEO - en haut', '', ''),
|
||||
(@max_id + 61, 'fr_FR', 'Onglet SEO - en bas', '', ''),
|
||||
(@max_id + 62, 'fr_FR', 'Onglet image - en haut', '', ''),
|
||||
(@max_id + 63, 'fr_FR', 'Onglet image - en bas', '', ''),
|
||||
(@max_id + 64, 'fr_FR', 'Onglet document - en haut', '', ''),
|
||||
(@max_id + 65, 'fr_FR', 'Onglet document - en bas', '', '')
|
||||
;
|
||||
|
||||
-- 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;
|
||||
51
setup/update/sql/2.2.0-alpha2.sql
Normal file
51
setup/update/sql/2.2.0-alpha2.sql
Normal file
@@ -0,0 +1,51 @@
|
||||
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
|
||||
(@max_id + 1, 'de_DE', 'Bestellung - Kunde Informationen unten', '', ''),
|
||||
(@max_id + 2, 'de_DE', 'Bestellung - Zahlungsmodul unten', '', ''),
|
||||
(@max_id + 3, 'de_DE', 'Bestellung - Liefermodul unten', '', ''),
|
||||
(@max_id + 4, 'de_DE', 'Rechnung - Nach dem Zahlungsmodul', NULL, NULL),
|
||||
(@max_id + 5, 'de_DE', 'Rechnung - Nach dem Liefermodul', NULL, NULL),
|
||||
(@max_id + 6, 'de_DE', 'Lieferung - Nach dem Liefermodul', NULL, NULL),
|
||||
(@max_id + 1, 'en_US', 'Order - customer information bottom', '', ''),
|
||||
(@max_id + 2, 'en_US', 'Order - payment module bottom', '', ''),
|
||||
(@max_id + 3, 'en_US', 'Order - delivery module bottom', '', ''),
|
||||
(@max_id + 4, 'en_US', 'Invoice - After payment module', NULL, NULL),
|
||||
(@max_id + 5, 'en_US', 'Invoice - After delivery module', NULL, NULL),
|
||||
(@max_id + 6, 'en_US', 'Delivery - After delivery module', NULL, NULL),
|
||||
(@max_id + 1, 'es_ES', 'Orden - parte inferior de información del cliente', '', ''),
|
||||
(@max_id + 2, 'es_ES', 'Orden - parte inferior del módulo de pago', '', ''),
|
||||
(@max_id + 3, 'es_ES', 'Orden - parte inferior del módulo de entrega', '', ''),
|
||||
(@max_id + 4, 'es_ES', 'Factura - Después de módulo de pago de factura', NULL, NULL),
|
||||
(@max_id + 5, 'es_ES', 'Factura - Después de módulo de entrega de factura', NULL, NULL),
|
||||
(@max_id + 6, 'es_ES', 'Entrega - después del módulo de entrega', NULL, NULL),
|
||||
(@max_id + 1, 'fr_FR', 'Commande - en bas des informations client', '', ''),
|
||||
(@max_id + 2, 'fr_FR', 'Commande - en bas du module de paiement', '', ''),
|
||||
(@max_id + 3, 'fr_FR', 'Commande - en bas du module de livraison', '', ''),
|
||||
(@max_id + 4, 'fr_FR', 'Commande - après le module de paiement', NULL, NULL),
|
||||
(@max_id + 5, 'fr_FR', 'Commande - après le module de livraison', NULL, NULL),
|
||||
(@max_id + 6, 'fr_FR', 'Commande - après le module de livraison', NULL, NULL)
|
||||
;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
40
setup/update/sql/2.2.0-beta1.sql
Normal file
40
setup/update/sql/2.2.0-beta1.sql
Normal file
@@ -0,0 +1,40 @@
|
||||
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
|
||||
(@max_id + 1, 'de_DE', 'Bestellung - Tabellenkopf', '', ''),
|
||||
(@max_id + 2, 'de_DE', 'Bestellung - Tabellenzeile', '', ''),
|
||||
(@max_id + 3, 'de_DE', 'Mini-Warenkorb', '', ''),
|
||||
(@max_id + 1, 'en_US', 'Order - table header', '', ''),
|
||||
(@max_id + 2, 'en_US', 'Order - table row', '', ''),
|
||||
(@max_id + 3, 'en_US', 'Mini cart', '', ''),
|
||||
(@max_id + 1, 'es_ES', 'Orden - encabezado de tabla', '', ''),
|
||||
(@max_id + 2, 'es_ES', 'Orden - fila de la tabla', '', ''),
|
||||
(@max_id + 3, 'es_ES', 'Mini tarjeta', '', ''),
|
||||
(@max_id + 1, 'fr_FR', 'Commande - colonne tableau', '', ''),
|
||||
(@max_id + 2, 'fr_FR', 'Commande - ligne tableau', '', ''),
|
||||
(@max_id + 3, 'fr_FR', 'Mini panier', '', '')
|
||||
;
|
||||
|
||||
ALTER TABLE `rewriting_url` CHANGE `url` `url` VARBINARY( 255 ) NOT NULL;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
5
setup/update/sql/2.2.0-beta2.sql
Normal file
5
setup/update/sql/2.2.0-beta2.sql
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';
|
||||
69
setup/update/sql/2.2.0-beta3.sql
Normal file
69
setup/update/sql/2.2.0-beta3.sql
Normal file
@@ -0,0 +1,69 @@
|
||||
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
|
||||
(@max_id + 1, 'de_DE', 'Registerkarte SEO - Update-Formular', '', ''),
|
||||
(@max_id + 2, 'de_DE', 'Bestellung bearbeiten - Produkttabelle Header', '', ''),
|
||||
(@max_id + 3, 'de_DE', 'Bestellung bearbeiten - Produkttabelle Zeile', '', ''),
|
||||
(@max_id + 4, 'de_DE', 'Administratoren - Header', '', ''),
|
||||
(@max_id + 5, 'de_DE', 'Administratoren - Zeile', '', ''),
|
||||
(@max_id + 6, 'de_DE', 'Erweiterte Konfiguration', '', ''),
|
||||
(@max_id + 7, 'de_DE', 'Erweiterte Konfiguration - JavaScript', '', ''),
|
||||
(@max_id + 1, 'en_US', 'Tab SEO - update form', '', ''),
|
||||
(@max_id + 2, 'en_US', 'Order edit - order product table header', '', ''),
|
||||
(@max_id + 3, 'en_US', 'Order edit - order product table row', '', ''),
|
||||
(@max_id + 4, 'en_US', 'Administrators - header', '', ''),
|
||||
(@max_id + 5, 'en_US', 'Administrators - row', '', ''),
|
||||
(@max_id + 6, 'en_US', 'Advanced Configuration', '', ''),
|
||||
(@max_id + 7, 'en_US', 'Advanced Configuration - Javascript', '', ''),
|
||||
(@max_id + 1, 'es_ES', 'Ficha SEO - formato de actualización', '', ''),
|
||||
(@max_id + 2, 'es_ES', 'Edición de Pedido - encabezado de la tabla de pedido de producto', '', ''),
|
||||
(@max_id + 3, 'es_ES', 'Edición de Pedido - fila de la tabla del pedido de producto', '', ''),
|
||||
(@max_id + 4, 'es_ES', 'Administradores - cabecera', '', ''),
|
||||
(@max_id + 5, 'es_ES', 'Administradores - fila', '', ''),
|
||||
(@max_id + 6, 'es_ES', 'Configuración avanzada', '', ''),
|
||||
(@max_id + 7, 'es_ES', 'Configuración avanzada - JavaScript', '', ''),
|
||||
(@max_id + 1, 'fr_FR', 'Onglet SEO - formulaire de mise à jour', '', ''),
|
||||
(@max_id + 2, 'fr_FR', 'Modification commande - en-tête des produits', '', ''),
|
||||
(@max_id + 3, 'fr_FR', 'Modification commande - ligne du tableau des produits', '', ''),
|
||||
(@max_id + 4, 'fr_FR', 'Administrateurs - en-tête', '', ''),
|
||||
(@max_id + 5, 'fr_FR', 'Administrateurs - ligne', '', ''),
|
||||
(@max_id + 6, 'fr_FR', 'Configuration avancée', '', ''),
|
||||
(@max_id + 7, 'fr_FR', 'Configuration avancée - JavaScript', '', '')
|
||||
;
|
||||
|
||||
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/sql/2.2.0.sql
Normal file
9
setup/update/sql/2.2.0.sql
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/sql/2.2.1.sql
Normal file
45
setup/update/sql/2.2.1.sql
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/sql/2.2.2.sql
Normal file
9
setup/update/sql/2.2.2.sql
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/sql/2.2.3.sql
Normal file
11
setup/update/sql/2.2.3.sql
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/sql/2.2.4.sql
Normal file
9
setup/update/sql/2.2.4.sql
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/sql/2.2.5.sql
Normal file
9
setup/update/sql/2.2.5.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
UPDATE `config` SET `value`='2.2.5' 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`='5' WHERE `name`='thelia_release_version';
|
||||
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
9
setup/update/sql/2.2.6.sql
Normal file
9
setup/update/sql/2.2.6.sql
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;
|
||||
2010
setup/update/sql/2.3.0-alpha1.sql
Normal file
2010
setup/update/sql/2.3.0-alpha1.sql
Normal file
File diff suppressed because it is too large
Load Diff
239
setup/update/sql/2.3.0-alpha2.sql
Normal file
239
setup/update/sql/2.3.0-alpha2.sql
Normal file
@@ -0,0 +1,239 @@
|
||||
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
|
||||
(@max, 'de_DE', NULL, NULL, NULL, NULL),
|
||||
(@max, 'en_US', 'Mail sent to an administrator who requested a new password', 'New password request on {config key=\"store_name\"}', NULL, NULL),
|
||||
(@max, 'es_ES', 'Correo enviado a un administrador que ha solicitado una nueva contraseña', 'Nueva contraseña solicitada en {config key=\"store_name\"}', NULL, NULL),
|
||||
(@max, 'fr_FR', 'Courrier envoyé à un administrateur qui a demandé un nouveau mot de passe', 'Votre demande de mot de passe {config key=\"store_name\"}', NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max_id + 1, 'de_DE', NULL, NULL, NULL, NULL),
|
||||
(@max_id + 2, 'de_DE', NULL, NULL, NULL, NULL),
|
||||
(@max_id + 3, 'de_DE', NULL, NULL, NULL, NULL),
|
||||
(@max_id + 1, 'en_US', 'The minimum length required for an administrator password', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'en_US', 'Allow an administrator to recreate a lost password (1 = yes, 0 = no)', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'en_US', 'Send a confirmation email to newsletter subscribers (1 = yes, 0 = no)', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'es_ES', 'La longitud mínima de la contraseña de administrador', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'es_ES', 'Permite a un administrador recrear una contraseña perdida (1 = sí, 0 = no)', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'es_ES', 'Enviar un correo de confirmación a los suscriptores del boletín (1 = sí, 0 = no)', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'fr_FR', 'La longueur minimale requise pour un mot de passe administrateur', NULL, NULL, NULL),
|
||||
(@max_id + 2, 'fr_FR', 'Permettre à un administrateur de recréer un mot de passe perdu (1 = Oui, 0 = non)', NULL, NULL, NULL),
|
||||
(@max_id + 3, 'fr_FR', 'Envoyer un email de confirmation aux abonnés de la newsletter (1 = Oui, 0 = non)', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max_id+1, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+2, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+3, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+4, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+5, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+6, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+7, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+8, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+9, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+10, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+11, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+12, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+13, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+14, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+15, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+16, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+1, 'en_US', 'Sale - at the top', NULL, NULL),
|
||||
(@max_id+2, 'en_US', 'Sale - at the bottom', NULL, NULL),
|
||||
(@max_id+3, 'en_US', 'Sale - at the top of the main area', NULL, NULL),
|
||||
(@max_id+4, 'en_US', 'Sale - at the bottom of the main area', NULL, NULL),
|
||||
(@max_id+5, 'en_US', 'Sale - before the main content area', NULL, NULL),
|
||||
(@max_id+6, 'en_US', 'Sale - after the main content area', NULL, NULL),
|
||||
(@max_id+7, 'en_US', 'Sale - CSS stylesheet', NULL, NULL),
|
||||
(@max_id+8, 'en_US', 'Sale - after javascript include', NULL, NULL),
|
||||
(@max_id+9, 'en_US', 'Sale - javascript initialization', NULL, NULL),
|
||||
(@max_id+10, 'en_US', 'Order details - after invoice address', NULL, NULL),
|
||||
(@max_id+11, 'en_US', 'Order details - after delivery address', NULL, NULL),
|
||||
(@max_id+12, 'en_US', 'Newsletter unsubscribe page - at the top', NULL, NULL),
|
||||
(@max_id+13, 'en_US', 'Newsletter unsubscribe page - at the bottom', NULL, NULL),
|
||||
(@max_id+14, 'en_US', 'Newsletter unsubscribe page - CSS stylesheet', NULL, NULL),
|
||||
(@max_id+15, 'en_US', 'Newsletter unsubscribe page - after javascript include', NULL, NULL),
|
||||
(@max_id+16, 'en_US', 'Newsletter unsubscribe page - after javascript initialisation', NULL, NULL),
|
||||
(@max_id+1, 'es_ES', 'Venta - encabezado', NULL, NULL),
|
||||
(@max_id+2, 'es_ES', 'Venta - al pie', NULL, NULL),
|
||||
(@max_id+3, 'es_ES', 'Venta - encabezado del área principal', NULL, NULL),
|
||||
(@max_id+4, 'es_ES', 'Venta - al pie del área principal', NULL, NULL),
|
||||
(@max_id+5, 'es_ES', 'Venta - antes del área de contenido principal', NULL, NULL),
|
||||
(@max_id+6, 'es_ES', 'Venta - después del área de contenido principal', NULL, NULL),
|
||||
(@max_id+7, 'es_ES', 'Venta - Hoja de estilos CSS', NULL, NULL),
|
||||
(@max_id+8, 'es_ES', 'Venta - después de incluir JavaScript', NULL, NULL),
|
||||
(@max_id+9, 'es_ES', 'Venta - inicialización de JavaScript', NULL, NULL),
|
||||
(@max_id+10, 'es_ES', 'Detalles de pedido - después de la dirección de facturación', NULL, NULL),
|
||||
(@max_id+11, 'es_ES', 'Detalles de pedido - después de la dirección de entrega', NULL, NULL),
|
||||
(@max_id+12, 'es_ES', 'Página de baja del boletín - en la parte superior', NULL, NULL),
|
||||
(@max_id+13, 'es_ES', 'Página de baja del boletín - al pie', NULL, NULL),
|
||||
(@max_id+14, 'es_ES', 'Página de baja del boletín - Hoja de estilos CSS', NULL, NULL),
|
||||
(@max_id+15, 'es_ES', 'Página de baja del boletín - después de incluir JavaScript', NULL, NULL),
|
||||
(@max_id+16, 'es_ES', 'Página de baja del boletín - después de la inicialización de JavaScript', NULL, NULL),
|
||||
(@max_id+1, 'fr_FR', 'Promotion - en haut', NULL, NULL),
|
||||
(@max_id+2, 'fr_FR', 'Promotion - en bas', NULL, NULL),
|
||||
(@max_id+3, 'fr_FR', 'Promotion - en haut de la zone principal', NULL, NULL),
|
||||
(@max_id+4, 'fr_FR', 'Promotion - en bas de la zone principal', NULL, NULL),
|
||||
(@max_id+5, 'fr_FR', 'Promotion - au dessous de la zone de contenu principale', NULL, NULL),
|
||||
(@max_id+6, 'fr_FR', 'Promotion - en dessous de la zone de contenu principale', NULL, NULL),
|
||||
(@max_id+7, 'fr_FR', 'Promotion - feuille de style CSS', NULL, NULL),
|
||||
(@max_id+8, 'fr_FR', 'Promotion - après l\'inclusion du JavaScript', NULL, NULL),
|
||||
(@max_id+9, 'fr_FR', 'Promotion - initialisation du JavaScript', NULL, NULL),
|
||||
(@max_id+10, 'fr_FR', 'Détail d\'une commande - après l\'adresse de facturation', NULL, NULL),
|
||||
(@max_id+11, 'fr_FR', 'Détails d\'une commande - après l\'adresse de livraison', NULL, NULL),
|
||||
(@max_id+12, 'fr_FR', 'Désabonnement newsletter - en haut', NULL, NULL),
|
||||
(@max_id+13, 'fr_FR', 'Désabonnement newsletter - en bas', NULL, NULL),
|
||||
(@max_id+14, 'fr_FR', 'Désabonnement newsletter - feuille de style CSS', NULL, NULL),
|
||||
(@max_id+15, 'fr_FR', 'Désabonnement newsletter - après l\'inclusion du JavaScript', NULL, NULL),
|
||||
(@max_id+16, 'fr_FR', 'Désabonnement newsletter - après l\'initialisation du JavaScript', NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max, 'de_DE', NULL, NULL, NULL, NULL),
|
||||
(@max, 'en_US', 'Mail sent after a subscription to newsletter', 'Your subscription to {config key=\"store_name\"} newsletter', NULL, NULL),
|
||||
(@max, 'es_ES', 'Correo enviado después de la suscripción al boletín de noticias', 'Tu suscripción al boletín de {config key=\"store_name\"}', NULL, NULL),
|
||||
(@max, 'fr_FR', 'Email envoyé après l\'inscription à la newsletter', 'Votre abonnement à {config key=\"store_name\"} newsletter', NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max+1, 'de_DE', NULL, NUll, NULL, NULL),
|
||||
(@max+2, 'de_DE', NULL, NUll, NULL, NULL),
|
||||
(@max+3, 'de_DE', NULL, NUll, NULL, NULL),
|
||||
(@max+1, 'en_US', 'Default number of products on product list', NUll, NULL, NULL),
|
||||
(@max+2, 'en_US', 'Default number of orders on order list', NUll, NULL, NULL),
|
||||
(@max+3, 'en_US', 'Default number of customers on customer list', NUll, NULL, NULL),
|
||||
(@max+1, 'es_ES', 'Número predeterminado de resultados por página para la lista de productos', NUll, NULL, NULL),
|
||||
(@max+2, 'es_ES', 'Número predeterminado de resultados por página para la lista de pedidos', NUll, NULL, NULL),
|
||||
(@max+3, 'es_ES', 'Número predeterminado de resultados por página para la lista de clientes', NUll, NULL, NULL),
|
||||
(@max+1, 'fr_FR', 'Nombre par défaut de résultats par page pour la liste des produits', NUll, NULL, NULL),
|
||||
(@max+2, 'fr_FR', 'Nombre par défaut de résultats par page pour la liste des commandes', NUll, NULL, NULL),
|
||||
(@max+3, 'fr_FR', 'Nombre par défaut de résultats par page pour la liste des clients', NUll, NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max_id+1, 'de_DE', NULL, NULL, NULL, NULL),
|
||||
(@max_id+1, 'en_US', 'Displays the default blocks on the homepage of the administration', NULL, NULL, NULL),
|
||||
(@max_id+1, 'es_ES', NULL, NULL, NULL, NULL),
|
||||
(@max_id+1, 'fr_FR', 'Affiche les blocs par défaut sur la page d\'accueil de l\'administration', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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/sql/2.3.0-beta1.sql
Normal file
18
setup/update/sql/2.3.0-beta1.sql
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/sql/2.3.0-beta2.sql
Normal file
12
setup/update/sql/2.3.0-beta2.sql
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/sql/2.3.0.sql
Normal file
12
setup/update/sql/2.3.0.sql
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/sql/2.3.1.sql
Normal file
9
setup/update/sql/2.3.1.sql
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/sql/2.3.2.sql
Normal file
9
setup/update/sql/2.3.2.sql
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/sql/2.3.3.sql
Normal file
9
setup/update/sql/2.3.3.sql
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;
|
||||
181
setup/update/sql/2.3.4.sql
Normal file
181
setup/update/sql/2.3.4.sql
Normal file
@@ -0,0 +1,181 @@
|
||||
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
|
||||
(@max_id+1, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+2, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+3, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+4, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+5, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+6, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+7, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+1, 'en_US', 'Order invoice page - bottom of coupon form', NULL, NULL),
|
||||
(@max_id+2, 'en_US', 'Order invoice page - bottom of payment form', NULL, NULL),
|
||||
(@max_id+3, 'en_US', 'Delivery - after product information', NULL, NULL),
|
||||
(@max_id+4, 'en_US', 'Invoice - after product information', NULL, NULL),
|
||||
(@max_id+5, 'en_US', 'Email html - order notification - after product information', NULL, NULL),
|
||||
(@max_id+6, 'en_US', 'Email txt - order notification - after product information', NULL, NULL),
|
||||
(@max_id+7, 'en_US', 'Account order - after product information', NULL, NULL),
|
||||
(@max_id+1, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+2, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+3, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+4, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+5, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+6, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+7, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+1, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+2, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+3, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+4, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+5, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+6, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+7, 'fr_FR', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max_id + 1, 'de_DE', NULL, NULL, NULL, NULL),
|
||||
(@max_id + 1, 'en_US', 'Customer account creation should be confirmed by email (1: yes, 0: no)', NULL, NULL, NULL),
|
||||
(@max_id + 1, 'es_ES', NULL, NULL, NULL, NULL),
|
||||
(@max_id + 1, 'fr_FR', 'La création d\'un compte client doit être confilrée par email (1: oui, 0: non)', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
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
|
||||
(@max_id+1, 'de_DE', NULL, NULL, NULL, NULL),
|
||||
(@max_id+1, 'en_US', 'Mail sent to the customer to confirm its account', 'Confirm your {config key=\"store_name\"} account', NULL, NULL),
|
||||
(@max_id+1, 'es_ES', NULL, NULL, NULL, NULL),
|
||||
(@max_id+1, 'fr_FR', 'E-mail de confirmation de création de compte client', 'Confirmez la création de votre compte {config key=\"store_name\"}', NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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 '1' 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
|
||||
(@max_id+1, 'de_DE', NULL),
|
||||
(@max_id+1, 'en_US', 'Configuration order status'),
|
||||
(@max_id+1, 'es_ES', NULL),
|
||||
(@max_id+1, 'fr_FR', NULL)
|
||||
;
|
||||
|
||||
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
|
||||
(@max_id+1, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+2, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+3, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+4, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+5, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+6, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+7, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+8, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+9, 'de_DE', NULL, NULL, NULL),
|
||||
(@max_id+1, 'en_US', 'Configuration - Order path - top', NULL, NULL),
|
||||
(@max_id+2, 'en_US', 'Configuration - Order path - bottom', NULL, NULL),
|
||||
(@max_id+3, 'en_US', 'Order status - top', NULL, NULL),
|
||||
(@max_id+4, 'en_US', 'Order status - bottom', NULL, NULL),
|
||||
(@max_id+5, 'en_US', 'Order status - table header', NULL, NULL),
|
||||
(@max_id+6, 'en_US', 'Order status - table row', NULL, NULL),
|
||||
(@max_id+7, 'en_US', 'Order status - form creation', NULL, NULL),
|
||||
(@max_id+8, 'en_US', 'Order status - form modification', NULL, NULL),
|
||||
(@max_id+9, 'en_US', 'Order status - JavaScript', NULL, NULL),
|
||||
(@max_id+1, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+2, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+3, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+4, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+5, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+6, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+7, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+8, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+9, 'es_ES', NULL, NULL, NULL),
|
||||
(@max_id+1, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+2, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+3, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+4, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+5, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+6, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+7, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+8, 'fr_FR', NULL, NULL, NULL),
|
||||
(@max_id+9, 'fr_FR', NULL, NULL, NULL)
|
||||
;
|
||||
|
||||
-- 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
|
||||
(@max+1, 'de_DE', NULL, NUll, NULL, NULL), (@max+1, 'en_US', 'Default number of coupons per page on coupon list', NUll, NULL, NULL), (@max+1, 'es_ES', NULL, NUll, NULL, NULL), (@max+1, 'fr_FR', 'Nombre de coupons par page dans la liste des coupons', NUll, NULL, NULL);
|
||||
|
||||
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/sql/2.3.5.sql
Normal file
9
setup/update/sql/2.3.5.sql
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;
|
||||
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;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user