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
|
|
|
|
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?
|
|
|
|
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
|
|
|
|
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
|
|
|
|
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.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close