Jump to content

Is it safe to add fields to core tables?


Recommended Posts

Hello everyone!

 

I'm creating my own store (not module to distribute, just for my own use), and I'm trying to keep hands off the core to be able to upgrade in future, so I use modules or override for extra-functionality.

 

But I need some more data in standart PS tables (product, addres, and so on).

So my question:

is it safe to add new fields to standart tables?

I keep in mind that PrestaShop could add new fields into tables too, so I give very specific names to avoid the treat of naming collision. But I wonder if upgrade installer could re-create some tables and loose my fields (maybe with converting standart data to the new format, but loosing my extra-data).

 

Yes, I can create a module, my own table with extra-data and use insert/update/delete hooks to keep my data consistent, or to do the same in override of each model classes, but I'm looking for more lightweight way to add data (but to keep the core clean and upgradable).

 

Thanks in advance for your oppinion.

Edited by Alexander.X (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...