Claudia M Posted August 12, 2018 Share Posted August 12, 2018 Hi, I've added some columns to my inventory database and have a total of 73. Many of them are CubeCart core and not used. Ex. the dimensions and all that go with it, and the upn,ean,jan etc.... I've commented out the code for them in the admin/skins/product file. On the columns I've added I've used. Is this ok? Thanks in advance for any and all responses Type: varchar (30) SEE EACH collaltion: ut8_unicode_ci Null: no Default: none Attributes: Blank Link to comment Share on other sites More sharing options...
bsmither Posted August 12, 2018 Share Posted August 12, 2018 Depending how many items are in CubeCart_inventory, a KEY (INDEX) for each new column may prove useful, especially if you want to find a given value, or to sort on it. You might also find MySQL complain of a non-null column not having a default value to use. This will then require you to make very sure a data value is supplied for this column when INSERTing a new record. The database engine can be configured to ignore this condition, but you may not have the ability to make that configuration. I do not know what is meant by Attributes. Link to comment Share on other sites More sharing options...
Claudia M Posted August 12, 2018 Author Share Posted August 12, 2018 Attributes is the column next to collation in Cpanel with a drop down of binary,unsigned,unsigned-zerofill,and on update CURRENT_Timestamp. When you click change on a column " You might also find MySQL complain of a non-null column not having a default value to use. This will then require you to make very sure a data value is supplied for this column when INSERTing a new record. " - Not ALL products will have data in every column. For ex. if an item doesn't come in a box, box_size will not have data. So should I mark null yes or no? " You might also find MySQL complain of a non-null column not having a default value to use. This will then require you to make very sure a data value is supplied for this column when INSERTing a new record. " Here's some of mine " Depending how many items are in CubeCart_inventory, a KEY (INDEX) for each new column may prove useful, especially if you want to find a given value, or to sort on it." This is what I have: Link to comment Share on other sites More sharing options...
bsmither Posted August 13, 2018 Share Posted August 13, 2018 If some of the columns will be empty, then allow those columns to hold a null value. The NULL column in the table above should say Yes. The new columns suggest they will be informational only, that is, info to be used to guide outside processes, as opposed to searching or sorting on them. In that case, you may not need to have indexes on them. Link to comment Share on other sites More sharing options...
Claudia M Posted August 13, 2018 Author Share Posted August 13, 2018 Thanks Brian, I'll get on that ASAP When you say some of the columns will be empty do you mean the columns I will never use that are stock with CubeCart or the example from above about if the item doesn't come in a box it won't use the box_size column? Link to comment Share on other sites More sharing options...
bsmither Posted August 13, 2018 Share Posted August 13, 2018 The example above - the columns that you have added. Link to comment Share on other sites More sharing options...
Claudia M Posted August 13, 2018 Author Share Posted August 13, 2018 Ok Thanks again Brian! The category_prefix column will be sortable in admin/products. Does it need to have an index? If so, what info should I give it? Nevermind ... I looked it up. Thank you again Brian for all your knowledge and help Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.