I think Bob suggests using a different DB prefix to avoid loosing it on an upgrade.
I did it that way and everything went OK on the 2.0.4 upgrade...
Those are my 2 cents so far... I have not had any side effects yet.
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner
As long as you’re not naming the tables things like ’modx_templatevars’ or ’modx_access_actions’ or ’modx_dashboard_items’ and such, you’ll be fine and MODx wont mess with your tables.
I almost always prefix them so it comes out like this: ’modx_quip_comments’, ’modx_gallery_items’, ’modx_discuss_posts’, etc. That prevents collisions, since the MODx core is never going to make a table with ’quip’ or ’discuss’ in the table name.
The problem with specifying a table prefix in addPackage and in your schema is that it prevents you from having 2 MODx installs in 1 database with that custom table prefix (unless they’re sharing data).
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
The main reason I suggested a different table prefix for them is that it makes it easy to generate the schema from the tables (without generating the entire MODx schema). I assumed that some people were more familiar with creating tables in PhpMyAdmin than they were with XML schemas and would prefer to do it that way for simple stand-alone tables.
If you’re creating the schema manually, using the same table prefix should be fine as long as the full table names are unique.
-
MODX Staff
- 10,725 Posts
The key point is consistency. If someone is running two MODx installs with different table_prefixes on the same database, wouldn’t it make sense to make sure all the 3rd party components are using the table_prefix of the MODx installation they are installed in? Otherwise, you could have conflicts between third party add-ons.