[ic] userdb confusion
Gert van der Spoel
gert at 3edge.com
Fri Jul 27 02:18:24 EDT 2007
> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of DB
> Sent: vrijdag 27 juli 2007 2:49
> To: interchange-users at icdevgroup.org
> Subject: [ic] userdb confusion
>
> I'm running 5.3 using mysql and a modified foundation store. Below is
> my
> .../dbconf/mysql/userdb.mysql.
>
> I'm confused because the primary key column appears to be labeled
> 'username', however I see no such column defined below. I see no column
> labeled 'code' in my actual database, but one labeled 'username'
> exists.
>
> Everything seems to be working, but I don't like mysteries. Can anyone
> shed light on this for me?
>
> ========================
>
> Database userdb userdb.txt __SQLDSN__
>
> ifdef MYSQL_TRANSACTIONS
> Database userdb HAS_TRANSACTIONS 1
> Database userdb TABLE_TYPE InnoDB
> endif
> Database userdb COLUMN_DEF "code=char(20) NOT NULL PRIMARY KEY"
> Database userdb COLUMN_DEF "password=CHAR(20) NOT NULL"
<snip>
The above file is the old database definition from the foundation store:
http://www.icdevgroup.org/cgi-bin/cvsweb/~checkout~/interchange/dist/foundat
ion/dbconf/mysql/Attic/userdb.mysql?rev=2.6;content-type=text%2Fplain
The new database definition has the following for username:
Database userdb COLUMN_DEF "username=varchar(64) NOT NULL PRIMARY KEY"
Interchange however does the following:
- Looks at your .txt file in products (in this case userdb.txt)
- Finds column name 'username'
- References this with the <catroot>/dbconf/mysql/userdb.mysql
- Does not find a definition for 'username'
- Uses default Interchange settings, which are either:
* DatabaseDefault DEFAULT_TYPE xxxxxxx - for example
DatabaseDefault DEFAULT_TYPE varchar(255)
* or if not defined it will take the default from
<icroot>/lib/Vend/Table/DBI.pm (line 284)
$config->{KEY_DEF} ||= 'char (16) NOT NULL';
So chances are your username column is not varchar(64), but either one of
the 2 default settings, depending on your configuration.
CU,
Gert
More information about the interchange-users
mailing list