Override db.xml in Packages
Permalink
Hi,
There is a way to override db.xml in packages ?
Why ?
Because if i made some customizations for a packages (ex. add fields in database), when I will update packages in future with new version, my modifications will be overriden...
Thanks
There is a way to override db.xml in packages ?
Why ?
Because if i made some customizations for a packages (ex. add fields in database), when I will update packages in future with new version, my modifications will be overriden...
Thanks
Little Up! :-)
Unfortunately you can not override the db.xml. My suggestion is that you download the zipped packages when they are updated and make your changes before uploading to your site.
At least that is what I do with my updated packages (where more columns has been added to the db).
At least that is what I do with my updated packages (where more columns has been added to the db).
Nope, I can confirm that there is not.
I would also like a possibility for this because I have one project where I disagree with one of the database structure choices made by c5 core team. Once I update the eCommerce package on that site, every time I need to make sure I apply the db.xml changes before upgrading. Also, it makes automatic updates a disaster for that site.
However, I would see this quite problematic to add. Imagine that some package update requires some database-level upgrades and if you would have the db.xml overridden on your site, the new changes required with the update of the package would not apply to your site.
So, overall adding the override functionality would be quite easy but it would probably give you 10 more things to take care of. Therefore, currently (unfortunately) the best way to handle these issues is just updating the db.xml before running the upgrade functionality of that package.
Antti / Mainio
I would also like a possibility for this because I have one project where I disagree with one of the database structure choices made by c5 core team. Once I update the eCommerce package on that site, every time I need to make sure I apply the db.xml changes before upgrading. Also, it makes automatic updates a disaster for that site.
However, I would see this quite problematic to add. Imagine that some package update requires some database-level upgrades and if you would have the db.xml overridden on your site, the new changes required with the update of the package would not apply to your site.
So, overall adding the override functionality would be quite easy but it would probably give you 10 more things to take care of. Therefore, currently (unfortunately) the best way to handle these issues is just updating the db.xml before running the upgrade functionality of that package.
Antti / Mainio
Just an idea off to the sky: ruby on rails handles this pretty well :)