0

Well I have a good theme for Prestashop 1.5 and a running store in Prestashop 1.6, so I want to migrate from 1.6 to 1.5 version.

Can I migrate without losing any data and how to do it? I googled it but nothing helped me.

Florian Lemaitre
  • 5,905
  • 2
  • 21
  • 44
Parth Gupta
  • 11
  • 1
  • 7

3 Answers3

0

As I know that between 1.5 and 1.6 PS version any database changes like from 1.4 to 1.5. So to my mind you can easily do it. Try to import your data tables to fresh 1.5

elPresta
  • 633
  • 10
  • 17
0

Hi there have been a few updates in database schema from 1.5 to 1.6. If you want to import your SQL data you shall check sql upgrade files in /install/upgrade/sql/ (checking all files from your 1.6 version to 1.5 version). You will be able to find differences or even create a new script witch does the opposite.

If you have any question feel free to ask.

Florian Lemaitre
  • 5,905
  • 2
  • 21
  • 44
0

Steps for this upgrading or DATA migration to Prestashop 1.7 would be: Make a fresh installation of Prestashop 1.7 Backup present PS 1.6 tables related to PRODUCTS, CUSTOMERS and ORDERS (i.e.: ps_product_17) Modify those tables so they have the same structure as PS 1.7 (detail modification below) Option 1:

4) Sql export data originally in 1.6 version, now modified for 1.7 with data 5) Insert former data into PS 1.7 tables Option 2 (only if working on the same database):

4) Rename original PS 1.7. tables (i.e.: ps_product_ORIGINAL) 5) Rename modified 1.6 tables to 1.7 original tables (i.e.: ps_product_17 to ps_product) 6) Check shop and data access

7) Copy product image folder “img/p” from PS 1.6 installation to PS 1.7 installation folder

SQL installation files of the versions taken as reference to compare the versions between the tables can be downloaded from goo.gl/WPM37D

NOTE: SQL instructions detailed below are only for first table “_product” and are merely guidelines, table name and/or prefix may vary depending on the case. Rest of sqls can be written by taking as reference the syntax to add and rename fields.

PRODUCTS

TABLE “_product” New field isbn (after ean13): ALTER TABLE _product ADD isbn varchar(13) DEFAULT NULL AFTER ean13

New field show_condition (after available_date): ALTER TABLE _product ADD show_condition tinyint(1) NOT NULL DEFAULT ‘0’ AFTER available_date

New field state (final de TABLE): ALTER TABLE _product ADD state int(11) unsigned NOT NULL DEFAULT ‘1’

Renamed field id_product_redirected (now id_type_redirected): ALTER TABLE _product CHANGE id_product_redirected id_type_redirectedint(10);

TABLE “_product_shop” New field (after available_date): show_condition tinyint(1) NOT NULL DEFAULT ‘0’, Renamed field: “id_product_redirected” now is id_type_redirected

TABLE “_product_attribute” New field (after ean13): isbn varchar(13) DEFAULT NULL, Changes in antepenultimate and last fields: default_on tinyint(1) unsigned NULL DEFAULT NULL, available_date date DEFAULT NULL,

TABLE “_product_attribute_shop” New field (before id_product_attribute): id_product int(10) unsigned NOT NULL, Changes in antepenultimate and last fields: default_on tinyint(1) unsigned NULL DEFAULT NULL, available_date date DEFAULT NULL, New keys: UNIQUE KEY id_product (id_product, id_shop, default_on)

TABLE “_product_download” UNIQUE KEY id_product (id_product)

TABLE “_product_tag” New field (at the end of TABLE): id_lang int(10) unsigned NOT NULL, New key: KEY id_lang (id_lang,id_tag)

TABLE “_specific_price” KEY id_product_attribute (id_product_attribute), KEY id_shop (id_shop), KEY id_customer(id_customer), KEY from (from), KEY to (to), UNIQUE KEY id_product_2 (id_product,id_product_attribute,id_customer,id_cart,from,to,id_shop,id_shop_group,id_currency,id_country,id_group,from_quantity,id_specific_price_rule)

TABLE “_image_shop” New field (at the beginning of TABLE): id_product int(10) unsigned NOT NULL, Keys: PRIMARY KEY (id_image, id_shop), UNIQUE KEY id_product (id_product, id_shop, cover), KEY id_shop (id_shop)

TABLE “_category” Keys: KEY category_parent (id_parent), KEY nleftrightactive (nleft, nright, active), KEY level_depth(level_depth), KEY nright (nright), KEY activenleft (active,nleft), KEY activenright(active,nright)

CUSTOMERS

TABLE “_customer” Length field change from 32 to 60: passwd varchar(60) NOT NULL, New fields (at the end of TABLE): reset_password_token varchar(40) DEFAULT NULL, reset_password_validity datetime DEFAULT NULL,

ORDERS

TABLE “_orders” New field (after round_mode): round_type tinyint(1) NOT NULL DEFAULT ‘1’,

TABLE “_order_invoice” New field (after total_wrapping_tax_inc): shop_address text DEFAULT NULL, Change decimal fields from (17,2) to (20,6)

TABLE “_order_detail” New field (after product_attribute_id): id_customization int(10) unsigned DEFAULT 0, New field (after ean13): product_isbn varchar(13) DEFAULT NULL, New field(at the end of table):original_wholesale_price DECIMAL(20, 6) NOT NULL DEFAULT ‘0.000000’,

Ankur Makadia
  • 17
  • 1
  • 5