Post by fred123 » Sat Jan 07, 2012 8:49 pm

trying to add this and now its saying

#1166 - Incorrect column name 'attribute_group_id '


as I click save?

Active Member

Posts

Joined
Fri Aug 26, 2011 3:13 pm

Post by IBBoard » Sat Jan 07, 2012 9:37 pm

Is that a direct copy and paste of an error message? Because if it is then there's a space in the name (inside the quotes) that would break it.

If the SQL isn't working then the other way is the "Add column" form, which you can get to from the bottom of the Structure view in phpMyAdmin. Go to the Structure view of the attribute table and click the "Go" button (the one for adding a column, not for adding an index). Next, add the values in (column name: attribute_group_id, type: int, leave the rest as they are) and hit "Save".

New member

Posts

Joined
Sun Sep 12, 2010 3:30 am

Post by fred123 » Sat Jan 07, 2012 9:45 pm

haha! thanks, it was the space in the end :) all works now, thanks so much :)

Active Member

Posts

Joined
Fri Aug 26, 2011 3:13 pm

Post by Qphoria » Sun Jan 08, 2012 2:18 am

IBBoard wrote:Qphoria: Sorry to disagree, but it looks to me like there is something to track. Your comment in the SQL (I'm assuming you wrote all of the SQL) even says as much:

Code: Select all

# move order 'coupon_id' column to coupon_history table. Amount of coupon not transferred as there is no history of that.
INSERT INTO `oc_coupon_history` (coupon_id, order_id, customer_id, date_added) SELECT coupon_id, order_id, customer_id, date_added FROM `oc_order`;
If I look at my 1.4.x database then the order table does have a column called "coupon_id", and a very small number have an ID in there that matches a coupon in the coupon table.
Perhaps... It's been a while since I looked at it. This script is a means to an end.. not something to spend too much time on

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by IBBoard » Sun Jan 08, 2012 3:25 am

The end that I'd like (and most other people, I'd guess) is to have all of their data converted and not lost. It didn't take long to diagnose that one problem that I highlighted - I just looked at the line that was erroring, echoed the query it was running at that point and spotted the bad keyword/unsafe assumption. Where there were warnings/errors, there was a bug.

I've got a few more minor changes. That INSERT statement that I quoted was inserting too much, so I've now put a WHERE on it. Also, one of your sanity checks dropped one of my columns instead of altering it (the "quantity" column on options changed integer size between the versions, but your code assumed it needs to drop it if the target name exists - that worked for everything else but not for my new instructions). I'll post the changes once I've done a final import check. Again, you're free to include them if you want, or other people are free to use my changes if you want to stick with your version.

TBH, I'm rather disappointed with the 1.5 upgrade so far. There's no official upgrade path as part of the release, just a link to this thread, and your response seems indicative of the wider attitude. For a FOSS app that targets commercial installs, saying "we're not going to give you an official upgrade path as part of the installer" and "here's an upgrade script, but if you've got options then you've had it - we'll drop them all for you" is really not going to be good for the businesses that use it. If it wasn't for the fact that we'd previously moved from ZenCart to OpenCart (because it was more active) and so had a reasonable amount of time and effort invested in inserting the data and building the templates then we'd be considering other options right now.

New member

Posts

Joined
Sun Sep 12, 2010 3:30 am

Post by Qphoria » Sun Jan 08, 2012 3:49 am

You forget yourself, sir :P
I think what you meant to say was "Thanks Q for taking the time to make it work, minor bumps notwithstanding"
1.5. was a big change.. there was no intent on an official 14x to 15x upgrade script as it is future-less work.. It's a one time thing that we needed to stumble across. Not something anyone wants to over do.

The existing script with its minor issues has been working just fine for the past year with no issues (pending people follow the documentation).

We are grateful for your options addon, but I would recommend not spending too much time on something that is mostly trivial at this point. Going through and adding "@" suppressors to the code is hardly a fix worth doing or mentioning. As of 1.5.1.1 we've added an upgrade as part of the core so we are evolving past this second-hand script for future upgrades. But I bring you back to Rome.. and how long it took to build... 8)

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by IBBoard » Sun Jan 08, 2012 4:40 am

I appreciate the work and the fact that OpenCart is free. What I don't appreciate is the lack of planning and consideration that seems to have been shown.

1.4 to 1.5 should be a small-ish update - you're only updating the minor version number after all. If it isn't small then why the small version number change? When you're doing small version upgrades then users expect compatibility and a migration path. phpBB managed to have a migration script ready to go across a major update (v2 to v3) before the final release. OpenCart is now at 1.5.1.3 and hasn't.

The existing script was supposedly bug free. It had only been "working" until now because people hadn't been paying attention to whether they were losing data or not. When it comes to a store and the data in its databases, I treat it seriously and don't want to lose any of my data. Businesses need records.

The "@" suppressors were your code - I removed them to make sure that my changes weren't hiding. I've only ever encountered more bugs when suppressing errors because the errors mean something.

For anyone taking the plunge now and moving from 1.4 to 1.5 then whether they get all of their data or not is not trivial. If you've got 100+ items with options (like a jewellery store with ring sizes) then I'd rather have the copy I did than lose it. If my customers have been using coupons and I had records of that then I would rather have the script convert the data to its new location.

I've just run a final import on my test site and it seems to work. I'll post the update later.

New member

Posts

Joined
Sun Sep 12, 2010 3:30 am

Post by Qphoria » Sun Jan 08, 2012 4:55 am

IBBoard wrote:I appreciate the work and the fact that OpenCart is free. What I don't appreciate is the lack of planning and consideration that seems to have been shown.

1.4 to 1.5 should be a small-ish update - you're only updating the minor version number after all. If it isn't small then why the small version number change? When you're doing small version upgrades then users expect compatibility and a migration path. phpBB managed to have a migration script ready to go across a major update (v2 to v3) before the final release. OpenCart is now at 1.5.1.3 and hasn't.

The existing script was supposedly bug free. It had only been "working" until now because people hadn't been paying attention to whether they were losing data or not. When it comes to a store and the data in its databases, I treat it seriously and don't want to lose any of my data. Businesses need records.

The "@" suppressors were your code - I removed them to make sure that my changes weren't hiding. I've only ever encountered more bugs when suppressing errors because the errors mean something.

For anyone taking the plunge now and moving from 1.4 to 1.5 then whether they get all of their data or not is not trivial. If you've got 100+ items with options (like a jewellery store with ring sizes) then I'd rather have the copy I did than lose it. If my customers have been using coupons and I had records of that then I would rather have the script convert the data to its new location.

I've just run a final import on my test site and it seems to work. I'll post the update later.
Well now you are just preachin to the choir. Nobody is more outspoken than I when it comes to the versioning decisions (not mine btw). With all the major changes we've had we should be on v6.0.1 by now. The versioning choices very poorly planned but we just accept each point release as a full new cart.

If this were a commercial product then upgrades and the other little bits would absolutely be first priority. But this is a free cart built on free time (yea i know you've heard it all before). But Daniel's the man in charge and his focus is only forward momentum.

We often joke that 1.5.1.4 will be a switch from php to asp and considered "minor". OpenCart is a great bus..but we can't all pick our bus drivers or route makers. Sometimes we get on and hope to make it to our destination alive. I am usually the one that keeps the cart grounded by trying to ease the drastic changes, where I can, but that isn't my main prerogative or focus in life. My hands are also tied on a lot of things.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Johnathan » Mon Jan 09, 2012 12:27 am

I don't think Qphoria is at fault for the lack of planning and consideration, as Daniel does most of the project planning by myself. We all should (and do) thank Qphoria for actually providing any upgrade script, as I don't think there would be one without him.

I do agree that a consistently working upgrade script is important, and have always been surprised that Daniel doesn't seem to care about it. (Especially since there's now a financial incentive for him if people use the latest version, because of the extension store.) It's

IBBoard, you're welcome to try and convince him of how it would be a good idea, but I can warn you that it's almost impossible to make him care about something he doesn't already. ;D

(Nice work on the upgrade script improvements, by the way.)

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Qphoria » Tue Jan 10, 2012 2:46 am

NEW BETA3 VERSION HERE:
http://forum.opencart.com/viewtopic.php?f=2&t=50292
WITH PRODUCT OPTION SUPPORT

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 9 guests