Роман_DD 2 Posted November 13, 2019 Report Share Posted November 13, 2019 Включая клиентские учетки, историю заказов, у товаров характеристики и фильтры! Там муторно немного получается, я пробовал через обновление базы данных alter table. И даже запрос написал, но дело было весной и уже не помню под какую версию vamshop делал.. Хотел сделать под старую, где меньше изменений по сравнению с osc vam, а потом апдейтами sql уже догнать до текущей, но бросил и сейчас уже просто нет времени ковыряться. Апдейтилка старая, выложенная в форуме работает не совсем корректно. Такой вот код был... SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; CREATE TABLE `copy_address_book` LIKE `address_book`; INSERT INTO `copy_address_book` SELECT * FROM `address_book`; CREATE TABLE `copy_address_format` LIKE `address_format`; INSERT INTO `copy_address_format` SELECT * FROM `address_format`; CREATE TABLE `copy_articles` LIKE `articles`; INSERT INTO `copy_articles` SELECT * FROM `articles`; CREATE TABLE `copy_articles_description` LIKE `articles_description`; INSERT INTO `copy_articles_description` SELECT * FROM `articles_description`; CREATE TABLE `copy_articles_to_topics` LIKE `articles_to_topics`; INSERT INTO `copy_articles_to_topics` SELECT * FROM `articles_to_topics`; CREATE TABLE `copy_categories` LIKE `categories`; INSERT INTO `copy_categories` SELECT * FROM `categories`; CREATE TABLE `copy_categories_description` LIKE `categories_description`; INSERT INTO `copy_categories_description` SELECT * FROM `categories_description`; CREATE TABLE `copy_currencies` LIKE `currencies`; INSERT INTO `copy_currencies` SELECT * FROM `currencies`; CREATE TABLE `copy_customers` LIKE `customers`; INSERT INTO `copy_customers` SELECT * FROM `customers`; CREATE TABLE `copy_customers_basket` LIKE `customers_basket`; INSERT INTO `copy_customers_basket` SELECT * FROM `customers_basket`; CREATE TABLE `copy_customers_basket_attributes` LIKE `customers_basket_attributes`; INSERT INTO `copy_customers_basket_attributes` SELECT * FROM `customers_basket_attributes`; CREATE TABLE `copy_customers_groups` LIKE `customers_groups`; INSERT INTO `copy_customers_groups` SELECT * FROM `customers_groups`; CREATE TABLE `copy_customers_info` LIKE `customers_info`; INSERT INTO `copy_customers_info` SELECT * FROM `customers_info`; CREATE TABLE `copy_customers_to_extra_fields` LIKE `customers_to_extra_fields`; INSERT INTO `copy_customers_to_extra_fields` SELECT * FROM `customers_to_extra_fields`; CREATE TABLE `copy_manufacturers` LIKE `manufacturers`; INSERT INTO `copy_manufacturers` SELECT * FROM `manufacturers`; CREATE TABLE `copy_manufacturers_info` LIKE `manufacturers_info`; INSERT INTO `copy_manufacturers_info` SELECT * FROM `manufacturers_info`; CREATE TABLE `copy_orders` LIKE `orders`; INSERT INTO `copy_orders` SELECT * FROM `orders`; CREATE TABLE `copy_orders_products` LIKE `orders_products`; INSERT INTO `copy_orders_products` SELECT * FROM `orders_products`; CREATE TABLE `copy_orders_products_attributes` LIKE `orders_products_attributes`; INSERT INTO `copy_orders_products_attributes` SELECT * FROM `orders_products_attributes`; CREATE TABLE `copy_orders_products_download` LIKE `orders_products_download`; INSERT INTO `copy_orders_products_download` SELECT * FROM `orders_products_download`; CREATE TABLE `copy_orders_status` LIKE `orders_status`; INSERT INTO `copy_orders_status` SELECT * FROM `orders_status`; CREATE TABLE `copy_orders_status_history` LIKE `orders_status_history`; INSERT INTO `copy_orders_status_history` SELECT * FROM `orders_status_history`; CREATE TABLE `copy_orders_total` LIKE `orders_total`; INSERT INTO `copy_orders_total` SELECT * FROM `orders_total`; CREATE TABLE `copy_products` LIKE `products`; INSERT INTO `copy_products` SELECT * FROM `products`; CREATE TABLE `copy_products_attributes` LIKE `products_attributes`; INSERT INTO `copy_products_attributes` SELECT * FROM `products_attributes`; CREATE TABLE `copy_products_description` LIKE `products_description`; INSERT INTO `copy_products_description` SELECT * FROM `products_description`; CREATE TABLE `copy_products_extra_fields` LIKE `products_extra_fields`; INSERT INTO `copy_products_extra_fields` SELECT * FROM `products_extra_fields`; CREATE TABLE `copy_products_images` LIKE `products_images`; INSERT INTO `copy_products_images` SELECT * FROM `products_images`; CREATE TABLE `copy_products_options` LIKE `products_options`; INSERT INTO `copy_products_options` SELECT * FROM `products_options`; CREATE TABLE `copy_products_options_values` LIKE `products_options_values`; INSERT INTO `copy_products_options_values` SELECT * FROM `products_options_values`; CREATE TABLE `copy_products_options_values_to_products_options` LIKE `products_options_values_to_products_options`; INSERT INTO `copy_products_options_values_to_products_options` SELECT * FROM `products_options_values_to_products_options`; CREATE TABLE `copy_products_specifications` LIKE `products_specifications`; INSERT INTO `copy_products_specifications` SELECT * FROM `products_specifications`; CREATE TABLE `copy_products_to_categories` LIKE `products_to_categories`; INSERT INTO `copy_products_to_categories` SELECT * FROM `products_to_categories`; CREATE TABLE `copy_reviews` LIKE `reviews`; INSERT INTO `copy_reviews` SELECT * FROM `reviews`; CREATE TABLE `copy_reviews_description` LIKE `reviews_description`; INSERT INTO `copy_reviews_description` SELECT * FROM `reviews_description`; CREATE TABLE `copy_specials` LIKE `specials`; INSERT INTO `copy_specials` SELECT * FROM `specials`; ALTER TABLE `address_book` ADD `address_date_added` datetime NULL, ADD `address_last_modified` datetime NULL AFTER `address_date_added`; ADD `entry_secondname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL AFTER `entry_firstname`; ALTER TABLE `customers` ADD `customers_cid` varchar(255) NOT NULL AFTER `customers_id`, ADD `customers_vat_id` varchar(20) NOT NULL AFTER `customers_cid`, ADD `customers_vat_id_status` int(2) NOT NULL AFTER `customers_vat_id`, ADD `customers_warning` varchar(255) NOT NULL AFTER `customers_vat_id_status`, ADD `customers_secondname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_firstname`, ADD `customers_newsletter_mode` char(1) COLLATE 'utf8_general_ci' NULL AFTER `customers_newsletter`, CHANGE `guest_flag` `member_flag` char(1) COLLATE 'utf8_general_ci' NULL DEFAULT '0' AFTER `customers_selected_template`, ADD `delete_user` char(1) COLLATE 'utf8_general_ci' NULL AFTER `member_flag`, ADD `account_type` int(1) NULL AFTER `delete_user`, ADD `password_request_key` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `account_type`, CHANGE `customers_payment_allowed` `payment_unallowed` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `password_request_key`, CHANGE `customers_shipment_allowed` `shipping_unallowed` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `payment_unallowed`, CHANGE `customers_status` `customers_status` int(5) NOT NULL DEFAULT '1' AFTER `customers_warning`, ADD `refferers_id` int(5) NOT NULL AFTER `customers_status`, ADD `customers_date_added` datetime NULL AFTER `refferers_id`, ADD `customers_last_modified` datetime NULL AFTER `customers_date_added`, ADD `orig_reference` text NULL AFTER `customers_last_modified`, ADD `login_reference` text NULL AFTER `orig_reference`, ADD `login_tries` char(2) NULL AFTER `login_reference`, ADD `login_time` datetime NULL AFTER `login_tries`, ADD `customers_username` varchar(64) NULL AFTER `login_time`, ADD `customers_fid` int(5) NULL AFTER `customers_username`, ADD `customers_sid` int(5) NULL AFTER `customers_fid`, CHANGE `customers_groups_id` `customers_groups_id` int(11) NOT NULL DEFAULT '1' AFTER `customers_sid`, CHANGE `customers_discount` `customers_personal_discount` decimal(4,2) NOT NULL DEFAULT '0.00' AFTER `customers_groups_id`; ALTER TABLE `orders` ADD `customers_cid` varchar(255) NOT NULL AFTER `customers_id`, ADD `customers_vat_id` varchar(20) NOT NULL AFTER `customers_cid`, ADD `customers_status` int(11) NOT NULL AFTER `customers_groups_id`, ADD `customers_status_name` varchar(255) NOT NULL AFTER `customers_status`, ADD `customers_status_image` varchar(255) NOT NULL AFTER `customers_status_name`, ADD `customers_status_discount` decimal(4,2) NOT NULL AFTER `customers_status_image`, ADD `customers_firstname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_name`, ADD `customers_secondname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_firstname`, ADD `customers_lastname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_secondname`, ADD `delivery_firstname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `delivery_name`, ADD `delivery_secondname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `delivery_firstname`, ADD `delivery_lastname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `delivery_secondname`, ADD `delivery_country_iso_code_2` char(2) COLLATE 'utf8_general_ci' NOT NULL AFTER `delivery_country`, ADD `billing_firstname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `billing_name`, ADD `billing_secondname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `billing_firstname`, ADD `billing_lastname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `billing_secondname`, ADD `billing_country_iso_code_2` char(2) COLLATE 'utf8_general_ci' NOT NULL AFTER `billing_country`, ADD `cc_start` varchar(4) COLLATE 'utf8_general_ci' NULL AFTER `cc_expires`, ADD `cc_issue` varchar(4) COLLATE 'utf8_general_ci' NULL AFTER `cc_start`, ADD `cc_cvv` varchar(4) COLLATE 'utf8_general_ci' NULL AFTER `cc_issue`, ADD `comments` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `cc_cvv`, ADD `account_type` int(1) NULL AFTER `currency_value`, ADD `payment_class` decimal(14,6) NULL AFTER `account_type`, ADD `shipping_method` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `customers_referer_url`, ADD `shipping_class` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `shipping_method`, ADD `customers_ip` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `shipping_class`, ADD `language` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `customers_ip`, ADD `afterbuy_success` int(1) NULL AFTER `language`, ADD `afterbuy_id` int(32) NULL AFTER `afterbuy_success`, ADD `refferers_id` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `afterbuy_id`, ADD `conversion_type` int(1) NULL AFTER `refferers_id`, ADD `orders_ident_key` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `conversion_type`, ADD `orig_reference` text COLLATE 'utf8_general_ci' NULL AFTER `orders_ident_key`, ADD `login_reference` text COLLATE 'utf8_general_ci' NULL AFTER `orig_reference`; ALTER TABLE `orders_products` ADD `products_discount_made` decimal(4,2) NOT NULL AFTER `products_price`, ADD `products_shipping_time` varchar(255) NOT NULL AFTER `products_discount_made`, ADD `allow_tax` int(1) NOT NULL; ALTER TABLE `orders_status` ADD `answer_templates_id` int(11) NULL AFTER `orders_status_id`, ADD `restock` varchar(32) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0' AFTER `answer_templates_id`, CHANGE `downloads_flag` `downloads_flag` int(11) NULL DEFAULT '0' AFTER `orders_status_name`, CHANGE `public_flag` `public_flag` int(11) NULL DEFAULT '1' AFTER `downloads_flag`; ALTER TABLE `products` ADD `products_ean` varchar(255) NOT NULL AFTER `products_id`, ADD `products_quantity_min` int(4) NOT NULL DEFAULT '1' AFTER `products_quantity`, ADD `products_quantity_max` int(4) NOT NULL DEFAULT '1000' AFTER `products_quantity_min`, ADD `products_shippingtime` int(4) NOT NULL AFTER `products_quantity_max`, ADD `group_permission_0` tinyint(1) NULL AFTER `products_model`, ADD `group_permission_1` tinyint(1) NULL AFTER `group_permission_0`, ADD `group_permission_2` tinyint(1) NULL AFTER `group_permission_1`, ADD `group_permission_3` tinyint(1) NULL AFTER `group_permission_2`, ADD `products_sort` tinyint(1) NULL AFTER `group_permission_3`, CHANGE `products_image` `products_image` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_sort`, ADD `products_image_description` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_image`, ADD `products_discount_allowed` decimal(15,4) NOT NULL DEFAULT '0.0000' AFTER `products_price`, ADD `product_template` varchar(64) NOT NULL AFTER `products_tax_class_id`, ADD `options_template` varchar(64) NOT NULL AFTER `product_template`, ADD `label_id` int(11) NULL AFTER `manufacturers_id`, ADD `products_fsk18` int(11) NOT NULL AFTER `products_ordered`, ADD `products_vpe` int(11) NOT NULL AFTER `products_fsk18`, ADD `products_vpe_status` int(11) NOT NULL AFTER `products_vpe`, ADD `products_vpe_value` decimal(15,4) NOT NULL AFTER `products_vpe_status`, ADD `products_startpage` int(1) NOT NULL AFTER `products_vpe_value`, ADD `products_startpage_sort` int(4) NOT NULL AFTER `products_startpage`, ADD `yml_bid` varchar(4) NOT NULL AFTER `products_startpage_sort`, ADD `yml_cbid` varchar(4) NOT NULL AFTER `yml_bid`, ADD `products_page_url` varchar(255) NOT NULL AFTER `yml_cbid`, ADD `products_length` int(11) NULL AFTER `products_page_url`, ADD `products_width` int(11) NULL AFTER `products_length`, ADD `products_height` int(11) NULL AFTER `products_width`, ADD `products_volume` int(11) NULL AFTER `products_height`, ADD `products_bundle` varchar(255) NOT NULL AFTER `products_volume`; ALTER TABLE `products_attributes` ADD `attributes_model` varchar(1) COLLATE 'utf8_general_ci' NOT NULL AFTER `price_prefix`, CHANGE `products_attributes_units` `attributes_stock` int(4) NOT NULL DEFAULT '0' AFTER `attributes_model`, CHANGE `products_attributes_weight` `options_values_weight` decimal(5,2) NOT NULL DEFAULT '0.00' AFTER `attributes_stock`, CHANGE `products_attributes_weight_prefix` `weight_prefix` char(1) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `options_values_weight`, CHANGE `products_options_sort_order` `sortorder` int(6) NOT NULL DEFAULT '0' AFTER `weight_prefix`, CHANGE `products_attributes_units_price` `products_attributes_units_price` decimal(15,4) NOT NULL DEFAULT '0.0000' AFTER `sortorder`, CHANGE `product_attributes_one_time` `product_attributes_one_time` tinyint(1) NOT NULL DEFAULT '0' AFTER `products_attributes_units_price`; ALTER TABLE `products_description` ADD `products_short_description` text COLLATE 'utf8_general_ci' NULL AFTER `products_description`, CHANGE `products_head_title_tag` `products_meta_title` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_tab_1`, CHANGE `products_head_desc_tag` `products_meta_description` longtext COLLATE 'utf8_general_ci' NOT NULL AFTER `products_meta_title`, CHANGE `products_head_keywords_tag` `products_meta_keywords` longtext COLLATE 'utf8_general_ci' NOT NULL AFTER `products_meta_description`, CHANGE `products_url` `products_url` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_meta_keywords`, CHANGE `products_viewed` `products_viewed` int(5) NULL DEFAULT '0' AFTER `products_url`; ALTER TABLE `products_description` CHANGE `products_name` `products_name` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `language_id`, ADD `products_keywords` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_short_description`, DROP `products_tab_6`, DROP `products_tab_5`, DROP `products_tab_4`, DROP `products_tab_3`, DROP `products_tab_2`, DROP `products_tab_1`, CHANGE `products_meta_title` `products_meta_title` text COLLATE 'utf8_general_ci' NULL AFTER `products_keywords`, CHANGE `products_meta_description` `products_meta_description` text COLLATE 'utf8_general_ci' NOT NULL AFTER `products_meta_title`, CHANGE `products_meta_keywords` `products_meta_keywords` text COLLATE 'utf8_general_ci' NOT NULL AFTER `products_meta_description`, DROP `products_info`; ALTER TABLE `manufacturers_info` DROP `manufacturers_description`; # Скопировать таблицу products_images из vamshop базы ALTER TABLE `categories` CHANGE `categories_status` `categories_status` tinyint(1) unsigned NOT NULL DEFAULT '1' AFTER `parent_id`, ADD `categories_template` tinyint(1) unsigned NOT NULL AFTER `categories_status`, ADD `group_permission_0` tinyint(1) unsigned NOT NULL AFTER `categories_template`, ADD `group_permission_1` tinyint(1) unsigned NOT NULL AFTER `group_permission_0`, ADD `group_permission_2` tinyint(1) unsigned NOT NULL AFTER `group_permission_1`, ADD `group_permission_3` tinyint(1) unsigned NOT NULL AFTER `group_permission_2`, ADD `listing_template` tinyint(1) unsigned NOT NULL AFTER `group_permission_3`, CHANGE `sort_order` `sort_order` int(3) NULL AFTER `listing_template`, ADD `products_sorting` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `sort_order`, ADD `products_sorting2` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_sorting`, CHANGE `date_added` `date_added` datetime NULL AFTER `products_sorting2`, CHANGE `last_modified` `last_modified` datetime NULL AFTER `date_added`, ADD `yml_bid` varchar(4) NULL, ADD `yml_cbid` varchar(4) NULL AFTER `yml_bid`, ADD `categories_url` varchar(255) NULL AFTER `yml_cbid`, ADD `yml_enable` tinyint(1) NULL DEFAULT '1' AFTER `categories_url`; ALTER TABLE `products_options` CHANGE `products_options_length` `products_options_length` smallint(11) NOT NULL DEFAULT '32' AFTER `products_options_name`, ADD `products_options_size` smallint(11) NOT NULL AFTER `products_options_length`, ADD `products_options_rows` smallint(11) NOT NULL AFTER `products_options_size`, CHANGE `products_options_type` `products_options_type` int(11) NOT NULL DEFAULT '0' AFTER `products_options_rows`, CHANGE `products_options_comment` `products_options_comment` varchar(32) COLLATE 'utf8_general_ci' NULL AFTER `products_options_type`, CHANGE `products_options_sort_order` `sortorder` int(4) NOT NULL DEFAULT '0' AFTER `products_options_comment`; ALTER TABLE `products_options` CHANGE `products_options_name` `products_options_name` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `language_id`, CHANGE `products_options_size` `products_options_size` smallint(11) NOT NULL DEFAULT '32' AFTER `products_options_length`, CHANGE `products_options_rows` `products_options_rows` smallint(11) NOT NULL DEFAULT '4' AFTER `products_options_size`; ALTER TABLE `products_options_values` CHANGE `products_options_values_name` `products_options_values_name` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `language_id`, ADD `products_options_values_description` tinytext COLLATE 'utf8_general_ci' NOT NULL AFTER `products_options_values_name`, ADD `products_options_values_text` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `products_options_values_description`, CHANGE `products_options_values_thumbnail` `products_options_values_image` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `products_options_values_text`, ADD `products_options_values_link` varchar(255) COLLATE 'utf8_general_ci' NOT NULL; ALTER TABLE `reviews` ADD `customers_avatar` varchar(64) NULL AFTER `customers_id`; ALTER TABLE `customers` CHANGE `customers_cid` `customers_cid` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `customers_id`, CHANGE `customers_vat_id` `customers_vat_id` varchar(20) COLLATE 'utf8_general_ci' NULL AFTER `customers_cid`, CHANGE `customers_vat_id_status` `customers_vat_id_status` int(2) NOT NULL DEFAULT '0' AFTER `customers_vat_id`, CHANGE `customers_warning` `customers_warning` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `customers_vat_id_status`, CHANGE `customers_status` `customers_status` int(5) NOT NULL DEFAULT '1' AFTER `customers_warning`, CHANGE `customers_gender` `customers_gender` char(1) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_status`, CHANGE `customers_firstname` `customers_firstname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_gender`, CHANGE `customers_secondname` `customers_secondname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_firstname`, CHANGE `customers_lastname` `customers_lastname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_secondname`, CHANGE `customers_dob` `customers_dob` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `customers_lastname`, CHANGE `customers_email_address` `customers_email_address` varchar(96) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_dob`, CHANGE `customers_default_address_id` `customers_default_address_id` int(11) NULL AFTER `customers_email_address`, CHANGE `customers_telephone` `customers_telephone` varchar(32) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_default_address_id`, CHANGE `customers_fax` `customers_fax` varchar(32) COLLATE 'utf8_general_ci' NULL AFTER `customers_telephone`, CHANGE `customers_password` `customers_password` varchar(40) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_fax`, CHANGE `customers_newsletter` `customers_newsletter` char(1) COLLATE 'utf8_general_ci' NULL AFTER `customers_password`, CHANGE `customers_newsletter_mode` `customers_newsletter_mode` char(1) COLLATE 'utf8_general_ci' NULL AFTER `customers_newsletter`, CHANGE `customers_selected_template` `customers_selected_template` varchar(20) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_newsletter_mode`, CHANGE `member_flag` `member_flag` char(1) COLLATE 'utf8_general_ci' NULL DEFAULT '0' AFTER `customers_selected_template`, CHANGE `delete_user` `delete_user` char(1) COLLATE 'utf8_general_ci' NULL AFTER `member_flag`, CHANGE `account_type` `account_type` int(1) NULL AFTER `delete_user`, CHANGE `password_request_key` `password_request_key` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `account_type`, CHANGE `payment_unallowed` `payment_unallowed` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `password_request_key`, CHANGE `shipping_unallowed` `shipping_unallowed` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `payment_unallowed`; ALTER TABLE `products` CHANGE `products_bundle` `products_bundle` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'no' AFTER `products_volume`, ADD `sold_in_bundle_only` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'no' AFTER `products_bundle`; ALTER TABLE `products_xsell` ADD `products_xsell_grp_name_id i` int(10) unsigned NOT NULL DEFAULT '1' AFTER `products_id`; ALTER TABLE `products` CHANGE `products_quantity` `products_quantity` int(4) NOT NULL DEFAULT '10' AFTER `products_ean`, CHANGE `group_permission_0` `group_permission_0` tinyint(1) NOT NULL AFTER `products_model`, CHANGE `group_permission_1` `group_permission_1` tinyint(1) NOT NULL AFTER `group_permission_0`, CHANGE `group_permission_2` `group_permission_2` tinyint(1) NOT NULL AFTER `group_permission_1`, CHANGE `group_permission_3` `group_permission_3` tinyint(1) NOT NULL AFTER `group_permission_2`, CHANGE `products_sort` `products_sort` tinyint(1) NULL DEFAULT '0' AFTER `group_permission_3`, DROP `products_image_med`, DROP `products_image_lrg`, DROP `products_image_sm_1`, DROP `products_image_xl_1`, DROP `products_image_sm_2`, DROP `products_image_xl_2`, DROP `products_image_sm_3`, DROP `products_image_xl_3`, DROP `products_image_sm_4`, DROP `products_image_xl_4`, DROP `products_image_sm_5`, DROP `products_image_xl_5`, DROP `products_image_sm_6`, DROP `products_image_xl_6`, CHANGE `products_price` `products_price` decimal(15,4) NOT NULL AFTER `products_image_description`, CHANGE `products_date_added` `products_date_added` datetime NOT NULL AFTER `products_discount_allowed`, CHANGE `products_weight` `products_weight` decimal(5,2) NOT NULL AFTER `products_date_available`, CHANGE `products_status` `products_status` tinyint(1) NOT NULL AFTER `products_weight`, CHANGE `products_tax_class_id` `products_tax_class_id` int(11) NOT NULL AFTER `products_status`, CHANGE `product_template` `product_template` varchar(64) COLLATE 'utf8_general_ci' NULL AFTER `products_tax_class_id`, CHANGE `options_template` `options_template` varchar(64) COLLATE 'utf8_general_ci' NULL AFTER `product_template`, CHANGE `manufacturers_id` `manufacturers_id` int(11) NULL AFTER `options_template`, CHANGE `label_id` `label_id` int(11) NULL AFTER `manufacturers_id`, CHANGE `products_ordered` `products_ordered` int(11) NOT NULL DEFAULT '0' AFTER `label_id`, CHANGE `products_fsk18` `products_fsk18` int(11) NOT NULL DEFAULT '0' AFTER `products_ordered`, CHANGE `products_vpe` `products_vpe` int(11) NOT NULL AFTER `products_fsk18`, CHANGE `products_vpe_status` `products_vpe_status` int(11) NOT NULL DEFAULT '0' AFTER `products_vpe`, CHANGE `products_vpe_value` `products_vpe_value` decimal(15,4) NOT NULL AFTER `products_vpe_status`, CHANGE `products_startpage` `products_startpage` int(1) NOT NULL DEFAULT '0' AFTER `products_vpe_value`, CHANGE `products_startpage_sort` `products_startpage_sort` int(4) NOT NULL DEFAULT '0' AFTER `products_startpage`, CHANGE `products_to_xml` `products_to_xml` tinyint(1) NOT NULL DEFAULT '1' AFTER `products_startpage_sort`, CHANGE `yml_bid` `yml_bid` varchar(4) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0' AFTER `products_to_xml`, CHANGE `yml_cbid` `yml_cbid` varchar(4) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0' AFTER `yml_bid`, CHANGE `products_length` `products_length` double NULL AFTER `products_page_url`, CHANGE `products_width` `products_width` double NULL AFTER `products_length`, CHANGE `products_height` `products_height` double NULL AFTER `products_width`, CHANGE `products_volume` `products_volume` double NULL AFTER `products_height`, DROP `products_quantity_order_min`, DROP `products_quantity_order_units`, DROP `products_sort_order`, DROP `products_usage_term`; INSERT INTO `address_book` (`address_book_id`, `customers_id`, `entry_gender`, `entry_company`, `entry_firstname`, `entry_secondname`, `entry_lastname`, `entry_street_address`, `entry_suburb`, `entry_postcode`, `entry_city`, `entry_state`, `entry_country_id`, `entry_zone_id`, `address_date_added`, `address_last_modified`) VALUES (1, 1, '', 'OscAdmin', 'admin', '', 'admin', 'Street Address', NULL, '123456', 'Москва', 'Москва', 176, 98, '2019-04-24 12:34:47', '2019-04-24 12:34:47'), (2, 1, '', 'VamShop', 'admin', '', 'admin', 'Street Address', NULL, '123456', 'Москва', 'Москва', 176, 98, '2014-01-20 10:14:50', '2014-01-20 10:14:50'); ALTER TABLE `products_options` DROP `products_options_images_enabled`; ALTER TABLE `products_options` DROP `products_options_comment`; ALTER TABLE `products_attributes` DROP `products_attributes_units_price`, DROP `product_attributes_one_time`; Link to post Share on other sites
support 447 Posted November 13, 2019 Report Share Posted November 13, 2019 1 час назад, Роман_DD сказал: Включая клиентские учетки, историю заказов, у товаров характеристики и фильтры! В принципе, перенести не проблема с помощью скрипта. Да, его придётся чуть допилить для соответствия именно текущей версии. Но паоли будут не подходить в клиентов, хотя это тоже можно исправить, вот так - А база данных большая, товаров много?! Link to post Share on other sites
support 447 Posted November 19, 2019 Report Share Posted November 19, 2019 В 13.11.2019 в 19:46, Роман_DD сказал: Включая клиентские учетки, историю заказов, у товаров характеристики и фильтры! Там муторно немного получается, я пробовал через обновление базы данных alter table. И даже запрос написал, но дело было весной и уже не помню под какую версию vamshop делал.. Хотел сделать под старую, где меньше изменений по сравнению с osc vam, а потом апдейтами sql уже догнать до текущей, но бросил и сейчас уже просто нет времени ковыряться. Апдейтилка старая, выложенная в форуме работает не совсем корректно. Такой вот код был... SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; CREATE TABLE `copy_address_book` LIKE `address_book`; INSERT INTO `copy_address_book` SELECT * FROM `address_book`; CREATE TABLE `copy_address_format` LIKE `address_format`; INSERT INTO `copy_address_format` SELECT * FROM `address_format`; CREATE TABLE `copy_articles` LIKE `articles`; INSERT INTO `copy_articles` SELECT * FROM `articles`; CREATE TABLE `copy_articles_description` LIKE `articles_description`; INSERT INTO `copy_articles_description` SELECT * FROM `articles_description`; CREATE TABLE `copy_articles_to_topics` LIKE `articles_to_topics`; INSERT INTO `copy_articles_to_topics` SELECT * FROM `articles_to_topics`; CREATE TABLE `copy_categories` LIKE `categories`; INSERT INTO `copy_categories` SELECT * FROM `categories`; CREATE TABLE `copy_categories_description` LIKE `categories_description`; INSERT INTO `copy_categories_description` SELECT * FROM `categories_description`; CREATE TABLE `copy_currencies` LIKE `currencies`; INSERT INTO `copy_currencies` SELECT * FROM `currencies`; CREATE TABLE `copy_customers` LIKE `customers`; INSERT INTO `copy_customers` SELECT * FROM `customers`; CREATE TABLE `copy_customers_basket` LIKE `customers_basket`; INSERT INTO `copy_customers_basket` SELECT * FROM `customers_basket`; CREATE TABLE `copy_customers_basket_attributes` LIKE `customers_basket_attributes`; INSERT INTO `copy_customers_basket_attributes` SELECT * FROM `customers_basket_attributes`; CREATE TABLE `copy_customers_groups` LIKE `customers_groups`; INSERT INTO `copy_customers_groups` SELECT * FROM `customers_groups`; CREATE TABLE `copy_customers_info` LIKE `customers_info`; INSERT INTO `copy_customers_info` SELECT * FROM `customers_info`; CREATE TABLE `copy_customers_to_extra_fields` LIKE `customers_to_extra_fields`; INSERT INTO `copy_customers_to_extra_fields` SELECT * FROM `customers_to_extra_fields`; CREATE TABLE `copy_manufacturers` LIKE `manufacturers`; INSERT INTO `copy_manufacturers` SELECT * FROM `manufacturers`; CREATE TABLE `copy_manufacturers_info` LIKE `manufacturers_info`; INSERT INTO `copy_manufacturers_info` SELECT * FROM `manufacturers_info`; CREATE TABLE `copy_orders` LIKE `orders`; INSERT INTO `copy_orders` SELECT * FROM `orders`; CREATE TABLE `copy_orders_products` LIKE `orders_products`; INSERT INTO `copy_orders_products` SELECT * FROM `orders_products`; CREATE TABLE `copy_orders_products_attributes` LIKE `orders_products_attributes`; INSERT INTO `copy_orders_products_attributes` SELECT * FROM `orders_products_attributes`; CREATE TABLE `copy_orders_products_download` LIKE `orders_products_download`; INSERT INTO `copy_orders_products_download` SELECT * FROM `orders_products_download`; CREATE TABLE `copy_orders_status` LIKE `orders_status`; INSERT INTO `copy_orders_status` SELECT * FROM `orders_status`; CREATE TABLE `copy_orders_status_history` LIKE `orders_status_history`; INSERT INTO `copy_orders_status_history` SELECT * FROM `orders_status_history`; CREATE TABLE `copy_orders_total` LIKE `orders_total`; INSERT INTO `copy_orders_total` SELECT * FROM `orders_total`; CREATE TABLE `copy_products` LIKE `products`; INSERT INTO `copy_products` SELECT * FROM `products`; CREATE TABLE `copy_products_attributes` LIKE `products_attributes`; INSERT INTO `copy_products_attributes` SELECT * FROM `products_attributes`; CREATE TABLE `copy_products_description` LIKE `products_description`; INSERT INTO `copy_products_description` SELECT * FROM `products_description`; CREATE TABLE `copy_products_extra_fields` LIKE `products_extra_fields`; INSERT INTO `copy_products_extra_fields` SELECT * FROM `products_extra_fields`; CREATE TABLE `copy_products_images` LIKE `products_images`; INSERT INTO `copy_products_images` SELECT * FROM `products_images`; CREATE TABLE `copy_products_options` LIKE `products_options`; INSERT INTO `copy_products_options` SELECT * FROM `products_options`; CREATE TABLE `copy_products_options_values` LIKE `products_options_values`; INSERT INTO `copy_products_options_values` SELECT * FROM `products_options_values`; CREATE TABLE `copy_products_options_values_to_products_options` LIKE `products_options_values_to_products_options`; INSERT INTO `copy_products_options_values_to_products_options` SELECT * FROM `products_options_values_to_products_options`; CREATE TABLE `copy_products_specifications` LIKE `products_specifications`; INSERT INTO `copy_products_specifications` SELECT * FROM `products_specifications`; CREATE TABLE `copy_products_to_categories` LIKE `products_to_categories`; INSERT INTO `copy_products_to_categories` SELECT * FROM `products_to_categories`; CREATE TABLE `copy_reviews` LIKE `reviews`; INSERT INTO `copy_reviews` SELECT * FROM `reviews`; CREATE TABLE `copy_reviews_description` LIKE `reviews_description`; INSERT INTO `copy_reviews_description` SELECT * FROM `reviews_description`; CREATE TABLE `copy_specials` LIKE `specials`; INSERT INTO `copy_specials` SELECT * FROM `specials`; ALTER TABLE `address_book` ADD `address_date_added` datetime NULL, ADD `address_last_modified` datetime NULL AFTER `address_date_added`; ADD `entry_secondname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL AFTER `entry_firstname`; ALTER TABLE `customers` ADD `customers_cid` varchar(255) NOT NULL AFTER `customers_id`, ADD `customers_vat_id` varchar(20) NOT NULL AFTER `customers_cid`, ADD `customers_vat_id_status` int(2) NOT NULL AFTER `customers_vat_id`, ADD `customers_warning` varchar(255) NOT NULL AFTER `customers_vat_id_status`, ADD `customers_secondname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_firstname`, ADD `customers_newsletter_mode` char(1) COLLATE 'utf8_general_ci' NULL AFTER `customers_newsletter`, CHANGE `guest_flag` `member_flag` char(1) COLLATE 'utf8_general_ci' NULL DEFAULT '0' AFTER `customers_selected_template`, ADD `delete_user` char(1) COLLATE 'utf8_general_ci' NULL AFTER `member_flag`, ADD `account_type` int(1) NULL AFTER `delete_user`, ADD `password_request_key` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `account_type`, CHANGE `customers_payment_allowed` `payment_unallowed` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `password_request_key`, CHANGE `customers_shipment_allowed` `shipping_unallowed` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `payment_unallowed`, CHANGE `customers_status` `customers_status` int(5) NOT NULL DEFAULT '1' AFTER `customers_warning`, ADD `refferers_id` int(5) NOT NULL AFTER `customers_status`, ADD `customers_date_added` datetime NULL AFTER `refferers_id`, ADD `customers_last_modified` datetime NULL AFTER `customers_date_added`, ADD `orig_reference` text NULL AFTER `customers_last_modified`, ADD `login_reference` text NULL AFTER `orig_reference`, ADD `login_tries` char(2) NULL AFTER `login_reference`, ADD `login_time` datetime NULL AFTER `login_tries`, ADD `customers_username` varchar(64) NULL AFTER `login_time`, ADD `customers_fid` int(5) NULL AFTER `customers_username`, ADD `customers_sid` int(5) NULL AFTER `customers_fid`, CHANGE `customers_groups_id` `customers_groups_id` int(11) NOT NULL DEFAULT '1' AFTER `customers_sid`, CHANGE `customers_discount` `customers_personal_discount` decimal(4,2) NOT NULL DEFAULT '0.00' AFTER `customers_groups_id`; ALTER TABLE `orders` ADD `customers_cid` varchar(255) NOT NULL AFTER `customers_id`, ADD `customers_vat_id` varchar(20) NOT NULL AFTER `customers_cid`, ADD `customers_status` int(11) NOT NULL AFTER `customers_groups_id`, ADD `customers_status_name` varchar(255) NOT NULL AFTER `customers_status`, ADD `customers_status_image` varchar(255) NOT NULL AFTER `customers_status_name`, ADD `customers_status_discount` decimal(4,2) NOT NULL AFTER `customers_status_image`, ADD `customers_firstname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_name`, ADD `customers_secondname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_firstname`, ADD `customers_lastname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_secondname`, ADD `delivery_firstname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `delivery_name`, ADD `delivery_secondname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `delivery_firstname`, ADD `delivery_lastname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `delivery_secondname`, ADD `delivery_country_iso_code_2` char(2) COLLATE 'utf8_general_ci' NOT NULL AFTER `delivery_country`, ADD `billing_firstname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `billing_name`, ADD `billing_secondname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `billing_firstname`, ADD `billing_lastname` varchar(64) COLLATE 'utf8_general_ci' NOT NULL AFTER `billing_secondname`, ADD `billing_country_iso_code_2` char(2) COLLATE 'utf8_general_ci' NOT NULL AFTER `billing_country`, ADD `cc_start` varchar(4) COLLATE 'utf8_general_ci' NULL AFTER `cc_expires`, ADD `cc_issue` varchar(4) COLLATE 'utf8_general_ci' NULL AFTER `cc_start`, ADD `cc_cvv` varchar(4) COLLATE 'utf8_general_ci' NULL AFTER `cc_issue`, ADD `comments` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `cc_cvv`, ADD `account_type` int(1) NULL AFTER `currency_value`, ADD `payment_class` decimal(14,6) NULL AFTER `account_type`, ADD `shipping_method` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `customers_referer_url`, ADD `shipping_class` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `shipping_method`, ADD `customers_ip` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `shipping_class`, ADD `language` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `customers_ip`, ADD `afterbuy_success` int(1) NULL AFTER `language`, ADD `afterbuy_id` int(32) NULL AFTER `afterbuy_success`, ADD `refferers_id` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `afterbuy_id`, ADD `conversion_type` int(1) NULL AFTER `refferers_id`, ADD `orders_ident_key` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `conversion_type`, ADD `orig_reference` text COLLATE 'utf8_general_ci' NULL AFTER `orders_ident_key`, ADD `login_reference` text COLLATE 'utf8_general_ci' NULL AFTER `orig_reference`; ALTER TABLE `orders_products` ADD `products_discount_made` decimal(4,2) NOT NULL AFTER `products_price`, ADD `products_shipping_time` varchar(255) NOT NULL AFTER `products_discount_made`, ADD `allow_tax` int(1) NOT NULL; ALTER TABLE `orders_status` ADD `answer_templates_id` int(11) NULL AFTER `orders_status_id`, ADD `restock` varchar(32) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0' AFTER `answer_templates_id`, CHANGE `downloads_flag` `downloads_flag` int(11) NULL DEFAULT '0' AFTER `orders_status_name`, CHANGE `public_flag` `public_flag` int(11) NULL DEFAULT '1' AFTER `downloads_flag`; ALTER TABLE `products` ADD `products_ean` varchar(255) NOT NULL AFTER `products_id`, ADD `products_quantity_min` int(4) NOT NULL DEFAULT '1' AFTER `products_quantity`, ADD `products_quantity_max` int(4) NOT NULL DEFAULT '1000' AFTER `products_quantity_min`, ADD `products_shippingtime` int(4) NOT NULL AFTER `products_quantity_max`, ADD `group_permission_0` tinyint(1) NULL AFTER `products_model`, ADD `group_permission_1` tinyint(1) NULL AFTER `group_permission_0`, ADD `group_permission_2` tinyint(1) NULL AFTER `group_permission_1`, ADD `group_permission_3` tinyint(1) NULL AFTER `group_permission_2`, ADD `products_sort` tinyint(1) NULL AFTER `group_permission_3`, CHANGE `products_image` `products_image` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_sort`, ADD `products_image_description` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_image`, ADD `products_discount_allowed` decimal(15,4) NOT NULL DEFAULT '0.0000' AFTER `products_price`, ADD `product_template` varchar(64) NOT NULL AFTER `products_tax_class_id`, ADD `options_template` varchar(64) NOT NULL AFTER `product_template`, ADD `label_id` int(11) NULL AFTER `manufacturers_id`, ADD `products_fsk18` int(11) NOT NULL AFTER `products_ordered`, ADD `products_vpe` int(11) NOT NULL AFTER `products_fsk18`, ADD `products_vpe_status` int(11) NOT NULL AFTER `products_vpe`, ADD `products_vpe_value` decimal(15,4) NOT NULL AFTER `products_vpe_status`, ADD `products_startpage` int(1) NOT NULL AFTER `products_vpe_value`, ADD `products_startpage_sort` int(4) NOT NULL AFTER `products_startpage`, ADD `yml_bid` varchar(4) NOT NULL AFTER `products_startpage_sort`, ADD `yml_cbid` varchar(4) NOT NULL AFTER `yml_bid`, ADD `products_page_url` varchar(255) NOT NULL AFTER `yml_cbid`, ADD `products_length` int(11) NULL AFTER `products_page_url`, ADD `products_width` int(11) NULL AFTER `products_length`, ADD `products_height` int(11) NULL AFTER `products_width`, ADD `products_volume` int(11) NULL AFTER `products_height`, ADD `products_bundle` varchar(255) NOT NULL AFTER `products_volume`; ALTER TABLE `products_attributes` ADD `attributes_model` varchar(1) COLLATE 'utf8_general_ci' NOT NULL AFTER `price_prefix`, CHANGE `products_attributes_units` `attributes_stock` int(4) NOT NULL DEFAULT '0' AFTER `attributes_model`, CHANGE `products_attributes_weight` `options_values_weight` decimal(5,2) NOT NULL DEFAULT '0.00' AFTER `attributes_stock`, CHANGE `products_attributes_weight_prefix` `weight_prefix` char(1) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `options_values_weight`, CHANGE `products_options_sort_order` `sortorder` int(6) NOT NULL DEFAULT '0' AFTER `weight_prefix`, CHANGE `products_attributes_units_price` `products_attributes_units_price` decimal(15,4) NOT NULL DEFAULT '0.0000' AFTER `sortorder`, CHANGE `product_attributes_one_time` `product_attributes_one_time` tinyint(1) NOT NULL DEFAULT '0' AFTER `products_attributes_units_price`; ALTER TABLE `products_description` ADD `products_short_description` text COLLATE 'utf8_general_ci' NULL AFTER `products_description`, CHANGE `products_head_title_tag` `products_meta_title` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_tab_1`, CHANGE `products_head_desc_tag` `products_meta_description` longtext COLLATE 'utf8_general_ci' NOT NULL AFTER `products_meta_title`, CHANGE `products_head_keywords_tag` `products_meta_keywords` longtext COLLATE 'utf8_general_ci' NOT NULL AFTER `products_meta_description`, CHANGE `products_url` `products_url` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_meta_keywords`, CHANGE `products_viewed` `products_viewed` int(5) NULL DEFAULT '0' AFTER `products_url`; ALTER TABLE `products_description` CHANGE `products_name` `products_name` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `language_id`, ADD `products_keywords` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_short_description`, DROP `products_tab_6`, DROP `products_tab_5`, DROP `products_tab_4`, DROP `products_tab_3`, DROP `products_tab_2`, DROP `products_tab_1`, CHANGE `products_meta_title` `products_meta_title` text COLLATE 'utf8_general_ci' NULL AFTER `products_keywords`, CHANGE `products_meta_description` `products_meta_description` text COLLATE 'utf8_general_ci' NOT NULL AFTER `products_meta_title`, CHANGE `products_meta_keywords` `products_meta_keywords` text COLLATE 'utf8_general_ci' NOT NULL AFTER `products_meta_description`, DROP `products_info`; ALTER TABLE `manufacturers_info` DROP `manufacturers_description`; # Скопировать таблицу products_images из vamshop базы ALTER TABLE `categories` CHANGE `categories_status` `categories_status` tinyint(1) unsigned NOT NULL DEFAULT '1' AFTER `parent_id`, ADD `categories_template` tinyint(1) unsigned NOT NULL AFTER `categories_status`, ADD `group_permission_0` tinyint(1) unsigned NOT NULL AFTER `categories_template`, ADD `group_permission_1` tinyint(1) unsigned NOT NULL AFTER `group_permission_0`, ADD `group_permission_2` tinyint(1) unsigned NOT NULL AFTER `group_permission_1`, ADD `group_permission_3` tinyint(1) unsigned NOT NULL AFTER `group_permission_2`, ADD `listing_template` tinyint(1) unsigned NOT NULL AFTER `group_permission_3`, CHANGE `sort_order` `sort_order` int(3) NULL AFTER `listing_template`, ADD `products_sorting` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `sort_order`, ADD `products_sorting2` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `products_sorting`, CHANGE `date_added` `date_added` datetime NULL AFTER `products_sorting2`, CHANGE `last_modified` `last_modified` datetime NULL AFTER `date_added`, ADD `yml_bid` varchar(4) NULL, ADD `yml_cbid` varchar(4) NULL AFTER `yml_bid`, ADD `categories_url` varchar(255) NULL AFTER `yml_cbid`, ADD `yml_enable` tinyint(1) NULL DEFAULT '1' AFTER `categories_url`; ALTER TABLE `products_options` CHANGE `products_options_length` `products_options_length` smallint(11) NOT NULL DEFAULT '32' AFTER `products_options_name`, ADD `products_options_size` smallint(11) NOT NULL AFTER `products_options_length`, ADD `products_options_rows` smallint(11) NOT NULL AFTER `products_options_size`, CHANGE `products_options_type` `products_options_type` int(11) NOT NULL DEFAULT '0' AFTER `products_options_rows`, CHANGE `products_options_comment` `products_options_comment` varchar(32) COLLATE 'utf8_general_ci' NULL AFTER `products_options_type`, CHANGE `products_options_sort_order` `sortorder` int(4) NOT NULL DEFAULT '0' AFTER `products_options_comment`; ALTER TABLE `products_options` CHANGE `products_options_name` `products_options_name` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `language_id`, CHANGE `products_options_size` `products_options_size` smallint(11) NOT NULL DEFAULT '32' AFTER `products_options_length`, CHANGE `products_options_rows` `products_options_rows` smallint(11) NOT NULL DEFAULT '4' AFTER `products_options_size`; ALTER TABLE `products_options_values` CHANGE `products_options_values_name` `products_options_values_name` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `language_id`, ADD `products_options_values_description` tinytext COLLATE 'utf8_general_ci' NOT NULL AFTER `products_options_values_name`, ADD `products_options_values_text` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `products_options_values_description`, CHANGE `products_options_values_thumbnail` `products_options_values_image` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `products_options_values_text`, ADD `products_options_values_link` varchar(255) COLLATE 'utf8_general_ci' NOT NULL; ALTER TABLE `reviews` ADD `customers_avatar` varchar(64) NULL AFTER `customers_id`; ALTER TABLE `customers` CHANGE `customers_cid` `customers_cid` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `customers_id`, CHANGE `customers_vat_id` `customers_vat_id` varchar(20) COLLATE 'utf8_general_ci' NULL AFTER `customers_cid`, CHANGE `customers_vat_id_status` `customers_vat_id_status` int(2) NOT NULL DEFAULT '0' AFTER `customers_vat_id`, CHANGE `customers_warning` `customers_warning` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `customers_vat_id_status`, CHANGE `customers_status` `customers_status` int(5) NOT NULL DEFAULT '1' AFTER `customers_warning`, CHANGE `customers_gender` `customers_gender` char(1) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_status`, CHANGE `customers_firstname` `customers_firstname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_gender`, CHANGE `customers_secondname` `customers_secondname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL AFTER `customers_firstname`, CHANGE `customers_lastname` `customers_lastname` varchar(32) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_secondname`, CHANGE `customers_dob` `customers_dob` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `customers_lastname`, CHANGE `customers_email_address` `customers_email_address` varchar(96) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_dob`, CHANGE `customers_default_address_id` `customers_default_address_id` int(11) NULL AFTER `customers_email_address`, CHANGE `customers_telephone` `customers_telephone` varchar(32) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_default_address_id`, CHANGE `customers_fax` `customers_fax` varchar(32) COLLATE 'utf8_general_ci' NULL AFTER `customers_telephone`, CHANGE `customers_password` `customers_password` varchar(40) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_fax`, CHANGE `customers_newsletter` `customers_newsletter` char(1) COLLATE 'utf8_general_ci' NULL AFTER `customers_password`, CHANGE `customers_newsletter_mode` `customers_newsletter_mode` char(1) COLLATE 'utf8_general_ci' NULL AFTER `customers_newsletter`, CHANGE `customers_selected_template` `customers_selected_template` varchar(20) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `customers_newsletter_mode`, CHANGE `member_flag` `member_flag` char(1) COLLATE 'utf8_general_ci' NULL DEFAULT '0' AFTER `customers_selected_template`, CHANGE `delete_user` `delete_user` char(1) COLLATE 'utf8_general_ci' NULL AFTER `member_flag`, CHANGE `account_type` `account_type` int(1) NULL AFTER `delete_user`, CHANGE `password_request_key` `password_request_key` varchar(255) COLLATE 'utf8_general_ci' NULL AFTER `account_type`, CHANGE `payment_unallowed` `payment_unallowed` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `password_request_key`, CHANGE `shipping_unallowed` `shipping_unallowed` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `payment_unallowed`; ALTER TABLE `products` CHANGE `products_bundle` `products_bundle` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'no' AFTER `products_volume`, ADD `sold_in_bundle_only` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'no' AFTER `products_bundle`; ALTER TABLE `products_xsell` ADD `products_xsell_grp_name_id i` int(10) unsigned NOT NULL DEFAULT '1' AFTER `products_id`; ALTER TABLE `products` CHANGE `products_quantity` `products_quantity` int(4) NOT NULL DEFAULT '10' AFTER `products_ean`, CHANGE `group_permission_0` `group_permission_0` tinyint(1) NOT NULL AFTER `products_model`, CHANGE `group_permission_1` `group_permission_1` tinyint(1) NOT NULL AFTER `group_permission_0`, CHANGE `group_permission_2` `group_permission_2` tinyint(1) NOT NULL AFTER `group_permission_1`, CHANGE `group_permission_3` `group_permission_3` tinyint(1) NOT NULL AFTER `group_permission_2`, CHANGE `products_sort` `products_sort` tinyint(1) NULL DEFAULT '0' AFTER `group_permission_3`, DROP `products_image_med`, DROP `products_image_lrg`, DROP `products_image_sm_1`, DROP `products_image_xl_1`, DROP `products_image_sm_2`, DROP `products_image_xl_2`, DROP `products_image_sm_3`, DROP `products_image_xl_3`, DROP `products_image_sm_4`, DROP `products_image_xl_4`, DROP `products_image_sm_5`, DROP `products_image_xl_5`, DROP `products_image_sm_6`, DROP `products_image_xl_6`, CHANGE `products_price` `products_price` decimal(15,4) NOT NULL AFTER `products_image_description`, CHANGE `products_date_added` `products_date_added` datetime NOT NULL AFTER `products_discount_allowed`, CHANGE `products_weight` `products_weight` decimal(5,2) NOT NULL AFTER `products_date_available`, CHANGE `products_status` `products_status` tinyint(1) NOT NULL AFTER `products_weight`, CHANGE `products_tax_class_id` `products_tax_class_id` int(11) NOT NULL AFTER `products_status`, CHANGE `product_template` `product_template` varchar(64) COLLATE 'utf8_general_ci' NULL AFTER `products_tax_class_id`, CHANGE `options_template` `options_template` varchar(64) COLLATE 'utf8_general_ci' NULL AFTER `product_template`, CHANGE `manufacturers_id` `manufacturers_id` int(11) NULL AFTER `options_template`, CHANGE `label_id` `label_id` int(11) NULL AFTER `manufacturers_id`, CHANGE `products_ordered` `products_ordered` int(11) NOT NULL DEFAULT '0' AFTER `label_id`, CHANGE `products_fsk18` `products_fsk18` int(11) NOT NULL DEFAULT '0' AFTER `products_ordered`, CHANGE `products_vpe` `products_vpe` int(11) NOT NULL AFTER `products_fsk18`, CHANGE `products_vpe_status` `products_vpe_status` int(11) NOT NULL DEFAULT '0' AFTER `products_vpe`, CHANGE `products_vpe_value` `products_vpe_value` decimal(15,4) NOT NULL AFTER `products_vpe_status`, CHANGE `products_startpage` `products_startpage` int(1) NOT NULL DEFAULT '0' AFTER `products_vpe_value`, CHANGE `products_startpage_sort` `products_startpage_sort` int(4) NOT NULL DEFAULT '0' AFTER `products_startpage`, CHANGE `products_to_xml` `products_to_xml` tinyint(1) NOT NULL DEFAULT '1' AFTER `products_startpage_sort`, CHANGE `yml_bid` `yml_bid` varchar(4) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0' AFTER `products_to_xml`, CHANGE `yml_cbid` `yml_cbid` varchar(4) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0' AFTER `yml_bid`, CHANGE `products_length` `products_length` double NULL AFTER `products_page_url`, CHANGE `products_width` `products_width` double NULL AFTER `products_length`, CHANGE `products_height` `products_height` double NULL AFTER `products_width`, CHANGE `products_volume` `products_volume` double NULL AFTER `products_height`, DROP `products_quantity_order_min`, DROP `products_quantity_order_units`, DROP `products_sort_order`, DROP `products_usage_term`; INSERT INTO `address_book` (`address_book_id`, `customers_id`, `entry_gender`, `entry_company`, `entry_firstname`, `entry_secondname`, `entry_lastname`, `entry_street_address`, `entry_suburb`, `entry_postcode`, `entry_city`, `entry_state`, `entry_country_id`, `entry_zone_id`, `address_date_added`, `address_last_modified`) VALUES (1, 1, '', 'OscAdmin', 'admin', '', 'admin', 'Street Address', NULL, '123456', 'Москва', 'Москва', 176, 98, '2019-04-24 12:34:47', '2019-04-24 12:34:47'), (2, 1, '', 'VamShop', 'admin', '', 'admin', 'Street Address', NULL, '123456', 'Москва', 'Москва', 176, 98, '2014-01-20 10:14:50', '2014-01-20 10:14:50'); ALTER TABLE `products_options` DROP `products_options_images_enabled`; ALTER TABLE `products_options` DROP `products_options_comment`; ALTER TABLE `products_attributes` DROP `products_attributes_units_price`, DROP `product_attributes_one_time`; Спасибо большое за код, добавил его к статье про перенос данных. Очень полезная вещь. Даже не представляю сколько у Вас времени ушло что б эти запросы написать, очень много времени. Link to post Share on other sites
Роман_DD 2 Posted November 26, 2019 Author Report Share Posted November 26, 2019 В 19.11.2019 в 10:20, support сказал: Спасибо большое за код, добавил его к статье про перенос данных. Очень полезная вещь. Даже не представляю сколько у Вас времени ушло что б эти запросы написать, очень много времени. Несколько часов в режиме 2 окон с базой, но дело в том, что я не помню к какой он версии вамшопа ) Link to post Share on other sites
support 447 Posted November 26, 2019 Report Share Posted November 26, 2019 1 минуту назад, Роман_DD сказал: Несколько часов в режиме 2 окон с базой, но дело в том, что я не помню к какой он версии вамшопа ) Да если честно - не важно, к какой версии, база данных принципиально одна и та же в любой версии. Главное, что 95% сделано, а там в любом случае при переносе надо разбираться с базой, по ходу дела всё и допишется. Link to post Share on other sites
IVAN.Z 2 Posted December 13, 2019 Report Share Posted December 13, 2019 Круто осталось это все в exe упаковать для управления SHOPOS через приложение с кнопочками ( копировать базу, добавить товар, статью, новость и тд ) Link to post Share on other sites
Recommended Posts