When I look closer to the SQL statement generated by django-admin.py for MySQL, I realize that it doesn't use 'FOREIGN KEY' clause to enforce referential integrity.
For example:
CREATE TABLE `polls_categorys` (
    `id` mediumint(9) unsigned auto_increment NOT NULL PRIMARY KEY,
    `parent_id` integer NULL REFERENCES `tagging_tags` (`id`),
    `child_id` integer NOT NULL REFERENCES `tagging_tags` (`id`)
);

I couldn't find any model-level options to enforce referential integrity. Is it intended so that people will have to manually alter table to add 'FOREIGN KEY' clause if they want to enforce referential integrity?

Thanks.
- Cheng

Reply via email to