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
ray22901031  
#1 Posted : Friday, October 23, 2020 6:27:36 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)
Two different viewpoints from two different developers, so I'm curious where support stands on this. I understand it is better if you needed to do a custom application that needed to store data, it is recommended to create new tables, so in the event of an update, a modification to an existing table doesn't create a problem. I get it.

But if one needs to store just a small piece of information, and one is extremely careful to create custom fields, with a custom naming convention, onto an existing table, one should be okay with this. As an example, if I create a custom table I will prefix my custom table with "ct_", which stands for custom table , just like Ablecommerce prefixes their tables with "ac_".

This would prevent my custom table from interfering in the event of an update, I also have a naming convention for custom fields that I need to insert inside an Ablecommerce existing table, they start with "cf_" for custom fields.

This way in the event of a database schema update, it will be extremely difficult for Ablecommerce to have a problem with any of my custom fields, unless they reference certain table fields by their position in the table, which is not very smart thing to do.

I fall in the latter group, where I will manipulate an existing table with my own custom field to reduce the amount of coding involved. So I'm just curious what support or some of the heavy duty developers on this forum think about this.

Thank you

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

shari  
#2 Posted : Monday, October 26, 2020 2:36:27 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)
I don't think so there will be any conflict in this case when an upgrade is applied. In an update where database schema is updated, we usually add a new field or remove an existing field or change a data type or related configurations. Apparently, these changes will not affect or change any new table field.

Did you encounter any error in case of an update for a given scenario?
judy at Web2Market  
#3 Posted : Monday, October 26, 2020 6:26:34 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)
Not modifying an AC table was received wisdom from the beginning of time, so maybe it's not crucial anymore.I think we got into the habit of not modifying AC tables, maybe partly because we've only had one client who needed to purchase AC source code so we haven't modified AC data access code, just added our own data access code for additional tables.
http://forums.ablecommer...to+database+table#p63163
http://forums.ablecommer...to+database+table#p57556
ray22901031  
#4 Posted : Monday, October 26, 2020 7:30:13 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)
Hi Shari,

No I did not encounter any error, it was just a clarification. My personal conclusion is, if you need to store a little bit of data related to a particular table that already exist, then by all means, modify the existing table. But if you need to store a tremendous amount of data, than create a new table.

Sometimes people like to do things by the book, which sometimes will create excess coding.

Thanks
Users browsing this topic
Guest
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.