Database Migrations in Concrete5 Packages

Permalink
Does Concrete5 support any sort or database migrations and/or setup scripts for packages?

That is, I'm creating a Package per this article

http://www.concrete5.org/documentation/developers/system/packages/...

and my add-on is going to require some custom database tables. Is there a formal, Concrete5 "approved" way of configuring database tables and default record information? Something like config/db.xml, but specifically for my package.

If not, is there a de-facto community standard for adding model information to the database in custom packages?

It's been a while since I've hacked on Concrete5's internals, so apologies is this is obvious/well-known science.

Thanks!

astorm
 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
You can add a db.xml to the package's top directory (where the package controller lives) and put a db.xml spec for all your tables in there (except for block tables, which stay in each block's db.xml). It then gets installed, updated and deleted with the package. Though for a clean delete you may want to add an uninstall to your package controller.