Database upgrade from nopcommerce 1.9 to nopcommerce 3.30 without data loss.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 10 años
Hi All,
I want toupgrade database from nopcommerce 1.9 (Webforms) to nopcommerce 3.30 (MVC) without data loss. There is a huge data in my database. How I upgrade database and my data should remain alive? I can change all code related thing but I want to protect my data. Please give me some tips related this problem. Thanks in advance.

Atiq
Hace 10 años
1) Most important thing - Take back up of your database before trying anything

2) The best approach to upgrade it so upgrade from 1.90 -> 2.0 then 2.0 --> 2.1 and so on.

3) I believe in 2.0 upgrade folder, there are intructions something like "Read Me" or similar that explains steps for upgrading because that is the crucial step as 2.0 is the first MVC version after webforms

4) Please read these instructions: HERE

5) As long as your upgrade process goes smoothly, your complete data in the database should be fine and you will have everything in current version too
Hace 10 años
I am trying to run the upgrade script for 1.9 to 2.0. I am getting errors on multiple tables. Some samples below. Anyone have ideas on what is going on here?

moving customers
moving customer. ID 37
Msg 8107, Level 16, State 1, Line 23
IDENTITY_INSERT is already ON for table 'boldmilitary.dbo.Picture'. Cannot perform SET operation for table 'Customer'.
moving customer addresses
moving addresses. ID 5

(1 row(s) affected)

(1 row(s) affected)
Msg 547, Level 16, State 0, Line 36
The INSERT statement conflicted with the FOREIGN KEY constraint "Customer_Addresses_Source". The conflict occurred in database "boldmilitary", table "dbo.Customer", column 'Id'.
The statement has been terminated.
moving addresses. ID 7

(1 row(s) affected)

(1 row(s) affected)... and more for all customers

moving products
moving product. ID 2
Msg 8107, Level 16, State 1, Line 24
IDENTITY_INSERT is already ON for table 'boldmilitary.dbo.Picture'. Cannot perform SET operation for table 'Product'.
moving localized products
moving related products
moving related product. ID 1
Msg 1101, Level 17, State 1, Line 25
Could not allocate a new page for database 'boldmilitary' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
moving crosssell products
moving specification attributes
moving specification attribute. ID 1
Msg 8107, Level 16, State 1, Line 24
IDENTITY_INSERT is already ON for table 'boldmilitary.dbo.Picture'. Cannot perform SET operation for table 'SpecificationAttribute'.
moving localized specification attributes
moving specification attribute options
moving specification attribute option. ID 1
Msg 8107, Level 16, State 1, Line 24
IDENTITY_INSERT is already ON for table 'boldmilitary.dbo.Picture'. Cannot perform SET operation for table 'SpecificationAttributeOption'.
moving localized specification attribute option
moving checkout attributes
moving localized checkout attributes
moving checkout attribute values
moving localized checkout attribute value
moving product variants
moving product variant. ID 53
Msg 8107, Level 16, State 1, Line 24
IDENTITY_INSERT is already ON for table 'boldmilitary.dbo.Picture'. Cannot perform SET operation for table 'ProductVariant'.
moving localized product variants
moving product attributes
moving product attribute. ID 1
Msg 8107, Level 16, State 1, Line 23
IDENTITY_INSERT is already ON for table 'boldmilitary.dbo.Picture'. Cannot perform SET operation for table 'ProductAttribute'.
Hace 10 años
These are the points that you need to keep in mind while upgrading from 1.9 to 2.0. Please make sure you have followed all the steps:

Steps:
1. Backup your existing database
2. Install nopCommerce 2.00 to your existing database (1.90).
    IMPORTANT NOTE: Install it without sample data!!!
3. Backup your existing database (again)
4. Execute upgrade.sql script over your database
5. Restart your application (for example, modify Web.config file)
6. If your pictures were stored on the file system, then manually copy them into \Content\Images (previously they were stored into \images directory)
7. Now manually complete the following steps:
    7a. Confifure Store settings (Admin area > Configuration > Settings)
    7b. Configure your currencies (Admin area > Configuration > Currencies). Ensure primary store currency and primary exchange currencies are the same
    7c. Configure your measure units (Admin area > Configuration > Measures)
    7d. Configure your email accounts (Admin area > Configuration > Email accounts)
    7e. Update your message templates (some tokens were changed)
    7f. Configure your payment, shipping, tax providers
    7g. Update topics (can't be automated)
    7h. Reconfigure prices by customer roles (Now we have new implementation of tier prices based on customer roles)
    7i. Reconfigure discount requirements for each discount (new implementation)
8. Ensure that everything is OK
Hace 10 años
Thanks, I have read these instructions and start executing script according to these instructions. But it generate a bundle of errors and delete all the nopcommerce tables dropped/deleted(only custom tables not deleted). Very confused how I upgrade database to latest version 3.30 :(
Hace 10 años
Hi,
I did this upgrade (1.90 to 3.20) last weekend and I took 3 hous only.. All routines worked fine... In my case, we had a lot of work after the database upgrade, because os our regional customizations.
Good luck.
Regards
Hace 10 años
Your 1.9 database is in original form ? Did you make any modifications or any kind of customization in your 1.9 version ?
Hace 10 años
Our database is not in original nopcommerce 1.9 form. We add some custom tables. Some modifications in nopcommerce 1.9 tables also, we add some extra fields in them. When I run script for 2.0 then a number of errors occurs and all nopcommerce 1.9 tables deleted but our custom tables not deleted.
Hace 10 años
One thing more, I only run script on my database (not installing the project 2.0) I think I run all update script from 2.0 to 3.30 and then I have code project of 3.30 and I will attach this database to that project with my data. Any suggestion???
Hace 10 años
Atiq,
Here we installed 2.0 before and run the installation point to the existing database without sample data. this routine create all of new tables in the 1.90 database. After that we run the upgrade script and the data migration (customers, orders, etc) worked fine. This migration (1.90 to 2.00) is the most importe part of all because there are a lot of changes.
Like you, we have some extentions here for Customer, Order , Category and Product tabes. In all of cases, we create a new table with the same name and "ext" suffix just for our records. The important part in our extention was we didn´t create any foreign key for NOP tables and we control the relationship using aux tables to preserve the integrity of Nop tables relationship.. I think the problem you  got in this migration is because the relationship with your extentions tables.
Good luck.
Nakamoto
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.