Dave wrote:
On 12/6/06, Allen Gilliland <[EMAIL PROTECTED]> wrote:
This is still unresolved, so we need to make a decision about it.
I can't speak for all dbs, but MySQL 4.x and older only allow
varchar(255) so to be truly covered on those dbs would need to use a
TEXT column. It seems like many of the other dbs allow varchar columns
much longer, which would be more ideal.
So, the options are ...
1. use varchar(1024) for all dbs except mysql and use TEXT for mysql.
2. use varchar(1024) for all dbs except mysql and use varchar(255) for
mysql.
3. use varchar(1024) for all dbs and just note in the script that for
MySQL 4.x and older the user needs to set the value to 255 or use a TEXT
column.
4. use varchar(255) for all dbs and just hope that nobody has a path
depth of more than 255 characters. NOTE: if we do this we may also want
to change the category.name and folder.name columns down to 128 chars
instead of 255 like they are now.
and of course we don't need to use varchar(1024), i just made that up.
the current schema allows folder/category names of up to 255 characters,
so 1024 would technically be pretty safe for at least 4 levels.
However, of the 2500+ blogs on BSC there isn't a single one with a path
that goes over 255 characters, so maybe 255 or 512 is safe enough?
in any case, i would favor #3 or #4 to keep things consistent. I don't
like the idea of having the sql script path having lots of conditionals
all over the place for the various dbs.
I vote for option #4 because category path's over 255 are just silly,
but we still need some sort of check or nice error message at category
creation time for silly people who like deep hierarchies with
long-winded category names.
If I'm underestimating the number of silly people or the size of
multi-byte category names, then we can always change it later because
most databases allow ALTER TABLE to increase VARCHAR size.
I agree, #4 sounds like a good option to me and at the very least any
users who do happen to run into a problem with 255 characters being too
short will find out about it as part of the upgrade process and so they
could simply increase the column size themselves.
-- Allen
- Dave