INSERT INTO `cfg_settings` (`stg_set`, `stg_category`, `stg_name`, `stg_caption`, `stg_value`, `stg_template`) 
VALUES ('general', 'ProjectsSettings', 'csDcToYandex', 'ДК  экспортируемый в яндекс', '', 'new rsDropDownList(\"csDcToYandex\",\"SELECT 0 as cat_id, \'------\' as cat_name, 0 as ord  UNION ALL SELECT cat_id, cat_name, 1 as ord FROM d_catalog3_catalogs ORDER BY ord\", $_USER[\"adapter\"], $_interface->getSaveValue(\"csDcToYandex\", true))');

INSERT INTO `cfg_settings` (`stg_set`, `stg_category`, `stg_name`, `stg_caption`, `stg_value`, `stg_template`) 
VALUES ('general', 'ProjectsSettings', 'csPricelistToYandex', 'Прайс для яндекс', '', 'new rsDropDownList(\"csPricelistToYandex\",\"SELECT 0 as pricelist_id, \'------\' as prname, 0 as ord UNION ALL SELECT pricelist_id, CONCAT_WS(\' - \', IFNULL(filename,\'\'), IFNULL(tablename,\'\')) as prname, 1 as ord FROM autoprice_lexet.pricelist pl INNER JOIN autoprice_lexet.datafile df ON df.datafile_id = pl.datafile_id ORDER BY ord, prname\", $_USER[\"adapter\"], $_interface->getSaveValue(\"csPricelistToYandex\", true))');

INSERT INTO `cfg_settings` (`stg_set`, `stg_category`, `stg_name`, `stg_caption`, `stg_value`, `stg_template`) 
VALUES ('general', 'ProjectsSettings', 'csRateToYandex', 'Наценка для яндекс (%)', '0', 'new DigitalTextBox(\"csRateToYandex\",$_interface->getSaveValue(\"csRateToYandex\", true))');

CREATE TABLE `yml_tasks` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type` varchar(255) NOT NULL,
  `pricelist_id` int(10) unsigned NOT NULL,
  `status` tinyint(4) NOT NULL,
  `start_time` varchar(31) NOT NULL,
  `action_time` varchar(31) NOT NULL,
  `finish_time` varchar(31) NOT NULL,
  `complete_count` int(11) NOT NULL,
  `total` int(10) unsigned NOT NULL,
  `text` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
