CREATE TABLE `django_comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`content_type_id` int(11) NOT NULL,
`object_pk` longtext NOT NULL,
`site_id` int(11) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`user_name` varchar(50) NOT NULL,
`user_email` varchar(75) NOT NULL,
`user_url` varchar(200) NOT NULL,
`comment` longtext NOT NULL,
`submit_date` datetime NOT NULL,
`ip_address` char(15) DEFAULT NULL,
`is_public` tinyint(1) NOT NULL,
`is_removed` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
KEY `django_comments_content_type_id` (`content_type_id`),
KEY `django_comments_site_id` (`site_id`),
KEY `django_comments_user_id` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
I am in the middle of migrating a database so that it can be used with a Django application we're building. The above is generated by the built-in Django comments application. I believe I understand most of what's going on here except for the KEY parts (I understand the purpose of PRIMARY KEY).