rattail-manual/docs/data/db/extend.rst

21 lines
966 B
ReStructuredText

Extending the Schema
====================
While the core Rattail schema provides "most" tables you may need, it is quite
common for an app to need yet more tables to satisfy its features.
Extending the schema really just means, you can add extra tables as needed, and
modify the schema for each of those going forward. The core tables provided by
Rattail schema should never be directly modified, but your extra tables are
fair game.
It is important that you name all extra tables with a prefix unique to your
app, e.g. ``poser_product`` for a product extension table, or ``poser_widget``
for a totally custom table. Avoid prefix-less names like ``widget`` because
Rattail reserves the prefix-less namespace for its core schema. Also, certain
integration packages reserve other namespaces (e.g. ``corepos_`` prefix is used
by the rattail-corepos package for extension tables it provides).
TODO: obviously need to say how one can go about extending schema...