30 lines
1.3 KiB
SQL
30 lines
1.3 KiB
SQL
CREATE TABLE IF NOT EXISTS `PREFIX_product_comment` (
|
|
`id_product_comment` int(10) unsigned NOT NULL auto_increment,
|
|
`id_product` int(10) unsigned NOT NULL,
|
|
`id_customer` int(10) unsigned NOT NULL,
|
|
`content` text NOT NULL,
|
|
`grade` float unsigned NOT NULL,
|
|
`validate` tinyint(1) NOT NULL,
|
|
`date_add` datetime NOT NULL,
|
|
PRIMARY KEY (`id_product_comment`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
|
|
CREATE TABLE IF NOT EXISTS `PREFIX_product_comment_criterion` (
|
|
`id_product_comment_criterion` int(10) unsigned NOT NULL auto_increment,
|
|
`id_lang` int(10) unsigned NOT NULL,
|
|
`name` varchar(64) NOT NULL,
|
|
PRIMARY KEY (`id_product_comment_criterion`, `id_lang`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
|
|
CREATE TABLE IF NOT EXISTS `PREFIX_product_comment_criterion_product` (
|
|
`id_product` int(10) unsigned NOT NULL,
|
|
`id_product_comment_criterion` int(10) unsigned NOT NULL,
|
|
PRIMARY KEY(`id_product`, `id_product_comment_criterion`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
|
|
CREATE TABLE IF NOT EXISTS `PREFIX_product_comment_grade` (
|
|
`id_product_comment` int(10) unsigned NOT NULL,
|
|
`id_product_comment_criterion` int(10) unsigned NOT NULL,
|
|
`grade` int(10) unsigned NOT NULL,
|
|
PRIMARY KEY (`id_product_comment`, `id_product_comment_criterion`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |