Addon: best practices with DB

Hi there,

I’m working on an addon which will require to store a few things in the database. I’m still deeply studying the packaged addons’ architecture, but am quite still struggling on the best way to implement a custom addon.

I’ll need to create new tables, but I’m still wondering whether it’s fine to create them manually (in phpMyAdmin for instance), or if there is a special mechanism which generates the required tables in a safe and clean way.

I had a look on the exim schemas, but I didn’t get everything yet because it seems those are just made for exporting needs.

Any help would be warmly welcome!