MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] MySQL UNIQUE index needs NOT NULL



Hi Shane

I am new to minivend and mysql (very new) however have been using databases
for a few years....this stands out to me

>ERROR 1121: Column 'code' is used with UNIQUE or INDEX but is not
>defined as NOT NULL

Seems that minivend REQUIRES the 'code' field to NEVER allow duplicates
(because you have specified UNIQUE or INDEX)....this of course could be
possible if NULL is allowed hence minivend screaming that 'NOT NULL' is not
defined for the code field in the MySQL database.

define NOT NULL for 'code' in MySQL (i don't know how this is done)

....see what happens

regards

Trevor Kenney

-----Original Message-----
From: Shane Roberts <shane@shaneroberts.com>
To: minivend-users@minivend.com <minivend-users@minivend.com>
Date: Friday, 3 December 1999 10:18
Subject: [mv] MySQL UNIQUE index needs NOT NULL


>******    message to minivend-users from Shane Roberts
<shane@shaneroberts.com>     ******
>
>I am trying to run MiniVend with MySQL.
>
>I have created a test catalog based on the "simple" catalog
>template.
>
>I have created a user "minivend" in MySQL, and this user has full
>permissions under MySQL.
>
>I have placed the following lines in my catalog.cfg file to
>create the "products" catalog:
>
>Database            products products.asc
>dbi:mysql:minivend:localhost:3333
>Database   products  DELIMITER     TAB
>Database   products  LongReadLen   128
>Database   products  COLUMN_DEF    price=float, code=char(20),
>discount=float
>Database   products  COLUMN_DEF    author=char(40),
>title=char(64)
>Database   products  COLUMN_DEF    nontaxable=char(3)
>Database   products  NUMERIC       price, discount
>
>When I restart the MiniVend server it tries to configure the
>above products table but it gets the following error from MySQL:
>
>ERROR 1121: Column 'code' is used with UNIQUE or INDEX but is not
>defined as NOT NULL
>
>Has anyone run into this problem before. What do you have to tell
>MiniVend for it to properly create the index for the products
>table?
>
>Thanks for your help.
>
>Shane
>
>
>
>--
>Shane Roberts              E-mail: shane@shaneroberts.com
>Software Strategies
>Voice: (530) 265-4155
>
>
>-
>To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
>email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
>Archive of past messages: http://www.minivend.com/minivend/minivend-list
>



Search for: Match: Format: Sort by: