CREATE TABLE IF NOT EXISTS comments id int 11 NOT NULL AUTO_INCREMENT

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
CREATE TABLE IF NOT EXISTS `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) collate utf8_unicode_ci NOT NULL,
`email` varchar(255) collate utf8_unicode_ci NOT NULL,
`text` text collate utf8_unicode_ci NOT NULL,
`post_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `posts` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`title` varchar(255) collate utf8_unicode_ci NOT NULL,
`text` text collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;