Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-15 08:54:22

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

#2 2007-12-15 09:10:58

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

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

#4 2007-12-16 10:49:07

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#6 2007-12-16 12:41:17

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#7 2007-12-16 13:31:45

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

Board footer

Powered by FluxBB