xf_ table prefix

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
Is the xf_ table prefix reserved for xenforo?

I'm working on my db generator and i've found the isApplicationTable method in the install model
PHP:
    public function isApplicationTable($table)
    {
        return (substr($table, 0, 3) == 'xf_');
    }

That's only used for the table deletion while the installation, right?
So if i have a add-on, which added a table xf_foobar, the table will be deleted too, if it's not having the xf_ prefix it won't be deleted.

Isn't it better to use then xf_ also for add-ons to be sure that the tables will be deleted too?
What's the official response here?:)
 
I think all ragtek addons should just create rag_ or alike prefixes ^_^ easier to remain unique.
 
I'm ussing ragtek_ prefix, BUT the tables won't be deleted on an xf install
that's why i asked this:D

So i think that i'll switch to xf_ragtek_xxxx
 
If they wanted to delete all tables on the installation, they'd just drop all of the tables from the database. Instead, it seems they've created a function to only drop the xf-related tables, so they mustn't want add-ons to be deleted during (re-)installation.
 
xf_ is just a prefix to allow it to distinguish from other applications that might be installed in the database. I would recommend that add-ons use the xf_ prefix in addition to their own. It does make the table name a bit longer but it groups with all of the XF tables then (while still grouping the add-on tables) and, as mentioned, allows deletion on a reinstall.
 
xf_ is just a prefix to allow it to distinguish from other applications that might be installed in the database. I would recommend that add-ons use the xf_ prefix in addition to their own. It does make the table name a bit longer but it groups with all of the XF tables then (while still grouping the add-on tables) and, as mentioned, allows deletion on a reinstall.
ok

thx for confirming:)
 
Top Bottom