I can do this programatically, and will alter the table. But there are three
tables that have foreign key references to the table I will be altering.
They look like this.
CREATE TABLE ITEM_CAT_REL (
id INT,
cat_id INT NOT NULL,
key(id),
FOREIGN KEY (id) references ITEM(id) on DELETE CASCADE
) TYPE=InnoDB;
INSERT INTO ITEM_CAT_REL (id, cat_id) values (5000, 5);
INSERT INTO ITEM_CAT_REL (id, cat_id) values (5000, 6);
How do I handle these three tables? Do I need to remove the foreign key
somehow? These tables do not need fulltext search, so should I leave them as an
InnoDB, or convert to MyISAM?
Thanks,
Scott
###
- ALTER TABLE table_name TYPE=MyISAM;
- and no, you can't have foreign keys with MyISAM tables--or rather,
there's nothing preventing you using foreign keys but you will have to
enforce referential integrity programmatically. MySQL won't do it for you.
- ian
#####
http://dev.mysql.com/doc/mysql/en/converting-tables-to-innodb.html
>key relationships?
MyISAM can't FK's.
Regards,
Rafal
>Thanks,
>Scott
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]