Well, what I do, is I normally count up from 0 till the max inventory size defined, minus one (because you start at zero). Then, the equips are stored as -1.
With increasing the size of the inventory, you need to make sure there is enough space in the column sizes for the longest possible string length based on types given to build string (personal preference over what the "max value" can be for your variable in regards to what you programmed it for Ie: + gear stored as int, but never above 20), which prevents things from not successfully saving and saving for the DB.
Most of the string lengths are fine until you start adding more and more and adding more features dealing with the inventory strings; however, you can still trim the inventory array initialization if you would want to calculate the max string length.
There are some other issues you have to solve if you go higher than X. Like, increasing your max query sizes for both reading and initialization in query.cpp, or separating it in multiple columns, or just rewriting how the Inventory is. If you increase your inventory sizes as well as some other sizes, you could run into an issue where there is too much, it will cause a stack overflow (If I remember the name correctly, could be wrong, correct me pls).
If you go too high, you will also need to code something dealing with the inventory lengths, and other "type" of inventories, and you will need to edit the inventory serialize function.