[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] MySQL UNIQUE index needs NOT NULL
Tom,
I figured out to make "code" the primary key, but when I restart minivend it wipes out my definition of the products table in Mysql, and creates the bad one again.
Also, I need minivend to make the table automatically because I am building a lot of stores and I want to automate the process. I am having a hard time figuring out just when and how minivend makes database tables, although I
realize that for Mysql MiniVend uses the Perl file "DBI.pm".
Anything you turn up on this I would appreciate hearing about. Also, as I make progress with this, I would be happy to share anything I learn.
Thanks,
Shane
Tom Craig wrote:
> ****** message to minivend-users from Tom Craig ******
> Hi Shane,
>
> At 17:18 02/12/99 -0800, Shane Roberts wrote:
> >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?
>
> I had this come up at first too.
>
> I now have the following which doesn't give that error:
>
> +-------------+--------------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +-------------+--------------+------+-----+---------+-------+
> | code | varchar(14) | | PRI | | |
> | description | varchar(128) | YES | | | |
> | title | varchar(64) | YES | | | |
> | artist | varchar(128) | YES | | | |
> | comment | text | YES | | | |
> | display | varchar(128) | YES | | | |
> | image | varchar(128) | YES | | | |
> | price | varchar(20) | YES | | | |
> | category | varchar(128) | YES | | | |
> | nontaxable | varchar(128) | YES | | | |
> | weight | varchar(128) | YES | | | |
> | size | varchar(128) | YES | | | |
> | color | varchar(128) | YES | | | |
> | related | varchar(128) | YES | | | |
> +-------------+--------------+------+-----+---------+-------+
>
> I'm still playing around with this, so don't take it as correct.
>
> All the best,
>
> Tom..
>
> ---------------------------------------------------
> W: http://www.paradoxcafe.com/
> ?: new media design - Paradox Cafe
>
> - 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
--
Shane Roberts E-mail: shane@shaneroberts.com
Software Strategies
Voice: (530) 265-4155