Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Dublicating mysql tables prefix if set it to "txp"
On some installs i enter txp_
or txp
as prefix for future tables – don’t remember exactly. And sometimes it makes tables’ name like this: txp_txp_textpattern
. It seems that there is conditional check if $prefix!='txp' prefix=='txp'
or something like this :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: Dublicating mysql tables prefix if set it to "txp"
All of the tables, except for textpattern
, are prefixed with “txp” even if you don’t specify a prefix at install. On an un-prefixed install, you’ll have these tables:
+-------------------+
| Tables_in_txp_dev |
+-------------------+
| textpattern |
| txp_category |
| txp_css |
| txp_discuss |
| txp_discuss_ipban |
| txp_discuss_nonce |
| txp_file |
| txp_form |
| txp_image |
| txp_lang |
| txp_link |
| txp_log |
| txp_page |
| txp_plugin |
| txp_prefs |
| txp_section |
| txp_users |
+-------------------+
Likewise, if you use foo
as a prefix, you’ll get foo_txp_image
.
Last edited by jm (2007-12-15 09:11:45)
Offline
#3 2007-12-16 10:22:16
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Dublicating mysql tables prefix if set it to "txp"
Don’t ask me why that is, it’s very old. Something to be changed in crockery.
Offline
Re: Dublicating mysql tables prefix if set it to "txp"
Chances of having another tool creating a table called ‘textpattern’ are not very big, but tables called ‘prefs’, ‘lang’, ‘users’ etc… those names are more generic. Having them prefixed with txp_ by default is probably a good thing.
Offline
#5 2007-12-16 11:00:14
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Dublicating mysql tables prefix if set it to "txp"
But then you would use a prefix, would you not?
Offline
Re: Dublicating mysql tables prefix if set it to "txp"
Then I’d be forced to use a prefix. Now I only use a prefix when installing multiple copies of TXP.
Hmm… perhaps we should set the prefix to txp_
by default (allowing people to change/delete it during install) so you get tables like txp_textpattern, txp_category, etc.
Offline
Re: Dublicating mysql tables prefix if set it to "txp"
Personally I think that would just be creating work for yourselves for no good reason when you could be doing something more useful. I’ve used TXP since the “Gamma” days and as far as I can recall the naming of tables has never been changed. Odd tables may have been added such as “files” but that’s about it. I can’t see a problem with how they are now.
And there may be problems caused by such a change with importing a TXP database into another database if different prefixes have been used. We’ll end up having to have a more complex TXP to TXP import script unless I’m mistaken whereas at the moment I can just do an SQL dump and import it direct without the need for any script.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline