CREATE TABLE `posts` ( `PostId` int(4) NOT NULL auto_increment, `ParentPostId` int(4) default NULL COMMENT 'Post that this post can be considered a "child" of', PRIMARY KEY (`PostId`), KEY `Posts_ParentPostId__Posts_PostId` (`ParentPostId`), CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`ParentPostId`) REFERENCES `posts` (`PostId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Stuff that we post on the site'