Author Topic: Is it possible to keep custom changes to the database between updates?  (Read 1222 times)

Rikard

  • Beginner
  • *
  • Posts: 11
  • A beginner
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9667
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Is it possible to keep custom changes to the database between updates?
« Reply #1 on: December 29, 2017, 12:07:33 pm »
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Rikard

  • Beginner
  • *
  • Posts: 11
  • A beginner
Re: Is it possible to keep custom changes to the database between updates?
« Reply #2 on: January 10, 2018, 09:50:56 am »
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

  • Jr. Member
  • **
  • Posts: 55
Re: Is it possible to keep custom changes to the database between updates?
« Reply #3 on: January 15, 2018, 17:05:22 pm »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3389
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Is it possible to keep custom changes to the database between updates?
« Reply #4 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.

Rikard

  • Beginner
  • *
  • Posts: 11
  • A beginner
Re: Is it possible to keep custom changes to the database between updates?
« Reply #5 on: January 16, 2018, 09:11:50 am »
@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

  • Jr. Member
  • **
  • Posts: 55
Re: Is it possible to keep custom changes to the database between updates?
« Reply #6 on: January 16, 2018, 11:06:02 am »
@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

  • Beginner
  • *
  • Posts: 11
  • A beginner
Re: Is it possible to keep custom changes to the database between updates?
« Reply #7 on: January 17, 2018, 13:16:17 pm »
@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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9667
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Is it possible to keep custom changes to the database between updates?
« Reply #8 on: January 25, 2018, 20:37:28 pm »
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
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/