Is it possible to keep custom changes to the database between updates?

Started by Rikard, December 22, 2017, 08:24:42 AM

Previous topic - Next topic

Rikard

I have changed the category description table to accept LONGTEXT instead of varchar() because I have some really long category pages that gets cut in half otherwise. This works very well but when I update virtuemart this setting reverts back to varchar() effectively truncating my data.

So my question is, is there a setting I can use somewhere that tells virtuemart to leave my longtext in place?

Milbo

http://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html

You can try with dblayoutstrict=0, which sets all to text. Actually, maybe we set it to text already. Longtext is the bible, I doubt we need that. In anycase, try first on a clone.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Rikard

Thank you.

I set up a clone and changed the setting:
#dblayoutstrict
to
dblayoutstrict=0
in the file: /administrator/components/com_virtuemart/virtuemart.cfg

When I ran the update the log reported that X tables were modified where X is the number of languages I am running. I checked in myphpadmin and the Category_description for each of my languages was changed back to varchar(19000). Just as it were when I didn't have the setting set to =0.

Is there anything else beside changing the .cfg file I should've done that I migh've missed out on? I'm currently on VM 3.2.10

Best regards

jankoo

why they will be solving this when thats something they dont want?
im telling this them for YEARS.. i need long descriptions in product description, custom fields, category description.. but they are not making the fields bigger over time as we need, but smaller actually..

forget they care about what users needs..

Studio 42

@jankoo
dblayoutstrict=0
in the file: /administrator/components/com_virtuemart/virtuemart.cfg
Should not revert to varchar long desc(or any desc fields), but you have to go to the Virtuemart > configuration and save it.
Else the value is not updated.

Rikard

Quote from: Studio 42 on January 15, 2018, 23:46:50 PM
@jankoo
dblayoutstrict=0
in the file: /administrator/components/com_virtuemart/virtuemart.cfg
Should not revert to varchar long desc(or any desc fields), but you have to go to the Virtuemart > configuration and save it.
Else the value is not updated.

THANK YOU Studio 42!!!
I did exactly this and then it did not revert to varchar() it did however still change my values from "full text" to "text". This is ok however, since text is sufficient. BUT, I see that it also added two new rows to each xxxx_virtuemart_categories_xx_xx table. Namely these:

vendor_term_of_service
vendor_legal_info

I don't know if this is something that is added by the update from 3.2.10 to 3,2.12 or if it is the result of me changing to dblayoutstrict=0. Also, I don't know if this is an issue or not. If someone know if this is something I need to be concerned about, please feel free to enlighten me.

jankoo

@Rikard i did that..
i change the dblayoutstrict=0 and save the config.
but it dont work for me because i need this behavior for xx_virtuemart_product_customfields -> 'customfield_value' table.

and update changed this table from text to varchar(2500).. 2500? rly guys? :D what i can put there?

Rikard

@jankoo
I can confirm that my 'customfield_value' is set to varchar(2500) as well, this is however not a problem for me since the customfield only hold a reference and the actual data used by the reference is set in the "customfield_params" which is set to text.

My 'customfield_value' is set to "allfields" and then the "customfield_params" holds all the different fields I use in the allfields plugin. Looking something like this:

system_name=""|release_date=""|genre=""

But that is of course 100% custom values for my site.

*Please note that my use of the terms "reference", "value" and "data" might be  incorrect since I'm not that familiar with sql.

Milbo

Quote from: jankoo on January 16, 2018, 11:06:02 AM
and update changed this table from text to varchar(2500).. 2500? rly guys? :D what i can put there?

It is even too big. When you need a big text, just use textarea instead. Which stores the text in the param stuff, which uses "text" as datatype
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/