1

Тема: Подскажите, в чем ошибка

При sql-запросе:

CREATE TABLE IF NOT EXISTS `et_social_customer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `social_provider` varchar(255) DEFAULT NULL,
  `social_customer_id` varchar(255) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `website_id` int(11) DEFAULT NULL,
  `social_profile_link` varchar(255) DEFAULT NULL,
  `social_name` varchar(255) DEFAULT NULL,
  `social_photo` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `social_account_idx` (`social_provider`,`social_customer_id`) COMMENT 'unique social account',
  KEY `social_customer_id_idx` (`social_customer_id`) USING BTREE,
  KEY `social_provider_idx` (`social_provider`) USING BTREE,
  KEY `customer_id_idx` (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

получаю ошибку:

Ответ MySQL: Документация
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COMMENT 'unique social account',
  KEY `social_customer_id_idx` (`social_custome' at line 21

Причём на локальную БД стало всё нормально, на хостинг не хочет.
Не могу понять, что не так.

2

Re: Подскажите, в чем ошибка

Попробуйте убрать из запроса комментарий к полю. COMMENT 'unique social account'
Вероятно проблема в разных версиях MySQL.

3

Re: Подскажите, в чем ошибка

Да, спасибо, все получилось.