1. The column types must match in order to establish a foreign key
relationship. Alter the data type would invalidate the Foreign key. Therefore
the key must be dropped first.

2. You can not have a relationship on a column that does not exists. Once again
the key must first be dropped.

3-4. Currently the user is unable to name Foreign key constraints. Consequently
the only way to know the constraint names is to use `show create table`.



 On Thu, 18 Mar 2004, Gilad Buzi wrote:
> 
> Hello,
> Does anyone have any idea why the following don't work in MySQL 
> 4.1.1-alpha with InnoDB tables:
> 1. cannot change column type without first dropping the foreign key 
> (when there is one)
> 2. cannot drop the column without first dropping the foreign key (if 
> there is one)
> 3. cannot explicitly define a constraint's name when creating it.
> 4. cannot automatically figure out the names of the constraints 
> associated with a column without manually parsing the results of "show 
> create table"
> 
> I sent a more detailed explanation a couple of days ago.  I'm just 
> wondering if this is by design or something planned to be fixed.
> 
> thanks,
> 
> *Gilad Ezra Buzi
> *R&D Engineer
> Open Source Advocate
> 
> *Concatel*
> Avenida Puertos de Europa 100,
> 08040 Barcelona (Spain)
> tel. +34.93.567.97.10
> fax +34.93.567.97.11
> 
> http://www.concatel.com
> 
> 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to