logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
sweeperqb  
#1 Posted : Monday, June 28, 2021 9:43:07 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
I made a copy of our production AC7 database, performed the upgrade, and am currently working on getting AC9 set up with our desired layout and configuration changes. Some of the stuff we are doing is being kept in a custom theme which is easy to replicate and port because they are physical files on the disk. However, it seems like many of the changes are being stored at the database level.

My question is, how are we supposed to customize our design in advance of rollout if so many of the layout components are being written to the database? Seems like everything will be overwritten/wiped out when we download and restore the production database again to prior to making AC9 live?

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

ray22901031  
#2 Posted : Monday, June 28, 2021 11:11:32 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
The only thing that should be at the database level would be templates, inner templates, other templates, etc.. These should only be layout elements, everything else should be controlled by views and css files, which should not be anywhere in the database.

Kind of defeats the purpose of MVC if it did, wouldn't it?

The only value that the database should store would be the theme that it points to.

Important note: prior to the current version 9.0.4, themes were not properly applied because ablecommerce was looking at the default directory instead sometimes. This has bitten me in the butt multiple times.

Hope this helps.
-Ray

Edited by user Monday, June 28, 2021 11:12:19 AM(UTC)  | Reason: Not specified

sweeperqb  
#3 Posted : Monday, June 28, 2021 11:26:29 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Thanks for the response. The customer wants to use a left navigation, so I created a new "Split Top Section with Left Navbar" page layout for the categories. In that layout I created all of the necessary zones. Then I had to go to the page templates and set them up to use the layout. All of those changes will be blown away when I re-import the production database, correct? There are also several widgets where we changed the parameters that control how the widgets are displayed on the website.

Is there a way to reliably back up all of the changes and new layouts, templates, and widgets, then restore them after a production database has been imported?

ray22901031  
#4 Posted : Monday, June 28, 2021 11:57:22 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
When you say "page templates", are you talking about custom views outside the database?
sweeperqb  
#5 Posted : Monday, June 28, 2021 12:04:19 PM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Talking about the templates configured within the Admin
ray22901031  
#6 Posted : Monday, June 28, 2021 12:05:30 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
I would check with support to see if you can import and override just the layout tables, page Template tables, etc.. after the production database has been imported. I have done this in the past using an SQL compare tool, but the problem might be if there are Foreign Keys on any of these tables.

But also in my case, it was a version 9 to 9 database.

Hope this helps.
shaharyar  
#7 Posted : Tuesday, June 29, 2021 1:29:22 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
You need to use data compare tool like Redgate SQL Compare tool.

1- You took a copy of live AC7 database. lets say it dev
2- You worked on dev and made changes in layouts, templates, zones etc
3- When ready to go for production, take a fresh copy of live database
4- Compare the live and dev databases with in SQL compare tool and merge the CMS changes into the live database

Hope this helps!
thanks 1 user thanked shaharyar for this useful post.
sweeperqb on 6/29/2021(UTC)
ray22901031  
#8 Posted : Tuesday, June 29, 2021 1:52:38 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Just for the record, Redgate SQL Compare is extremely overpriced. I would recommend looking into SQL Data Examiner or dbForge Data Compare.

I personally use dbForge Data Compare, but I'm quite impressed with SQL Data Examiner which is even less money.

Please note that I would not use any of these tools on two different versions of ablecommerce databases because of different schemas.

Just my thoughts,
-Ray
thanks 1 user thanked ray22901031 for this useful post.
sweeperqb on 6/29/2021(UTC)
judy at Web2Market  
#9 Posted : Tuesday, June 29, 2021 6:12:55 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
We upgraded a large site and it was a nightmare trying to do this. We didn't know until right before the upgrade that they hadn't been maintaining their products on both sites and we already had scripts to import new users and orders which we planned on using. Another developer tried syncing the data into the CMS tables using sql scripts, but ran into a lot of issues and confusion. There are numerous tables involved and you have to do things in a certain order because of foreign keys. So we ended up telling them to put a freeze on product changes the day before the upgrade and upgraded a copy of the Gold site database that day then spent that day recreating the CMS entries manually in the admin.
We are seriously considering not using the CMS much and trying to do more in the files, but haven't experimented much with that to know what we can get away with. The people who hire us to do a site aren't interested in doing any design work themselves so CMS features that a small merchant might use just don't apply except for some html snippets in places.
judy at Web2Market  
#10 Posted : Tuesday, June 29, 2021 6:17:31 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Here is another SQL data compare tool that is reasonably priced. I have used one of their other products.
https://www.sqlmanager.n...s/mssql/datacomparer/buy
sweeperqb  
#11 Posted : Friday, July 2, 2021 2:25:46 PM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Thank you both for your feedback, tool recommendations, and sharing info about your experiences. I has taken me a little bit to understand how the layout stuff works, but now starting to make more sense. It is certainly flexible, but it was quite interesting trying to figure out why my layouts broke when updating the design for one of the templates. Seems like any time you change the layout it makes you rebuild the design elements (drop in the widgets, HTML snippets, etc).

It seems powerful and I like the compartmentalized nature of things. Does make finding things interesting at times.

I'm going to sign up for a trial of Redgate and see how it works. Really wish they didn't split up SQL Compare and SQL Data Compare; looks like both could be useful.

Joe Payne2  
#12 Posted : Tuesday, July 6, 2021 7:46:31 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Originally Posted by: sweeperq1766875 Go to Quoted Post
Really wish they didn't split up SQL Compare and SQL Data Compare; looks like both could be useful.


Which is exactly why they split it. And both will be required for you to accomplish what you want.

I've tried what you're about to try. I've had zero repeatable success. By the time I cleaned up foreign keys, identity value overlaps, statistics indexes and the like, I might as well have just made all the changes by hand. It would have been quicker.

Even when successful, I was left with a database that had questionable integrity. I can't be truly certain that everything connects to what Able and nHibernate expects. My greatest fear is finding out two months later that my data relationship integrity is lost. Then you are talking massive time and effort to clean up/resolve at that point. I decided it's simply not worth that risk.

It's a damn shame the original designers of this new CMS never took the time to accommodate for site design projects that require a separate dev site. Because of how much effort it takes to implement a new design, combined with the effort to manage the cut-over in an efficient way, I stand very little chance of selling this software to companies in the future.



thanks 1 user thanked Joe Payne2 for this useful post.
judy at Web2Market on 7/7/2021(UTC)
ray22901031  
#13 Posted : Tuesday, July 6, 2021 11:06:04 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
My recommendations if you're even going to attempt this, is to keep track of the foreign keys. Using a test database to another test database, do your compare and transfer and see what happens with the foreign keys. If the foreign keys are properly established, then you should be okay.

The main problem arises when foreign keys are dropped in order to transfer data, and then they are difficulties in reestablishing them again.

The layout zone table is the one is going to be problematic, is nothing but a bunch of numbers linking to other tables and there are 2 foreign keys attached. Maybe in the future an export and import procedure can be developed by Ablecommerce for this purpose,but I don't see too many people running into this problem.

If I was in your shoes, I agree with Joe, you don't want future problems to be based on a database that has integrity issues. Tell your customer that the site is going to be down while you make your layout changes. That would be playing it safe.

I also use another tool called Navicat, and I have used this tool in the past to just copy tables over. Obviously these tables don't have foreign keys attached. I had an issue late last year with the order status table, so it was very easy for me to go into an old database, copy just the order status table and pasted into the new database.

The reason they are 2 tools, besides from a marketing point of view, one is for the data itself, the other is for the schema of the database layout.

Good luck with your issue and I hope it all works out.
nadeem  
#14 Posted : Tuesday, July 6, 2021 12:50:29 PM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 110

Thanks: 19 times
Was thanked: 18 time(s) in 18 post(s)
First of all, let me clarify that you don't need both SQL Compare & SQL Data Compare tools to upgrade a site to AC9. You only required SQL Data Compare tool to migrate your data from DEV to LIVE. If you use the following steps, you should be able to migrate your data without too much hassle.

1. Take the AC7 or AC Gold database backup and upgrade using AC9 release build (e.g. 9.0.4).
2. This is your DEV site setup in step 1. Continue working on the DEV site e.g making changes in Templates, Layouts, HTML Snippets etc.
3. When finished with the changes on DEV, take the fresh backup of the LIVE database and upgrade it again to AC9. This way the database schema will be all set on the database backup you will use later in production.
4. Now you have two databases DEV copy (upgraded in step 1) and LIVE copy (upgraded in step 3)
5. After this, use the SQL Data Compare tool to migrate the data (e.g. CMS data) from DEV to LIVE copy.

Now you will have to use the LIVE database copy to production that will have all your changes merged from the DEV site.

That is all you need to upgrade a site from AC7/Gold to new version. Where did you happen to use the SQL Compare tool in the process?

Edited by user Tuesday, July 6, 2021 12:58:14 PM(UTC)  | Reason: Not specified

Joe Payne2  
#15 Posted : Monday, July 19, 2021 6:04:00 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
Originally Posted by: nadeem Go to Quoted Post
That is all you need to upgrade a site from AC7/Gold to new version. Where did you happen to use the SQL Compare tool in the process?


The challenge is identifying what EXACTLY represents a CMS change inside the Able tables. There is zero documentation on the specifics tables and properties to consider when planning a cutover with a dev site involved. We're left to simply figure it out on our own and hope we didn't just blow up our best client's website. So to sum up the transition of a large upgrade project into 4 tiny bullet points is badly over-simplified.

You have new tables that require full data transfer from the dev tables. SQL Compare does handles this well.

But then there are individual CMS-related properties on a variety of existing table objects. I can't use SQL Compare the entire category object or product object because the upgrade took 5 months to do. In that time, the client has continued to maintain their catalog and products. You can't expect a company to just stop updating the catalog for the duration of the upgrade project.

So by that time, product descriptions, category names etc have changed. And now I have template assignments all over the place that need to sync or nothing will render properly.

Sure in a perfect world where every product uses the same single template, and every category uses the same single template, you can rely on the default-product and default-category display templates. But try that on a catalog with over 700 categories and 215,000 products and see how far it gets you.



sweeperqb  
#16 Posted : Friday, May 6, 2022 10:48:05 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Circling back around to this...

Ray, I was going to PM you, but thought your potential response might be helpful to others.

A while back you recommended checking out SQL Data Examiner. I downloaded the trial and it seems pretty powerful. It appears that their Data Compare pricing ($400 perpetual license + $160 for 1yr updates/support) has come into line with dbForge ($400 w/ 1yr support/upgrades) and RedGate ($269/yr subscription). Given that you've used all three and SQL Data Examiner is now more expensive than the others, do you have a preference based on features/performance/ease-of-use?
ray22901031  
#17 Posted : Friday, May 6, 2022 12:01:59 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
It's probably just a matter of preferences, I like dbForge because I have used some of their other products. However, anything that you use must be taken with a grain of salt here because there could be potential future problems.

I don't believe you will find any software that guarantees a total or partial synchronization without caution. Even dbForge will pop up a warning that certain foreign keys may not be re-created after synchronization. For this reason alone, I try not to rely with synchronization unless I have no choice.

Hell on earth is trying to track down foreign keys that somehow got dropped from a database. I have learned a lot in the 10 months that this post originally started. Unless there is a schema change because of a version upgrade, your development, and production databases should be kept up to date by restoring from production to development.

One of the main issues that I've had for a long time, was all the little settings that I had to reestablish in a development database after it's been restored from production. That being said, I have gotten to the point that after I restore a database to my development server, all I need to do is run a two SQL scripts, and everything is done for me.

- The first script, reestablish the user settings in the AbleCommerce database - this usually gets lost when you restore to a different machine.
- My second script, eliminates the Google authentication, so I can log in without a problem.

That said, I don't need to do anything else when it comes to the database.

Total time from restoring from production to development and running the scripts, less than 60 seconds.

I hope some of this helps.

-Ray

Edited by user Friday, May 6, 2022 12:09:43 PM(UTC)  | Reason: Not specified

thanks 1 user thanked ray22901031 for this useful post.
sweeperqb on 5/6/2022(UTC)
judy at Web2Market  
#18 Posted : Wednesday, May 11, 2022 8:39:23 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
SqlManager.net is having a 25% off sale for a while- coupon is on the site.
https://www.sqlmanager.net/products/mssql
I've got their Data comparer and DB Comparer (and Sql Query that a client purchased). They are very reasonably priced.
sweeperqb  
#19 Posted : Wednesday, May 11, 2022 10:28:12 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Lol, I literally just purchased a RedGate SQL Data Compare license right before I saw this.

We want to see if our planned process makes sense to folks:

1. Download a current backup of the LIVE database (7.0.7)
2. Restore the backup onto my DEVELOPMENT machine
3. Perform the AC 9.0.6 Install/Upgrade
4. Take a backup of the DEVELOPMENT database after upgrade
5. Perform all of the settings and template changes, update copy links and photo paths
6. Use SQL Compare tool to compare DEVELOPMENT database to DEVELOPMENT backup from Step 4 to obtain changes generated by Step 5
7. Manually review the change scripts to make sure there is nothing out of the ordinary (e.g. key issues)
8. Stop the LIVE website and take another backup

From here I'm not sure if I should pull the LIVE db back down and perform the upgrade on DEV, or push all of the code up and perform the upgrade on the LIVE server? The first method would require an additional step of backing up the DEV database and restoring it to the LIVE server again after all of the changes have been merged. However, I could at least look at it and confirm the changes.


nadeem  
#20 Posted : Thursday, May 12, 2022 6:28:17 AM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 110

Thanks: 19 times
Was thanked: 18 time(s) in 18 post(s)
Quote:
From here I'm not sure if I should pull the LIVE db back down and perform the upgrade on DEV, or push all of the code up and perform the upgrade on the LIVE server?


Once you got the LIVE database backup after stopping the website, restore this backup and perform the 9.0.6 upgrade again. This way, your DEV database, and the LIVE database will have the same schema unless you have added some new tables, columns, etc. to the DEV database. After this, you only have to compare and sync data (mostly CMS related stuff) from your DEV to the LIVE database which is just upgraded. Confirm the LIVE database by changing the connection string and pointing the DEV to this LIVE database. If everything is OK, restore the final database to production.

Hope this helps.

Thank you!
Users browsing this topic
Guest (9)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.