CREATE TABLE `customer_group` (
  `customer_group_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Customer Group Id',
  `customer_group_code` varchar(32) NOT NULL COMMENT 'Customer Group Code',
  `tax_class_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Tax Class Id',
  PRIMARY KEY (`customer_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Customer Group';

INSERT INTO `customer_group` (`customer_group_id`, `customer_group_code`, `tax_class_id`) VALUES
(0,	'NOT LOGGED IN',	3),
(1,	'General',	3),
(2,	'Wholesale',	3),
(3,	'Retailer',	3);

CREATE TABLE `customgrid_grid` (
  `grid_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type` varchar(255) NOT NULL,
  `module_name` varchar(255) NOT NULL,
  `controller_name` varchar(255) NOT NULL,
  `block_type` varchar(255) NOT NULL,
  `rewriting_class_name` varchar(255) DEFAULT NULL,
  `block_id` varchar(255) DEFAULT NULL,
  `max_attribute_column_id` int(10) unsigned NOT NULL DEFAULT '0',
  `max_custom_column_id` int(10) unsigned NOT NULL DEFAULT '0',
  `default_page` int(10) unsigned DEFAULT NULL,
  `default_limit` int(10) unsigned DEFAULT NULL,
  `default_sort` varchar(255) DEFAULT NULL,
  `default_dir` enum('asc','desc') DEFAULT NULL,
  `default_filter` text,
  `disabled` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `default_page_behaviour` enum('default','force_original','force_custom') DEFAULT NULL,
  `default_limit_behaviour` enum('default','force_original','force_custom') DEFAULT NULL,
  `default_sort_behaviour` enum('default','force_original','force_custom') DEFAULT NULL,
  `default_dir_behaviour` enum('default','force_original','force_custom') DEFAULT NULL,
  `default_filter_behaviour` enum('default','force_original','force_custom','merge_default','merge_on_original','merge_on_custom') DEFAULT NULL,
  PRIMARY KEY (`grid_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `customgrid_grid` (`grid_id`, `type`, `module_name`, `controller_name`, `block_type`, `rewriting_class_name`, `block_id`, `max_attribute_column_id`, `max_custom_column_id`, `default_page`, `default_limit`, `default_sort`, `default_dir`, `default_filter`, `disabled`, `default_page_behaviour`, `default_limit_behaviour`, `default_sort_behaviour`, `default_dir_behaviour`, `default_filter_behaviour`) VALUES
(1,	'product',	'admin',	'catalog_product',	'adminhtml/catalog_product_grid',	NULL,	'productGrid',	3,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(2,	'other',	'authors_cms',	'adminhtml_authors',	'authors/adminhtml_authors_grid',	NULL,	'authorsGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(3,	'other',	'admin',	'catalog_product_attribute',	'adminhtml/catalog_product_attribute_grid',	NULL,	'attributeGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(4,	'product',	'admin',	'catalog_product',	'adminhtml/catalog_product_edit_tab_crosssell',	NULL,	'cross_sell_product_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(5,	'product',	'admin',	'catalog_product',	'adminhtml/catalog_product_edit_tab_upsell',	NULL,	'up_sell_product_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(6,	'product',	'admin',	'catalog_category',	'adminhtml/catalog_category_tab_product',	NULL,	'catalog_category_products',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(7,	'catalog_search',	'admin',	'catalog_search',	'adminhtml/catalog_search_grid',	NULL,	'catalog_search_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(8,	'other',	'admin',	'process',	'index/adminhtml_process_grid',	NULL,	'indexer_processes_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(9,	'product_edit_tab',	'admin',	'catalog_product',	'adminhtml/catalog_product_edit_tab_reviews',	NULL,	'reviwGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(10,	'product_review',	'admin',	'catalog_product_review',	'adminhtml/review_grid',	NULL,	'reviwGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(11,	'other',	'admin',	'catalog_product_review',	'adminhtml/review_product_grid',	NULL,	'productGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(12,	'cms_page',	'admin',	'cms_page',	'adminhtml/cms_page_grid',	NULL,	'cmsPageGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(13,	'cms_block',	'admin',	'cms_block',	'adminhtml/cms_block_grid',	NULL,	'cmsBlockGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(14,	'other',	'admin',	'awblog_manage_blog',	'blog/manage_blog_grid',	NULL,	'blogGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(15,	'other',	'admin',	'awblog_manage_cat',	'blog/manage_cat_grid',	NULL,	'categoryGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(16,	'other',	'admin',	'notification',	'adminhtml/notification_grid',	NULL,	'notificationGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(17,	'other',	'admin',	'system_backup',	'adminhtml/backup_grid',	NULL,	'backupsGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(18,	'sales_order',	'admin',	'sales_order',	'adminhtml/sales_order_grid',	'Raveinfosys_Deleteorder_Block_Adminhtml_Sales_Order_Grid',	'sales_order_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(19,	'other',	'admin',	'promo_catalog',	'adminhtml/promo_catalog_grid',	NULL,	'promo_catalog_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(20,	'other',	'admin',	'promo_quote',	'adminhtml/promo_quote_grid',	NULL,	'promo_quote_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(21,	'other',	'admin',	'promo_quote',	'adminhtml/promo_quote_edit_tab_coupons_grid',	NULL,	'couponCodesGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(22,	'other',	'admin',	'cache',	'adminhtml/cache_grid',	NULL,	'cache_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(23,	'other',	'uncut_cms',	'cache',	'adminhtml/cache_grid',	NULL,	'cache_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(24,	'product',	'uncut_cms',	'catalog_product',	'adminhtml/catalog_product_grid',	NULL,	'productGrid',	2,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(25,	'customer',	'uncut_cms',	'customer',	'adminhtml/customer_grid',	NULL,	'customerGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(26,	'customer_edit_tab',	'uncut_cms',	'customer',	'adminhtml/customer_edit_tab_newsletter_grid',	NULL,	'queueGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(27,	'customer_edit_tab',	'uncut_cms',	'customer',	'sales/adminhtml_customer_edit_tab_agreement',	NULL,	'customer_edit_tab_agreements',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(28,	'other',	'uncut_cms',	'customer',	'sales/adminhtml_customer_edit_tab_recurring_profile',	NULL,	'customer_edit_tab_recurring_profile',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(29,	'other',	'uncut_cms',	'sales_order_status',	'adminhtml/sales_order_status_grid',	NULL,	'sales_order_status_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(30,	'other',	'uncut_cms',	'api_role',	'adminhtml/api_grid_role',	NULL,	'roleGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(31,	'permissions_role_users',	'uncut_cms',	'api_role',	'adminhtml/api_role_grid_user',	NULL,	'roleUserGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(32,	'other',	'uncut_cms',	'api_user',	'adminhtml/api_user_grid',	NULL,	'permissionsUserGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(33,	'other',	'uncut_cms',	'api_user',	'adminhtml/api_user_edit_tab_roles',	NULL,	'permissionsUserRolesGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(34,	'other',	'uncut_cms',	'system_convert_gui',	'adminhtml/system_convert_gui_grid',	NULL,	'convertProfileGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(35,	'other',	'uncut_cms',	'system_convert_gui',	'adminhtml/system_convert_gui_grid',	'IKT_OrderExport_Block_SystemConvertGuiGrid',	'convertProfileGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(36,	'other',	'uncut_cms',	'system_convert_profile',	'adminhtml/system_convert_profile_grid',	NULL,	'convertProfileGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(37,	'other',	'uncut_cms',	'system_convert_gui',	'adminhtml/system_convert_profile_edit_tab_history',	NULL,	'history_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(38,	'sales_order',	'uncut_cms',	'sales_order',	'adminhtml/sales_order_grid',	'Raveinfosys_Deleteorder_Block_Adminhtml_Sales_Order_Grid',	'sales_order_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(39,	'other',	'uncut_cms',	'process',	'index/adminhtml_process_grid',	NULL,	'indexer_processes_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(40,	'url_rewrite',	'uncut_cms',	'urlrewrite',	'adminhtml/urlrewrite_grid',	NULL,	'urlrewriteGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(42,	'order_view_tab',	'uncut_cms',	'sales_order',	'adminhtml/sales_order_view_tab_invoices',	NULL,	'order_invoices',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(43,	'order_view_tab',	'uncut_cms',	'sales_order',	'adminhtml/sales_order_view_tab_creditmemos',	NULL,	'order_creditmemos',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(44,	'order_view_tab',	'uncut_cms',	'sales_order',	'adminhtml/sales_order_view_tab_shipments',	NULL,	'order_shipments',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(45,	'order_view_tab',	'uncut_cms',	'sales_order',	'adminhtml/sales_order_view_tab_transactions',	NULL,	'order_transactions',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(46,	'cms_block',	'uncut_cms',	'cms_block',	'adminhtml/cms_block_grid',	NULL,	'cmsBlockGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(47,	'other',	'uncut_cms',	'promo_quote',	'adminhtml/promo_quote_grid',	NULL,	'promo_quote_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(48,	'other',	'uncut_cms',	'awblog_manage_blog',	'blog/manage_blog_grid',	NULL,	'blogGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(49,	'other',	'uncut_cms',	'catalog_product_attribute',	'adminhtml/catalog_product_attribute_grid',	NULL,	'attributeGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(50,	'cms_page',	'uncut_cms',	'cms_page',	'adminhtml/cms_page_grid',	NULL,	'cmsPageGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(51,	'cms_widget',	'uncut_cms',	'widget_instance',	'widget/adminhtml_widget_instance_grid',	NULL,	'widgetInstanceGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(52,	'other',	'uncut_cms',	'blcg_custom_grid',	'customgrid/custom_grid_grid',	NULL,	'BLCG_CustomGridGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(54,	'other',	'partners_cms',	'adminhtml_partners',	'partners/adminhtml_partners_grid',	NULL,	'partnersGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(55,	'other',	'uncut_cms',	'notification',	'adminhtml/notification_grid',	NULL,	'notificationGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(56,	'customer_edit_tab',	'uncut_cms',	'customer',	'adminhtml/customer_edit_tab_orders',	NULL,	'customer_orders_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(57,	'customer_edit_tab',	'uncut_cms',	'customer',	'adminhtml/customer_edit_tab_reviews',	NULL,	'reviwGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(58,	'customer_edit_tab',	'uncut_cms',	'customer',	'adminhtml/customer_edit_tab_tag',	NULL,	'tag_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(59,	'other',	'uncut_cms',	'customer_online',	'adminhtml/customer_online_grid',	NULL,	'onlineGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(60,	'catalog_search',	'uncut_cms',	'catalog_search',	'adminhtml/catalog_search_grid',	NULL,	'catalog_search_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(61,	'other',	'uncut_cms',	'awblog_manage_cat',	'blog/manage_cat_grid',	NULL,	'categoryGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(62,	'other',	'uncut_cms',	'menumanager_index',	'scandi_menumanager/adminhtml_menu_grid',	NULL,	'cmsMenuGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(63,	'other',	'uncut_cms',	'menumanager_index',	'scandi_menumanager/adminhtml_menu_edit_tab_items',	NULL,	'cmsMenuItemsGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(64,	'other',	'uncut_cms',	'system_backup',	'adminhtml/backup_grid',	NULL,	'backupsGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(65,	'sales_invoice',	'uncut_cms',	'sales_invoice',	'adminhtml/sales_invoice_grid',	NULL,	'sales_invoice_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(66,	'tax_rule',	'uncut_cms',	'tax_rule',	'adminhtml/tax_rule_grid',	NULL,	'taxRuleGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(67,	'tax_rate',	'uncut_cms',	'tax_rate',	'adminhtml/tax_rate_grid',	NULL,	'tax_rate_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(68,	'other',	'uncut_cms',	'imaclean',	'defcon2imaclean/adminhtml_imaclean_grid',	NULL,	'imacleanGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(69,	'other',	'uncut_cms',	'promo_catalog',	'adminhtml/promo_catalog_grid',	NULL,	'promo_catalog_grid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(70,	'other',	'uncut_cms',	'promo_quote',	'adminhtml/promo_quote_edit_tab_coupons_grid',	NULL,	'couponCodesGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL),
(71,	'other',	'uncut_cms',	'newsletter_queue',	'adminhtml/newsletter_queue_grid',	NULL,	'queueGrid',	0,	0,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	NULL,	NULL,	NULL,	NULL,	NULL);

CREATE TABLE `customgrid_grid_column` (
  `column_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `grid_id` int(10) unsigned NOT NULL,
  `id` varchar(255) NOT NULL,
  `index` varchar(255) DEFAULT NULL,
  `width` varchar(128) DEFAULT '',
  `align` enum('left','center','right') DEFAULT 'left',
  `header` varchar(255) DEFAULT '',
  `order` int(10) NOT NULL DEFAULT '0',
  `origin` enum('grid','collection','attribute','custom') NOT NULL DEFAULT 'grid',
  `is_visible` tinyint(1) NOT NULL DEFAULT '1',
  `is_system` tinyint(1) NOT NULL DEFAULT '0',
  `missing` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `store_id` smallint(5) unsigned DEFAULT NULL,
  `renderer_type` varchar(255) DEFAULT NULL,
  `renderer_params` text,
  `allow_edit` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `profile_id` int(10) unsigned DEFAULT NULL,
  `custom_params` text,
  PRIMARY KEY (`column_id`),
  KEY `FK_CUSTOM_GRID_GRID_COLUMN_GRID` (`grid_id`),
  KEY `FK_CUSTOM_GRID_GRID_COLUMN_STORE` (`store_id`),
  KEY `FK_CUSTOM_GRID_GRID_COLUMN_PROFILE_GRID_PROFILE` (`profile_id`),
  CONSTRAINT `FK_CUSTOM_GRID_GRID_COLUMN_GRID` FOREIGN KEY (`grid_id`) REFERENCES `customgrid_grid` (`grid_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_CUSTOM_GRID_GRID_COLUMN_PROFILE_GRID_PROFILE` FOREIGN KEY (`profile_id`) REFERENCES `customgrid_grid_profile` (`profile_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_CUSTOM_GRID_GRID_COLUMN_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `customgrid_grid_column` (`column_id`, `grid_id`, `id`, `index`, `width`, `align`, `header`, `order`, `origin`, `is_visible`, `is_system`, `missing`, `store_id`, `renderer_type`, `renderer_params`, `allow_edit`, `profile_id`, `custom_params`) VALUES
(1,	1,	'massaction',	'entity_id',	'10px',	'center',	'',	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(2,	1,	'entity_id',	'entity_id',	'50px',	'left',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(3,	1,	'name',	'name',	'',	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(4,	1,	'type',	'type_id',	'60px',	'left',	'Type',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(5,	1,	'set_name',	'attribute_set_id',	'100px',	'left',	'Attrib. Set Name',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(6,	1,	'sku',	'sku',	'80px',	'left',	'SKU',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(7,	1,	'price',	'price',	'',	'left',	'Price',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(8,	1,	'qty',	'qty',	'100px',	'left',	'Qty',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(9,	1,	'visibility',	'visibility',	'70px',	'left',	'Visibility',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(10,	1,	'status',	'status',	'70px',	'left',	'Status',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(11,	1,	'action',	'stores',	'50px',	'left',	'Action',	110,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(12,	1,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(13,	1,	'has_options',	'has_options',	'',	'left',	'Has Options',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(14,	1,	'required_options',	'required_options',	'',	'left',	'Required Options',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(15,	1,	'created_at',	'created_at',	'',	'left',	'Created At',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(16,	1,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(17,	2,	'massaction',	'authors_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(18,	2,	'authors_id',	'authors_id',	'50px',	'right',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(19,	2,	'author',	'author',	NULL,	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(20,	2,	'created_time',	'created_time',	NULL,	'left',	'Created Time',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(21,	2,	'update_time',	'update_time',	NULL,	'left',	'Update Time',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(22,	2,	'status',	'status',	'80px',	'left',	'Status',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(23,	2,	'action',	'stores',	'100',	'left',	'Action',	70,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(24,	2,	'url_path',	'url_path',	'',	'left',	'Url Path',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(25,	2,	'filename',	'filename',	'',	'left',	'Filename',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(26,	2,	'description',	'description',	'',	'left',	'Description',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(27,	3,	'attribute_code',	'attribute_code',	NULL,	'left',	'Attribute Code',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(28,	3,	'frontend_label',	'frontend_label',	NULL,	'left',	'Attribute Label',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(29,	3,	'is_required',	'is_required',	NULL,	'center',	'Required',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(30,	3,	'is_user_defined',	'is_user_defined',	NULL,	'center',	'System',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(31,	3,	'is_visible',	'is_visible_on_front',	NULL,	'center',	'Visible',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(32,	3,	'is_global',	'is_global',	NULL,	'center',	'Scope',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(33,	3,	'is_searchable',	'is_searchable',	NULL,	'center',	'Searchable',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(34,	3,	'is_filterable',	'is_filterable',	NULL,	'center',	'Use in Layered Navigation',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(35,	3,	'is_comparable',	'is_comparable',	NULL,	'center',	'Comparable',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(36,	3,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(37,	3,	'attribute_model',	'attribute_model',	'',	'left',	'Attribute Model',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(38,	3,	'backend_model',	'backend_model',	'',	'left',	'Backend Model',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(39,	3,	'backend_type',	'backend_type',	'',	'left',	'Backend Type',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(40,	3,	'backend_table',	'backend_table',	'',	'left',	'Backend Table',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(41,	3,	'frontend_model',	'frontend_model',	'',	'left',	'Frontend Model',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(42,	3,	'frontend_input',	'frontend_input',	'',	'left',	'Frontend Input',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(43,	3,	'frontend_class',	'frontend_class',	'',	'left',	'Frontend Class',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(44,	3,	'source_model',	'source_model',	'',	'left',	'Source Model',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(45,	3,	'default_value',	'default_value',	'',	'left',	'Default Value',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(46,	3,	'is_unique',	'is_unique',	'',	'left',	'Is Unique',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(47,	3,	'note',	'note',	'',	'left',	'Note',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(48,	3,	'attribute_id',	'attribute_id',	'',	'left',	'Attribute Id',	220,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(49,	3,	'frontend_input_renderer',	'frontend_input_renderer',	'',	'left',	'Frontend Input Renderer',	230,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(50,	3,	'is_html_allowed_on_front',	'is_html_allowed_on_front',	'',	'left',	'Is Html Allowed On Front',	240,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(51,	3,	'is_used_for_price_rules',	'is_used_for_price_rules',	'',	'left',	'Is Used For Price Rules',	250,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(52,	3,	'is_filterable_in_search',	'is_filterable_in_search',	'',	'left',	'Is Filterable In Search',	260,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(53,	3,	'used_in_product_listing',	'used_in_product_listing',	'',	'left',	'Used In Product Listing',	270,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(54,	3,	'used_for_sort_by',	'used_for_sort_by',	'',	'left',	'Used For Sort By',	280,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(55,	3,	'is_configurable',	'is_configurable',	'',	'left',	'Is Configurable',	290,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(56,	3,	'apply_to',	'apply_to',	'',	'left',	'Apply To',	300,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(57,	3,	'is_visible_in_advanced_search',	'is_visible_in_advanced_search',	'',	'left',	'Is Visible In Advanced Search',	310,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(58,	3,	'position',	'position',	'',	'left',	'Position',	320,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(59,	3,	'is_wysiwyg_enabled',	'is_wysiwyg_enabled',	'',	'left',	'Is Wysiwyg Enabled',	330,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(60,	3,	'is_used_for_promo_rules',	'is_used_for_promo_rules',	'',	'left',	'Is Used For Promo Rules',	340,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(62,	4,	'in_products',	'entity_id',	NULL,	'center',	NULL,	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(63,	4,	'entity_id',	'entity_id',	'60',	'left',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(64,	4,	'name',	'name',	NULL,	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(65,	4,	'type',	'type_id',	'100',	'left',	'Type',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(66,	4,	'set_name',	'attribute_set_id',	'130',	'left',	'Attrib. Set Name',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(67,	4,	'status',	'status',	'90',	'left',	'Status',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(68,	4,	'visibility',	'visibility',	'90',	'left',	'Visibility',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(69,	4,	'sku',	'sku',	'80',	'left',	'SKU',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(70,	4,	'price',	'price',	NULL,	'left',	'Price',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(71,	4,	'position',	'position',	'60',	'left',	'Position',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(72,	4,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(73,	4,	'has_options',	'has_options',	'',	'left',	'Has Options',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(74,	4,	'required_options',	'required_options',	'',	'left',	'Required Options',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(75,	4,	'created_at',	'created_at',	'',	'left',	'Created At',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(76,	4,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(77,	4,	'tax_class_id',	'tax_class_id',	'',	'left',	'Tax Class Id',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(78,	4,	'is_recurring',	'is_recurring',	'',	'left',	'Is Recurring',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(79,	4,	'author',	'author',	'',	'left',	'Author',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(80,	4,	'weight',	'weight',	'',	'left',	'Weight',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(81,	4,	'msrp',	'msrp',	'',	'left',	'Msrp',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(82,	4,	'special_price',	'special_price',	'',	'left',	'Special Price',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(83,	4,	'url_key',	'url_key',	'',	'left',	'Url Key',	220,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(84,	4,	'featured_position',	'featured_position',	'',	'left',	'Featured Position',	230,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(85,	4,	'msrp_enabled',	'msrp_enabled',	'',	'left',	'Msrp Enabled',	240,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(86,	4,	'msrp_display_actual_price_type',	'msrp_display_actual_price_type',	'',	'left',	'Msrp Display Actual Price Type',	250,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(87,	4,	'country_of_manufacture',	'country_of_manufacture',	'',	'left',	'Country Of Manufacture',	260,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(88,	4,	'meta_title',	'meta_title',	'',	'left',	'Meta Title',	270,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(89,	4,	'meta_description',	'meta_description',	'',	'left',	'Meta Description',	280,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(90,	4,	'image',	'image',	'',	'left',	'Image',	290,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(91,	4,	'small_image',	'small_image',	'',	'left',	'Small Image',	300,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(92,	4,	'thumbnail',	'thumbnail',	'',	'left',	'Thumbnail',	310,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(93,	4,	'custom_design',	'custom_design',	'',	'left',	'Custom Design',	320,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(94,	4,	'page_layout',	'page_layout',	'',	'left',	'Page Layout',	330,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(95,	4,	'options_container',	'options_container',	'',	'left',	'Options Container',	340,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(96,	4,	'gift_message_available',	'gift_message_available',	'',	'left',	'Gift Message Available',	350,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(97,	4,	'image_label',	'image_label',	'',	'left',	'Image Label',	360,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(98,	4,	'small_image_label',	'small_image_label',	'',	'left',	'Small Image Label',	370,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(99,	4,	'thumbnail_label',	'thumbnail_label',	'',	'left',	'Thumbnail Label',	380,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(100,	4,	'url_path',	'url_path',	'',	'left',	'Url Path',	390,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(101,	4,	'news_to_date',	'news_to_date',	'',	'left',	'News To Date',	400,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(102,	4,	'news_from_date',	'news_from_date',	'',	'left',	'News From Date',	410,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(103,	4,	'special_from_date',	'special_from_date',	'',	'left',	'Special From Date',	420,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(104,	4,	'special_to_date',	'special_to_date',	'',	'left',	'Special To Date',	430,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(105,	4,	'custom_design_from',	'custom_design_from',	'',	'left',	'Custom Design From',	440,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(106,	4,	'custom_design_to',	'custom_design_to',	'',	'left',	'Custom Design To',	450,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(107,	4,	'short_description',	'short_description',	'',	'left',	'Short Description',	460,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(108,	4,	'description',	'description',	'',	'left',	'Description',	470,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(109,	4,	'meta_keyword',	'meta_keyword',	'',	'left',	'Meta Keyword',	480,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(110,	4,	'custom_layout_update',	'custom_layout_update',	'',	'left',	'Custom Layout Update',	490,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(111,	5,	'in_products',	'entity_id',	NULL,	'center',	NULL,	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(112,	5,	'entity_id',	'entity_id',	'60',	'left',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(113,	5,	'name',	'name',	NULL,	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(114,	5,	'type',	'type_id',	'100',	'left',	'Type',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(115,	5,	'set_name',	'attribute_set_id',	'130',	'left',	'Attrib. Set Name',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(116,	5,	'status',	'status',	'90',	'left',	'Status',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(117,	5,	'visibility',	'visibility',	'90',	'left',	'Visibility',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(118,	5,	'sku',	'sku',	'80',	'left',	'SKU',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(119,	5,	'price',	'price',	NULL,	'left',	'Price',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(120,	5,	'position',	'position',	'60',	'left',	'Position',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(121,	5,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(122,	5,	'has_options',	'has_options',	'',	'left',	'Has Options',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(123,	5,	'required_options',	'required_options',	'',	'left',	'Required Options',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(124,	5,	'created_at',	'created_at',	'',	'left',	'Created At',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(125,	5,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(126,	5,	'tax_class_id',	'tax_class_id',	'',	'left',	'Tax Class Id',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(127,	5,	'is_recurring',	'is_recurring',	'',	'left',	'Is Recurring',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(128,	5,	'author',	'author',	'',	'left',	'Author',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(129,	5,	'weight',	'weight',	'',	'left',	'Weight',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(130,	5,	'msrp',	'msrp',	'',	'left',	'Msrp',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(131,	5,	'special_price',	'special_price',	'',	'left',	'Special Price',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(132,	5,	'url_key',	'url_key',	'',	'left',	'Url Key',	220,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(133,	5,	'featured_position',	'featured_position',	'',	'left',	'Featured Position',	230,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(134,	5,	'msrp_enabled',	'msrp_enabled',	'',	'left',	'Msrp Enabled',	240,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(135,	5,	'msrp_display_actual_price_type',	'msrp_display_actual_price_type',	'',	'left',	'Msrp Display Actual Price Type',	250,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(136,	5,	'country_of_manufacture',	'country_of_manufacture',	'',	'left',	'Country Of Manufacture',	260,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(137,	5,	'meta_title',	'meta_title',	'',	'left',	'Meta Title',	270,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(138,	5,	'meta_description',	'meta_description',	'',	'left',	'Meta Description',	280,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(139,	5,	'image',	'image',	'',	'left',	'Image',	290,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(140,	5,	'small_image',	'small_image',	'',	'left',	'Small Image',	300,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(141,	5,	'thumbnail',	'thumbnail',	'',	'left',	'Thumbnail',	310,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(142,	5,	'custom_design',	'custom_design',	'',	'left',	'Custom Design',	320,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(143,	5,	'page_layout',	'page_layout',	'',	'left',	'Page Layout',	330,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(144,	5,	'options_container',	'options_container',	'',	'left',	'Options Container',	340,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(145,	5,	'gift_message_available',	'gift_message_available',	'',	'left',	'Gift Message Available',	350,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(146,	5,	'image_label',	'image_label',	'',	'left',	'Image Label',	360,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(147,	5,	'small_image_label',	'small_image_label',	'',	'left',	'Small Image Label',	370,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(148,	5,	'thumbnail_label',	'thumbnail_label',	'',	'left',	'Thumbnail Label',	380,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(149,	5,	'url_path',	'url_path',	'',	'left',	'Url Path',	390,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(150,	5,	'news_to_date',	'news_to_date',	'',	'left',	'News To Date',	400,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(151,	5,	'news_from_date',	'news_from_date',	'',	'left',	'News From Date',	410,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(152,	5,	'special_from_date',	'special_from_date',	'',	'left',	'Special From Date',	420,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(153,	5,	'special_to_date',	'special_to_date',	'',	'left',	'Special To Date',	430,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(154,	5,	'custom_design_from',	'custom_design_from',	'',	'left',	'Custom Design From',	440,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(155,	5,	'custom_design_to',	'custom_design_to',	'',	'left',	'Custom Design To',	450,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(156,	5,	'short_description',	'short_description',	'',	'left',	'Short Description',	460,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(157,	5,	'description',	'description',	'',	'left',	'Description',	470,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(158,	5,	'meta_keyword',	'meta_keyword',	'',	'left',	'Meta Keyword',	480,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(159,	5,	'custom_layout_update',	'custom_layout_update',	'',	'left',	'Custom Layout Update',	490,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(160,	5,	'link_id',	'link_id',	'',	'left',	'Link Id',	500,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(161,	6,	'in_category',	'entity_id',	NULL,	'center',	NULL,	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(162,	6,	'entity_id',	'entity_id',	'60',	'left',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(163,	6,	'name',	'name',	NULL,	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(164,	6,	'sku',	'sku',	'80',	'left',	'SKU',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(165,	6,	'price',	'price',	'1',	'left',	'Price',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(166,	6,	'position',	'position',	'1',	'left',	'Position',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(167,	6,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(168,	6,	'attribute_set_id',	'attribute_set_id',	'',	'left',	'Attribute Set Id',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(169,	6,	'type_id',	'type_id',	'',	'left',	'Type Id',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(170,	6,	'has_options',	'has_options',	'',	'left',	'Has Options',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(171,	6,	'required_options',	'required_options',	'',	'left',	'Required Options',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(172,	6,	'created_at',	'created_at',	'',	'left',	'Created At',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(173,	6,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(174,	7,	'massaction',	'query_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(175,	7,	'search_query',	'query_text',	NULL,	'left',	'Search Query',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(176,	7,	'num_results',	'num_results',	NULL,	'left',	'Results',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(177,	7,	'popularity',	'popularity',	NULL,	'left',	'Number of Uses',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(178,	7,	'synonym_for',	'synonym_for',	'160px',	'left',	'Synonym For',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(179,	7,	'redirect',	'redirect',	'200px',	'left',	'Redirect',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(180,	7,	'display_in_terms',	'display_in_terms',	'100px',	'left',	'Display in Suggested Terms',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(181,	7,	'action',	'catalog',	'100px',	'left',	'Action',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(182,	7,	'store_id',	'store_id',	'',	'left',	'Store Id',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(183,	7,	'is_active',	'is_active',	'',	'left',	'Is Active',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(184,	7,	'is_processed',	'is_processed',	'',	'left',	'Is Processed',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(185,	7,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(186,	8,	'massaction',	'process_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(187,	8,	'indexer_code',	'name',	'180',	'left',	'Index',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(188,	8,	'description',	'description',	NULL,	'left',	'Description',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(189,	8,	'mode',	'mode',	'150',	'left',	'Mode',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(190,	8,	'status',	'status',	'120',	'left',	'Status',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(191,	8,	'update_required',	'update_required',	'120',	'left',	'Update Required',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(192,	8,	'ended_at',	'ended_at',	'180',	'left',	'Updated At',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(193,	8,	'action',	NULL,	'100',	'left',	'Action',	80,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(194,	8,	'started_at',	'started_at',	'',	'left',	'Started At',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(195,	4,	'link_id',	'link_id',	'',	'left',	'Link Id',	500,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(196,	9,	'review_id',	'review_id',	'50px',	'right',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(197,	9,	'created_at',	'review_created_at',	'100px',	'left',	'Created On',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(198,	9,	'status',	'status_id',	'100px',	'left',	'Status',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(199,	9,	'title',	'title',	'100px',	'left',	'Title',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(200,	9,	'nickname',	'nickname',	'100px',	'left',	'Nickname',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(201,	9,	'detail',	'detail',	NULL,	'left',	'Review',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(202,	9,	'type',	'type',	NULL,	'left',	'Type',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(203,	9,	'name',	'name',	NULL,	'left',	'Product Name',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(204,	9,	'sku',	'sku',	'50px',	'right',	'Product SKU',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(205,	9,	'action',	NULL,	'50px',	'left',	'Action',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(206,	10,	'massaction',	'review_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(207,	10,	'review_id',	'review_id',	'50px',	'right',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(208,	10,	'created_at',	'review_created_at',	'100px',	'left',	'Created On',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(209,	10,	'status',	'status_id',	'100px',	'left',	'Status',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(210,	10,	'title',	'title',	'100px',	'left',	'Title',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(211,	10,	'nickname',	'nickname',	'100px',	'left',	'Nickname',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(212,	10,	'detail',	'detail',	NULL,	'left',	'Review',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(213,	10,	'type',	'type',	NULL,	'left',	'Type',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(214,	10,	'name',	'name',	NULL,	'left',	'Product Name',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(215,	10,	'sku',	'sku',	'50px',	'right',	'Product SKU',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(216,	10,	'action',	NULL,	'50px',	'left',	'Action',	110,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(217,	10,	'entity_id',	'entity_id',	'',	'left',	'Entity Id',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(218,	10,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(219,	10,	'attribute_set_id',	'attribute_set_id',	'',	'left',	'Attribute Set Id',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(220,	10,	'type_id',	'type_id',	'',	'left',	'Type Id',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(221,	10,	'has_options',	'has_options',	'',	'left',	'Has Options',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(222,	10,	'required_options',	'required_options',	'',	'left',	'Required Options',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(223,	10,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(224,	10,	'entity_pk_value',	'entity_pk_value',	'',	'left',	'Entity Pk Value',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(225,	10,	'customer_id',	'customer_id',	'',	'left',	'Customer Id',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(226,	10,	'store_id',	'store_id',	'',	'left',	'Store Id',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(227,	11,	'entity_id',	'entity_id',	'50px',	'left',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(228,	11,	'name',	'name',	NULL,	'left',	'Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(229,	11,	'sku',	'sku',	'80px',	'left',	'SKU',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(230,	11,	'price',	'price',	NULL,	'left',	'Price',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(231,	11,	'qty',	'qty',	'130px',	'left',	'Qty',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(232,	11,	'status',	'status',	'90px',	'left',	'Status',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(233,	11,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(234,	11,	'attribute_set_id',	'attribute_set_id',	'',	'left',	'Attribute Set Id',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(235,	11,	'type_id',	'type_id',	'',	'left',	'Type Id',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(236,	11,	'has_options',	'has_options',	'',	'left',	'Has Options',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(237,	11,	'required_options',	'required_options',	'',	'left',	'Required Options',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(238,	11,	'created_at',	'created_at',	'',	'left',	'Created At',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(239,	11,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(240,	11,	'visibility',	'visibility',	'',	'left',	'Visibility',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(241,	12,	'title',	'title',	NULL,	'left',	'Title',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(242,	12,	'identifier',	'identifier',	NULL,	'left',	'URL Key',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(243,	12,	'root_template',	'root_template',	NULL,	'left',	'Layout',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(244,	12,	'is_active',	'is_active',	NULL,	'left',	'Status',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(245,	12,	'creation_time',	'creation_time',	NULL,	'left',	'Date Created',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(246,	12,	'update_time',	'update_time',	NULL,	'left',	'Last Modified',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(247,	12,	'page_actions',	NULL,	'10',	'left',	'Action',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(248,	12,	'page_id',	'page_id',	'',	'left',	'Page Id',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(249,	12,	'meta_keywords',	'meta_keywords',	'',	'left',	'Meta Keywords',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(250,	12,	'meta_description',	'meta_description',	'',	'left',	'Meta Description',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(251,	12,	'content_heading',	'content_heading',	'',	'left',	'Content Heading',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(252,	12,	'content',	'content',	'',	'left',	'Content',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(253,	12,	'sort_order',	'sort_order',	'',	'left',	'Sort Order',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(254,	12,	'layout_update_xml',	'layout_update_xml',	'',	'left',	'Layout Update Xml',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(255,	12,	'custom_theme',	'custom_theme',	'',	'left',	'Custom Theme',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(256,	12,	'custom_root_template',	'custom_root_template',	'',	'left',	'Custom Root Template',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(257,	12,	'custom_layout_update_xml',	'custom_layout_update_xml',	'',	'left',	'Custom Layout Update Xml',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(258,	12,	'custom_theme_from',	'custom_theme_from',	'',	'left',	'Custom Theme From',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(259,	12,	'custom_theme_to',	'custom_theme_to',	'',	'left',	'Custom Theme To',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(260,	12,	'_first_store_id',	'_first_store_id',	'',	'left',	'First Store Id',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(261,	12,	'store_code',	'store_code',	'',	'left',	'Store Code',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(262,	13,	'title',	'title',	NULL,	'left',	'Title',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(263,	13,	'identifier',	'identifier',	NULL,	'left',	'Identifier',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(264,	13,	'is_active',	'is_active',	NULL,	'left',	'Status',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(265,	13,	'creation_time',	'creation_time',	NULL,	'left',	'Date Created',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(266,	13,	'update_time',	'update_time',	NULL,	'left',	'Last Modified',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(267,	13,	'block_id',	'block_id',	'',	'left',	'Block Id',	60,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(268,	13,	'content',	'content',	'',	'left',	'Content',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(271,	14,	'massaction',	'post_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(272,	14,	'post_id',	'post_id',	'50px',	'right',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(273,	14,	'title',	'title',	NULL,	'left',	'Title',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(274,	14,	'identifier',	'identifier',	NULL,	'left',	'Identifier',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(275,	14,	'user',	'user',	'150px',	'left',	'Poster',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(276,	14,	'created_time',	'created_time',	'120px',	'left',	'Created at',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(277,	14,	'update_time',	'update_time',	'120px',	'left',	'Updated at',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(278,	14,	'status',	'status',	'80px',	'left',	'Status',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(279,	14,	'action',	'stores',	'100',	'left',	'Action',	90,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(280,	14,	'post_content',	'post_content',	'',	'left',	'Post Content',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(281,	14,	'update_user',	'update_user',	'',	'left',	'Update User',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(282,	14,	'meta_keywords',	'meta_keywords',	'',	'left',	'Meta Keywords',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(283,	14,	'meta_description',	'meta_description',	'',	'left',	'Meta Description',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(284,	14,	'comments',	'comments',	'',	'left',	'Comments',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(285,	14,	'tags',	'tags',	'',	'left',	'Tags',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(286,	14,	'short_content',	'short_content',	'',	'left',	'Short Content',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(287,	14,	'filename',	'filename',	'',	'left',	'Filename',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(288,	15,	'massaction',	'cat_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(289,	15,	'cat_id',	'cat_id',	'50px',	'right',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(290,	15,	'title',	'title',	NULL,	'left',	'Title',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(291,	15,	'identifier',	'identifier',	NULL,	'left',	'Identifier',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(292,	15,	'sort_order',	'sort_order',	'50px',	'left',	'Sort Order',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(293,	15,	'action',	'stores',	'100px',	'left',	'Action',	60,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(294,	15,	'meta_keywords',	'meta_keywords',	'',	'left',	'Meta Keywords',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(295,	15,	'meta_description',	'meta_description',	'',	'left',	'Meta Description',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(296,	16,	'massaction',	'notification_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(297,	16,	'severity',	'severity',	'60px',	'left',	'Severity',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(298,	16,	'date_added',	'date_added',	'150px',	'left',	'Date Added',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(299,	16,	'title',	'title',	NULL,	'left',	'Message',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(300,	16,	'actions',	NULL,	'250px',	'left',	'Actions',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(301,	16,	'description',	'description',	'',	'left',	'Description',	60,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(302,	16,	'url',	'url',	'',	'left',	'Url',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(303,	16,	'is_read',	'is_read',	'',	'left',	'Is Read',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(304,	16,	'is_remove',	'is_remove',	'',	'left',	'Is Remove',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(305,	17,	'massaction',	'id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(306,	17,	'time',	'date_object',	'200',	'left',	'Time',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(307,	17,	'display_name',	'display_name',	'350',	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(308,	17,	'size',	'size',	NULL,	'left',	'Size, Bytes',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(309,	17,	'type',	'type',	'300',	'left',	'Type',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(310,	17,	'download',	'type',	NULL,	'left',	'Download',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(311,	17,	'action',	'type',	'80px',	'left',	'Action',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(312,	17,	'filename',	'filename',	'',	'left',	'Filename',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(313,	17,	'basename',	'basename',	'',	'left',	'Basename',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(314,	17,	'path',	'path',	'',	'left',	'Path',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(315,	17,	'extension',	'extension',	'',	'left',	'Extension',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(316,	17,	'name',	'name',	'',	'left',	'Name',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(317,	18,	'massaction',	'entity_id',	'10px',	'center',	'',	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(318,	18,	'real_order_id',	'increment_id',	'80px',	'left',	'Order #',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(319,	18,	'created_at',	'created_at',	'100px',	'left',	'Purchased On',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(320,	18,	'billing_name',	'billing_name',	'',	'left',	'Bill to Name',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(321,	18,	'shipping_name',	'shipping_name',	'',	'left',	'Ship to Name',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(322,	18,	'base_grand_total',	'base_grand_total',	'',	'left',	'G.T. (Base)',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(323,	18,	'grand_total',	'grand_total',	'',	'left',	'G.T. (Purchased)',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(324,	18,	'status',	'status',	'70px',	'left',	'Status',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(325,	18,	'action',	'stores',	'100px',	'left',	'Action',	90,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(326,	19,	'rule_id',	'rule_id',	'50px',	'right',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(327,	19,	'name',	'name',	NULL,	'left',	'Rule Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(328,	19,	'from_date',	'from_date',	'120px',	'left',	'Date Start',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(329,	19,	'to_date',	'to_date',	'120px',	'left',	'Date Expire',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(330,	19,	'is_active',	'is_active',	'80px',	'left',	'Status',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(331,	20,	'rule_id',	'rule_id',	'50px',	'right',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(332,	20,	'name',	'name',	NULL,	'left',	'Rule Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(333,	20,	'coupon_code',	'code',	'150px',	'left',	'Coupon Code',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(334,	20,	'from_date',	'from_date',	'120px',	'left',	'Date Start',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(335,	20,	'to_date',	'to_date',	'120px',	'left',	'Date Expire',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(336,	20,	'is_active',	'is_active',	'80px',	'left',	'Status',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(337,	20,	'sort_order',	'sort_order',	'100',	'right',	'Priority',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(338,	21,	'massaction',	'coupon_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(339,	21,	'code',	'code',	NULL,	'left',	'Coupon Code',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(340,	21,	'created_at',	'created_at',	'160',	'center',	'Created On',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(341,	21,	'used',	'times_used',	'100',	'left',	'Used',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(342,	21,	'times_used',	'times_used',	'50',	'left',	'Times Used',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(343,	22,	'massaction',	'id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(344,	22,	'cache_type',	'cache_type',	'180',	'left',	'Cache Type',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(345,	22,	'description',	'description',	NULL,	'left',	'Description',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(346,	22,	'tags',	'tags',	'180',	'left',	'Associated Tags',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(347,	22,	'status',	'status',	'120',	'left',	'Status',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(348,	23,	'massaction',	'id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(349,	23,	'cache_type',	'cache_type',	'180',	'left',	'Cache Type',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(350,	23,	'description',	'description',	NULL,	'left',	'Description',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(351,	23,	'tags',	'tags',	'180',	'left',	'Associated Tags',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(352,	23,	'status',	'status',	'120',	'left',	'Status',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(353,	24,	'massaction',	'entity_id',	'',	'center',	'',	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(354,	24,	'entity_id',	'entity_id',	'50px',	'left',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(355,	24,	'name',	'name',	'',	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(356,	24,	'type',	'type_id',	'60px',	'left',	'Type',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(357,	24,	'set_name',	'attribute_set_id',	'100px',	'left',	'Attrib. Set Name',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(358,	24,	'sku',	'sku',	'80px',	'left',	'SKU',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(359,	24,	'price',	'price',	'',	'left',	'Price',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(360,	24,	'qty',	'qty',	'100px',	'left',	'Qty',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(361,	24,	'visibility',	'visibility',	'70px',	'left',	'Visibility',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(362,	24,	'status',	'status',	'70px',	'left',	'Status',	110,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(363,	24,	'action',	'stores',	'50px',	'left',	'Action',	120,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(364,	24,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(365,	24,	'has_options',	'has_options',	'',	'left',	'Has Options',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(366,	24,	'required_options',	'required_options',	'',	'left',	'Required Options',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(367,	24,	'created_at',	'created_at',	'',	'left',	'Created At',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(368,	24,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(369,	25,	'massaction',	'entity_id',	'10px',	'center',	'',	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(370,	25,	'entity_id',	'entity_id',	'50px',	'left',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(371,	25,	'name',	'name',	'',	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(372,	25,	'email',	'email',	'150',	'left',	'Email',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(373,	25,	'group',	'group_id',	'100',	'left',	'Group',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(374,	25,	'Telephone',	'billing_telephone',	'100',	'left',	'Telephone',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(375,	25,	'billing_postcode',	'billing_postcode',	'90',	'left',	'ZIP',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(376,	25,	'billing_country_id',	'billing_country_id',	'100',	'left',	'Country',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(377,	25,	'billing_region',	'billing_region',	'100',	'left',	'State/Province',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(378,	25,	'customer_since',	'created_at',	'',	'center',	'Customer Since',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(379,	25,	'action',	'stores',	'100',	'left',	'Action',	110,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(380,	25,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(381,	25,	'attribute_set_id',	'attribute_set_id',	'',	'left',	'Attribute Set Id',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(382,	25,	'website_id',	'website_id',	'',	'left',	'Website Id',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(383,	25,	'increment_id',	'increment_id',	'',	'left',	'Increment Id',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(384,	25,	'store_id',	'store_id',	'',	'left',	'Store Id',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(385,	25,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(386,	25,	'is_active',	'is_active',	'',	'left',	'Is Active',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(387,	25,	'disable_auto_group_change',	'disable_auto_group_change',	'',	'left',	'Disable Auto Group Change',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(388,	25,	'prefix',	'prefix',	'',	'left',	'Prefix',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(389,	25,	'firstname',	'firstname',	'',	'left',	'Firstname',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(390,	25,	'middlename',	'middlename',	'',	'left',	'Middlename',	220,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(391,	25,	'lastname',	'lastname',	'',	'left',	'Lastname',	230,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(392,	25,	'suffix',	'suffix',	'',	'left',	'Suffix',	240,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(393,	25,	'default_billing',	'default_billing',	'',	'left',	'Default Billing',	250,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(394,	25,	'billing_city',	'billing_city',	'',	'left',	'Billing City',	260,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(395,	26,	'queue_id',	'queue_id',	'10',	'left',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(396,	26,	'start_at',	'queue_start_at',	NULL,	'center',	'Newsletter Start',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(397,	26,	'finish_at',	'queue_finish_at',	NULL,	'center',	'Newsletter Finish',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(398,	26,	'letter_sent_at',	'letter_sent_at',	NULL,	'center',	'Newsletter Received',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(399,	26,	'template_subject',	'template_subject',	NULL,	'center',	'Subject',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(400,	26,	'status',	'queue_status',	NULL,	'center',	'Status',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(401,	26,	'action',	NULL,	NULL,	'center',	'Action',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(402,	27,	'agreement_id',	'agreement_id',	NULL,	'left',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(403,	27,	'method_code',	'method_code',	NULL,	'left',	'Payment Method',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(404,	27,	'reference_id',	'reference_id',	NULL,	'left',	'Reference ID',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(405,	27,	'status',	'status',	NULL,	'left',	'Status',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(406,	27,	'created_at',	'agreement_created_at',	'1',	'center',	'Created At',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(407,	27,	'updated_at',	'agreement_updated_at',	'1',	'center',	'Updated At',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(408,	28,	'reference_id',	'reference_id',	'1',	'left',	'Payment Reference ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(409,	28,	'state',	'state',	'1',	'left',	'Profile State',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(410,	28,	'created_at',	'created_at',	'1',	'left',	'Created At',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(411,	28,	'updated_at',	'updated_at',	'1',	'left',	'Updated At',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(412,	28,	'method_code',	'method_code',	NULL,	'left',	'Payment Method',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(413,	28,	'schedule_description',	'schedule_description',	NULL,	'left',	'Schedule Description',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(414,	29,	'label',	'label',	NULL,	'left',	'Status',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(415,	29,	'status',	'status',	'200px',	'left',	'Status Code',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(416,	29,	'is_default',	'is_default',	'100px',	'left',	'Default Status',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(417,	29,	'state',	'state',	'250px',	'left',	'State Code [State Title]',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(418,	29,	'unassign',	'unassign',	'100px',	'left',	'Action',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(419,	30,	'role_id',	'role_id',	'50px',	'right',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(420,	30,	'role_name',	'role_name',	NULL,	'left',	'Role Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(421,	31,	'in_role_users',	'user_id',	NULL,	'center',	NULL,	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(422,	31,	'role_user_id',	'user_id',	'5',	'left',	'User ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(423,	31,	'role_user_username',	'username',	NULL,	'left',	'User Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(424,	31,	'role_user_firstname',	'firstname',	NULL,	'left',	'First Name',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(425,	31,	'role_user_lastname',	'lastname',	NULL,	'left',	'Last Name',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(426,	31,	'role_user_email',	'email',	'40',	'left',	'Email',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(427,	31,	'role_user_is_active',	'is_active',	NULL,	'left',	'Status',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(428,	30,	'parent_id',	'parent_id',	'',	'left',	'Parent Id',	30,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(429,	30,	'tree_level',	'tree_level',	'',	'left',	'Tree Level',	40,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(430,	30,	'sort_order',	'sort_order',	'',	'left',	'Sort Order',	50,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(431,	30,	'role_type',	'role_type',	'',	'left',	'Role Type',	60,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(432,	30,	'user_id',	'user_id',	'',	'left',	'User Id',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(433,	32,	'user_id',	'user_id',	'5',	'right',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(434,	32,	'username',	'username',	NULL,	'left',	'User Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(435,	32,	'firstname',	'firstname',	NULL,	'left',	'First Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(436,	32,	'lastname',	'lastname',	NULL,	'left',	'Last Name',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(437,	32,	'email',	'email',	'40',	'left',	'Email',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(438,	32,	'is_active',	'is_active',	NULL,	'left',	'Status',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(439,	33,	'assigned_user_role',	'role_id',	NULL,	'center',	'Assigned',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(440,	33,	'role_name',	'role_name',	NULL,	'left',	'Role Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(441,	33,	'parent_id',	'parent_id',	'',	'left',	'Parent Id',	30,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(442,	33,	'tree_level',	'tree_level',	'',	'left',	'Tree Level',	40,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(443,	33,	'sort_order',	'sort_order',	'',	'left',	'Sort Order',	50,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(444,	33,	'role_type',	'role_type',	'',	'left',	'Role Type',	60,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(445,	33,	'user_id',	'user_id',	'',	'left',	'User Id',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(446,	34,	'profile_id',	'profile_id',	'50px',	'left',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(447,	34,	'name',	'name',	NULL,	'left',	'Profile Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(448,	34,	'direction',	'direction',	'120px',	'left',	'Profile Direction',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(449,	34,	'entity_type',	'entity_type',	'120px',	'left',	'Entity Type',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(450,	34,	'store_id',	'store_id',	'200px',	'center',	'Store',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(451,	34,	'created_at',	'created_at',	NULL,	'center',	'Created At',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(452,	34,	'updated_at',	'updated_at',	NULL,	'center',	'Updated At',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(453,	34,	'action',	NULL,	'60px',	'center',	'Action',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(454,	34,	'actions_xml',	'actions_xml',	'',	'left',	'Actions Xml',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(455,	34,	'gui_data',	'gui_data',	'',	'left',	'Gui Data',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(456,	34,	'data_transfer',	'data_transfer',	'',	'left',	'Data Transfer',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(457,	35,	'profile_id',	'profile_id',	'50px',	'left',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(458,	35,	'name',	'name',	NULL,	'left',	'Profile Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(459,	35,	'direction',	'direction',	'120px',	'left',	'Profile Direction',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(460,	35,	'entity_type',	'entity_type',	'120px',	'left',	'Entity Type',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(461,	35,	'store_id',	'store_id',	'200px',	'center',	'Store',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(462,	35,	'created_at',	'created_at',	NULL,	'center',	'Created At',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(463,	35,	'updated_at',	'updated_at',	NULL,	'center',	'Updated At',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(464,	35,	'action',	NULL,	'60px',	'center',	'Action',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(465,	35,	'actions_xml',	'actions_xml',	'',	'left',	'Actions Xml',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(466,	35,	'gui_data',	'gui_data',	'',	'left',	'Gui Data',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(467,	35,	'data_transfer',	'data_transfer',	'',	'left',	'Data Transfer',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(468,	36,	'profile_id',	'profile_id',	'50px',	'left',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(469,	36,	'name',	'name',	NULL,	'left',	'Profile Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(470,	36,	'created_at',	'created_at',	NULL,	'center',	'Created At',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(471,	36,	'updated_at',	'updated_at',	NULL,	'center',	'Updated At',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(472,	36,	'action',	NULL,	'60px',	'center',	'Action',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(473,	37,	'action_code',	'action_code',	NULL,	'left',	'Profile Action',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(474,	37,	'performed_at',	'performed_at',	'150px',	'left',	'Performed At',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(475,	37,	'firstname',	'firstname',	NULL,	'left',	'First Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(476,	37,	'lastname',	'lastname',	NULL,	'left',	'Last Name',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(477,	38,	'massaction',	'entity_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(478,	38,	'real_order_id',	'increment_id',	'80px',	'left',	'Order #',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(479,	38,	'created_at',	'created_at',	'100px',	'left',	'Purchased On',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(480,	38,	'billing_name',	'billing_name',	NULL,	'left',	'Bill to Name',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(481,	38,	'shipping_name',	'shipping_name',	NULL,	'left',	'Ship to Name',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(482,	38,	'base_grand_total',	'base_grand_total',	NULL,	'left',	'G.T. (Base)',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(483,	38,	'grand_total',	'grand_total',	NULL,	'left',	'G.T. (Purchased)',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(484,	38,	'status',	'status',	'70px',	'left',	'Status',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(485,	38,	'action',	'stores',	'100px',	'left',	'Action',	90,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(486,	39,	'massaction',	'process_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(487,	39,	'indexer_code',	'name',	'180',	'left',	'Index',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(488,	39,	'description',	'description',	NULL,	'left',	'Description',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(489,	39,	'mode',	'mode',	'150',	'left',	'Mode',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(490,	39,	'status',	'status',	'120',	'left',	'Status',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(491,	39,	'update_required',	'update_required',	'120',	'left',	'Update Required',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(492,	39,	'ended_at',	'ended_at',	'180',	'left',	'Updated At',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(493,	39,	'action',	NULL,	'100',	'left',	'Action',	80,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(494,	39,	'started_at',	'started_at',	'',	'left',	'Started At',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(495,	40,	'url_rewrite_id',	'url_rewrite_id',	'50px',	'left',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(496,	40,	'is_system',	'is_system',	'50px',	'left',	'Type',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(497,	40,	'id_path',	'id_path',	'50px',	'left',	'ID Path',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(498,	40,	'request_path',	'request_path',	'50px',	'left',	'Request Path',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(499,	40,	'target_path',	'target_path',	'50px',	'left',	'Target Path',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(500,	40,	'options',	'options',	'50px',	'left',	'Options',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(501,	40,	'actions',	NULL,	'15px',	'left',	'Action',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(502,	40,	'store_id',	'store_id',	'',	'left',	'Store Id',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(503,	40,	'description',	'description',	'',	'left',	'Description',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(504,	40,	'category_id',	'category_id',	'',	'left',	'Category Id',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(505,	40,	'product_id',	'product_id',	'',	'left',	'Product Id',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(518,	38,	'store_id',	'store_id',	'',	'left',	'Store Id',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(519,	38,	'store_name',	'store_name',	'',	'left',	'Store Name',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(520,	38,	'customer_id',	'customer_id',	'',	'left',	'Customer Id',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(521,	38,	'base_total_paid',	'base_total_paid',	'',	'left',	'Base Total Paid',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(522,	38,	'total_paid',	'total_paid',	'',	'left',	'Total Paid',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(523,	38,	'base_currency_code',	'base_currency_code',	'',	'left',	'Base Currency Code',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(524,	38,	'order_currency_code',	'order_currency_code',	'',	'left',	'Order Currency Code',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(525,	38,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(526,	42,	'increment_id',	'increment_id',	'120px',	'left',	'Invoice #',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(527,	42,	'billing_name',	'billing_name',	NULL,	'left',	'Bill to Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(528,	42,	'created_at',	'created_at',	NULL,	'left',	'Invoice Date',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(529,	42,	'state',	'state',	NULL,	'left',	'Status',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(530,	42,	'base_grand_total',	'base_grand_total',	NULL,	'left',	'Amount',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(531,	43,	'increment_id',	'increment_id',	'120px',	'left',	'Credit Memo #',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(532,	43,	'billing_name',	'billing_name',	NULL,	'left',	'Bill to Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(533,	43,	'created_at',	'created_at',	NULL,	'left',	'Created At',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(534,	43,	'state',	'state',	NULL,	'left',	'Status',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(535,	43,	'base_grand_total',	'base_grand_total',	NULL,	'left',	'Refunded',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(536,	44,	'increment_id',	'increment_id',	NULL,	'left',	'Shipment #',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(537,	44,	'shipping_name',	'shipping_name',	NULL,	'left',	'Ship to Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(538,	44,	'created_at',	'created_at',	NULL,	'left',	'Date Shipped',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(539,	44,	'total_qty',	'total_qty',	NULL,	'left',	'Total Qty',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(540,	45,	'transaction_id',	'transaction_id',	NULL,	'left',	'ID #',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(541,	45,	'increment_id',	'increment_id',	NULL,	'left',	'Order ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(542,	45,	'txn_id',	'txn_id',	NULL,	'left',	'Transaction ID',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(543,	45,	'parent_txn_id',	'parent_txn_id',	NULL,	'left',	'Parent Transaction ID',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(544,	45,	'method',	'method',	NULL,	'left',	'Payment Method Name',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(545,	45,	'txn_type',	'txn_type',	NULL,	'left',	'Transaction Type',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(546,	45,	'is_closed',	'is_closed',	'1',	'center',	'Is Closed',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(547,	45,	'created_at',	'created_at',	'1',	'center',	'Created At',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(548,	42,	'entity_id',	'entity_id',	'',	'left',	'Entity Id',	60,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(549,	42,	'order_id',	'order_id',	'',	'left',	'Order Id',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(550,	42,	'grand_total',	'grand_total',	'',	'left',	'Grand Total',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(551,	42,	'store_currency_code',	'store_currency_code',	'',	'left',	'Store Currency Code',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(552,	42,	'base_currency_code',	'base_currency_code',	'',	'left',	'Base Currency Code',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(553,	42,	'order_currency_code',	'order_currency_code',	'',	'left',	'Order Currency Code',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(554,	44,	'entity_id',	'entity_id',	'',	'left',	'Entity Id',	50,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(555,	46,	'title',	'title',	NULL,	'left',	'Title',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(556,	46,	'identifier',	'identifier',	NULL,	'left',	'Identifier',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(557,	46,	'is_active',	'is_active',	NULL,	'left',	'Status',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(558,	46,	'creation_time',	'creation_time',	NULL,	'left',	'Date Created',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(559,	46,	'update_time',	'update_time',	NULL,	'left',	'Last Modified',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(560,	46,	'block_id',	'block_id',	'',	'left',	'Block Id',	60,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(561,	46,	'content',	'content',	'',	'left',	'Content',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(562,	47,	'rule_id',	'rule_id',	'50px',	'right',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(563,	47,	'name',	'name',	NULL,	'left',	'Rule Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(564,	47,	'coupon_code',	'code',	'150px',	'left',	'Coupon Code',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(565,	47,	'from_date',	'from_date',	'120px',	'left',	'Date Start',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(566,	47,	'to_date',	'to_date',	'120px',	'left',	'Date Expire',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(567,	47,	'is_active',	'is_active',	'80px',	'left',	'Status',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(568,	47,	'sort_order',	'sort_order',	'100',	'right',	'Priority',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(569,	47,	'description',	'description',	'',	'left',	'Description',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(570,	47,	'uses_per_customer',	'uses_per_customer',	'',	'left',	'Uses Per Customer',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(571,	47,	'conditions_serialized',	'conditions_serialized',	'',	'left',	'Conditions Serialized',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(572,	47,	'actions_serialized',	'actions_serialized',	'',	'left',	'Actions Serialized',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(573,	47,	'stop_rules_processing',	'stop_rules_processing',	'',	'left',	'Stop Rules Processing',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(574,	47,	'is_advanced',	'is_advanced',	'',	'left',	'Is Advanced',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(575,	47,	'product_ids',	'product_ids',	'',	'left',	'Product Ids',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(576,	47,	'simple_action',	'simple_action',	'',	'left',	'Simple Action',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(577,	47,	'discount_amount',	'discount_amount',	'',	'left',	'Discount Amount',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(578,	47,	'discount_qty',	'discount_qty',	'',	'left',	'Discount Qty',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(579,	47,	'discount_step',	'discount_step',	'',	'left',	'Discount Step',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(580,	47,	'simple_free_shipping',	'simple_free_shipping',	'',	'left',	'Simple Free Shipping',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(581,	47,	'apply_to_shipping',	'apply_to_shipping',	'',	'left',	'Apply To Shipping',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(582,	47,	'times_used',	'times_used',	'',	'left',	'Times Used',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(583,	47,	'is_rss',	'is_rss',	'',	'left',	'Is Rss',	220,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(584,	47,	'coupon_type',	'coupon_type',	'',	'left',	'Coupon Type',	230,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(585,	47,	'use_auto_generation',	'use_auto_generation',	'',	'left',	'Use Auto Generation',	240,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(586,	47,	'uses_per_coupon',	'uses_per_coupon',	'',	'left',	'Uses Per Coupon',	250,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(587,	48,	'massaction',	'post_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(588,	48,	'post_id',	'post_id',	'50px',	'right',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(589,	48,	'title',	'title',	NULL,	'left',	'Title',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(590,	48,	'identifier',	'identifier',	NULL,	'left',	'Identifier',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(591,	48,	'user',	'user',	'150px',	'left',	'Poster',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(592,	48,	'created_time',	'created_time',	'120px',	'left',	'Created at',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(593,	48,	'update_time',	'update_time',	'120px',	'left',	'Updated at',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(594,	48,	'status',	'status',	'80px',	'left',	'Status',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(595,	48,	'action',	'stores',	'100',	'left',	'Action',	90,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(596,	48,	'post_content',	'post_content',	'',	'left',	'Post Content',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(597,	48,	'update_user',	'update_user',	'',	'left',	'Update User',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(598,	48,	'meta_keywords',	'meta_keywords',	'',	'left',	'Meta Keywords',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(599,	48,	'meta_description',	'meta_description',	'',	'left',	'Meta Description',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(600,	48,	'comments',	'comments',	'',	'left',	'Comments',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(601,	48,	'tags',	'tags',	'',	'left',	'Tags',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(602,	48,	'short_content',	'short_content',	'',	'left',	'Short Content',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(603,	48,	'filename',	'filename',	'',	'left',	'Filename',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(604,	49,	'attribute_code',	'attribute_code',	NULL,	'left',	'Attribute Code',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(605,	49,	'frontend_label',	'frontend_label',	NULL,	'left',	'Attribute Label',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(606,	49,	'is_required',	'is_required',	NULL,	'center',	'Required',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(607,	49,	'is_user_defined',	'is_user_defined',	NULL,	'center',	'System',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(608,	49,	'is_visible',	'is_visible_on_front',	NULL,	'center',	'Visible',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(609,	49,	'is_global',	'is_global',	NULL,	'center',	'Scope',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(610,	49,	'is_searchable',	'is_searchable',	NULL,	'center',	'Searchable',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(611,	49,	'is_filterable',	'is_filterable',	NULL,	'center',	'Use in Layered Navigation',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(612,	49,	'is_comparable',	'is_comparable',	NULL,	'center',	'Comparable',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(613,	49,	'entity_type_id',	'entity_type_id',	'',	'left',	'Entity Type Id',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(614,	49,	'attribute_model',	'attribute_model',	'',	'left',	'Attribute Model',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(615,	49,	'backend_model',	'backend_model',	'',	'left',	'Backend Model',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(616,	49,	'backend_type',	'backend_type',	'',	'left',	'Backend Type',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(617,	49,	'backend_table',	'backend_table',	'',	'left',	'Backend Table',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(618,	49,	'frontend_model',	'frontend_model',	'',	'left',	'Frontend Model',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(619,	49,	'frontend_input',	'frontend_input',	'',	'left',	'Frontend Input',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(620,	49,	'frontend_class',	'frontend_class',	'',	'left',	'Frontend Class',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(621,	49,	'source_model',	'source_model',	'',	'left',	'Source Model',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(622,	49,	'default_value',	'default_value',	'',	'left',	'Default Value',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(623,	49,	'is_unique',	'is_unique',	'',	'left',	'Is Unique',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(624,	49,	'note',	'note',	'',	'left',	'Note',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(625,	49,	'attribute_id',	'attribute_id',	'',	'left',	'Attribute Id',	220,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(626,	49,	'frontend_input_renderer',	'frontend_input_renderer',	'',	'left',	'Frontend Input Renderer',	230,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(627,	49,	'is_html_allowed_on_front',	'is_html_allowed_on_front',	'',	'left',	'Is Html Allowed On Front',	240,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(628,	49,	'is_used_for_price_rules',	'is_used_for_price_rules',	'',	'left',	'Is Used For Price Rules',	250,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(629,	49,	'is_filterable_in_search',	'is_filterable_in_search',	'',	'left',	'Is Filterable In Search',	260,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(630,	49,	'used_in_product_listing',	'used_in_product_listing',	'',	'left',	'Used In Product Listing',	270,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(631,	49,	'used_for_sort_by',	'used_for_sort_by',	'',	'left',	'Used For Sort By',	280,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(632,	49,	'is_configurable',	'is_configurable',	'',	'left',	'Is Configurable',	290,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(633,	49,	'apply_to',	'apply_to',	'',	'left',	'Apply To',	300,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(634,	49,	'is_visible_in_advanced_search',	'is_visible_in_advanced_search',	'',	'left',	'Is Visible In Advanced Search',	310,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(635,	49,	'position',	'position',	'',	'left',	'Position',	320,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(636,	49,	'is_wysiwyg_enabled',	'is_wysiwyg_enabled',	'',	'left',	'Is Wysiwyg Enabled',	330,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(637,	49,	'is_used_for_promo_rules',	'is_used_for_promo_rules',	'',	'left',	'Is Used For Promo Rules',	340,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(638,	24,	'_blcg_attribute_column_1',	'author',	'',	'left',	'Author',	40,	'attribute',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(639,	50,	'title',	'title',	NULL,	'left',	'Title',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(640,	50,	'identifier',	'identifier',	NULL,	'left',	'URL Key',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(641,	50,	'root_template',	'root_template',	NULL,	'left',	'Layout',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(642,	50,	'is_active',	'is_active',	NULL,	'left',	'Status',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(643,	50,	'creation_time',	'creation_time',	NULL,	'left',	'Date Created',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(644,	50,	'update_time',	'update_time',	NULL,	'left',	'Last Modified',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(645,	50,	'page_actions',	NULL,	'10',	'left',	'Action',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(646,	50,	'page_id',	'page_id',	'',	'left',	'Page Id',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(647,	50,	'meta_keywords',	'meta_keywords',	'',	'left',	'Meta Keywords',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(648,	50,	'meta_description',	'meta_description',	'',	'left',	'Meta Description',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(649,	50,	'content_heading',	'content_heading',	'',	'left',	'Content Heading',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(650,	50,	'content',	'content',	'',	'left',	'Content',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(651,	50,	'sort_order',	'sort_order',	'',	'left',	'Sort Order',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(652,	50,	'layout_update_xml',	'layout_update_xml',	'',	'left',	'Layout Update Xml',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(653,	50,	'custom_theme',	'custom_theme',	'',	'left',	'Custom Theme',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(654,	50,	'custom_root_template',	'custom_root_template',	'',	'left',	'Custom Root Template',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(655,	50,	'custom_layout_update_xml',	'custom_layout_update_xml',	'',	'left',	'Custom Layout Update Xml',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(656,	50,	'custom_theme_from',	'custom_theme_from',	'',	'left',	'Custom Theme From',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(657,	50,	'custom_theme_to',	'custom_theme_to',	'',	'left',	'Custom Theme To',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(658,	50,	'_first_store_id',	'_first_store_id',	'',	'left',	'First Store Id',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(659,	50,	'store_code',	'store_code',	'',	'left',	'Store Code',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(660,	51,	'instance_id',	'instance_id',	NULL,	'left',	'Widget ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(661,	51,	'title',	'title',	NULL,	'left',	'Widget Instance Title',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(662,	51,	'type',	'instance_type',	NULL,	'left',	'Type',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(663,	51,	'package_theme',	'package_theme',	NULL,	'left',	'Design Package/Theme',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(664,	51,	'sort_order',	'sort_order',	'100',	'center',	'Sort Order',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(666,	52,	'massaction',	'grid_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(667,	52,	'block_type',	'block_type',	NULL,	'left',	'Block Type',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(668,	52,	'type',	'type',	NULL,	'left',	'Type',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(669,	52,	'rewriting_class_name',	'rewriting_class_name',	NULL,	'left',	'Rewriting Class',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(670,	52,	'module_name',	'module_name',	NULL,	'left',	'Module Name',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(671,	52,	'controller_name',	'controller_name',	NULL,	'left',	'Controller Name',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(672,	52,	'block_id',	'block_id',	NULL,	'left',	'Block ID',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(673,	52,	'disabled',	'disabled',	NULL,	'left',	'Disabled',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(674,	52,	'action',	'id',	'120px',	'left',	'Actions',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(675,	52,	'max_attribute_column_id',	'max_attribute_column_id',	'',	'left',	'Max Attribute Column Id',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(676,	52,	'max_custom_column_id',	'max_custom_column_id',	'',	'left',	'Max Custom Column Id',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(677,	52,	'default_page',	'default_page',	'',	'left',	'Default Page',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(678,	52,	'default_limit',	'default_limit',	'',	'left',	'Default Limit',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(679,	52,	'default_sort',	'default_sort',	'',	'left',	'Default Sort',	140,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(680,	52,	'default_dir',	'default_dir',	'',	'left',	'Default Dir',	150,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(681,	52,	'default_filter',	'default_filter',	'',	'left',	'Default Filter',	160,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(682,	52,	'default_page_behaviour',	'default_page_behaviour',	'',	'left',	'Default Page Behaviour',	170,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(683,	52,	'default_limit_behaviour',	'default_limit_behaviour',	'',	'left',	'Default Limit Behaviour',	180,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(684,	52,	'default_sort_behaviour',	'default_sort_behaviour',	'',	'left',	'Default Sort Behaviour',	190,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(685,	52,	'default_dir_behaviour',	'default_dir_behaviour',	'',	'left',	'Default Dir Behaviour',	200,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(686,	52,	'default_filter_behaviour',	'default_filter_behaviour',	'',	'left',	'Default Filter Behaviour',	210,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(699,	54,	'massaction',	'partners_id',	'10px',	'center',	'',	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(700,	54,	'partners_id',	'partners_id',	'50px',	'right',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(701,	54,	'name',	'name',	'',	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(702,	54,	'job_title',	'job_title',	'',	'left',	'Job Title',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(703,	54,	'created_time',	'created_time',	'',	'left',	'Created Time',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(704,	54,	'update_time',	'update_time',	'',	'left',	'Update Time',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(705,	54,	'status',	'status',	'80px',	'left',	'Status',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(706,	54,	'action',	'stores',	'100px',	'left',	'Action',	80,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(707,	54,	'url_path',	'url_path',	'',	'left',	'Url Path',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(708,	54,	'filename',	'filename',	'',	'left',	'Filename',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(709,	54,	'description',	'description',	'',	'left',	'Description',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(710,	55,	'massaction',	'notification_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(711,	55,	'severity',	'severity',	'60px',	'left',	'Severity',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(712,	55,	'date_added',	'date_added',	'150px',	'left',	'Date Added',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(713,	55,	'title',	'title',	NULL,	'left',	'Message',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(714,	55,	'actions',	NULL,	'250px',	'left',	'Actions',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(715,	55,	'description',	'description',	'',	'left',	'Description',	60,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(716,	55,	'url',	'url',	'',	'left',	'Url',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(717,	55,	'is_read',	'is_read',	'',	'left',	'Is Read',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(718,	55,	'is_remove',	'is_remove',	'',	'left',	'Is Remove',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(719,	56,	'increment_id',	'increment_id',	'100',	'left',	'Order #',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(720,	56,	'created_at',	'created_at',	NULL,	'left',	'Purchase On',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(721,	56,	'billing_name',	'billing_name',	NULL,	'left',	'Bill to Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(722,	56,	'shipping_name',	'shipping_name',	NULL,	'left',	'Shipped to Name',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(723,	56,	'grand_total',	'grand_total',	NULL,	'left',	'Order Total',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(724,	56,	'action',	NULL,	'100px',	'left',	' ',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(725,	57,	'review_id',	'review_id',	'50px',	'right',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(726,	57,	'created_at',	'review_created_at',	'100px',	'left',	'Created On',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(727,	57,	'status',	'status_id',	'100px',	'left',	'Status',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(728,	57,	'title',	'title',	'100px',	'left',	'Title',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(729,	57,	'nickname',	'nickname',	'100px',	'left',	'Nickname',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(730,	57,	'detail',	'detail',	NULL,	'left',	'Review',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(731,	57,	'type',	'type',	NULL,	'left',	'Type',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(732,	57,	'name',	'name',	NULL,	'left',	'Product Name',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(733,	57,	'sku',	'sku',	'50px',	'right',	'Product SKU',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(734,	57,	'action',	NULL,	'50px',	'left',	'Action',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(735,	58,	'name',	'name',	NULL,	'left',	'Tag Name',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(736,	58,	'status',	'status',	'90px',	'left',	'Status',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(737,	58,	'product',	'product',	NULL,	'left',	'Product Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(738,	58,	'product_sku',	'product_sku',	NULL,	'left',	'SKU',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(739,	59,	'customer_id',	'customer_id',	'40px',	'right',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(740,	59,	'firstname',	'customer_firstname',	NULL,	'left',	'First Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(741,	59,	'middlename',	'customer_middlename',	NULL,	'left',	'Middle Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(742,	59,	'lastname',	'customer_lastname',	NULL,	'left',	'Last Name',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(743,	59,	'email',	'customer_email',	NULL,	'left',	'Email',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(744,	59,	'ip_address',	'remote_addr',	NULL,	'left',	'IP Address',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(745,	59,	'session_start_time',	'first_visit_at',	'200px',	'left',	'Session Start Time',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(746,	59,	'last_activity',	'last_visit_at',	'200px',	'left',	'Last Activity',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(747,	59,	'type',	'visitor_type',	NULL,	'left',	'Type',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(748,	59,	'last_url',	'last_url',	NULL,	'left',	'Last URL',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(749,	59,	'visitor_id',	'visitor_id',	'',	'left',	'Visitor Id',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(750,	60,	'massaction',	'query_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(751,	60,	'search_query',	'query_text',	NULL,	'left',	'Search Query',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(752,	60,	'num_results',	'num_results',	NULL,	'left',	'Results',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(753,	60,	'popularity',	'popularity',	NULL,	'left',	'Number of Uses',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(754,	60,	'synonym_for',	'synonym_for',	'160px',	'left',	'Synonym For',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(755,	60,	'redirect',	'redirect',	'200px',	'left',	'Redirect',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(756,	60,	'display_in_terms',	'display_in_terms',	'100px',	'left',	'Display in Suggested Terms',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(757,	60,	'action',	'catalog',	'100px',	'left',	'Action',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(758,	60,	'store_id',	'store_id',	'',	'left',	'Store Id',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(759,	60,	'is_active',	'is_active',	'',	'left',	'Is Active',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(760,	60,	'is_processed',	'is_processed',	'',	'left',	'Is Processed',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(761,	60,	'updated_at',	'updated_at',	'',	'left',	'Updated At',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(762,	61,	'massaction',	'cat_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(763,	61,	'cat_id',	'cat_id',	'50px',	'right',	'ID',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(764,	61,	'title',	'title',	NULL,	'left',	'Title',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(765,	61,	'identifier',	'identifier',	NULL,	'left',	'Identifier',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(766,	61,	'sort_order',	'sort_order',	'50px',	'left',	'Sort Order',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(767,	61,	'action',	'stores',	'100px',	'left',	'Action',	60,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(768,	61,	'meta_keywords',	'meta_keywords',	'',	'left',	'Meta Keywords',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(769,	61,	'meta_description',	'meta_description',	'',	'left',	'Meta Description',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(770,	62,	'title',	'title',	NULL,	'left',	'Title',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(771,	62,	'identifier',	'identifier',	NULL,	'left',	'Identifier',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(772,	62,	'type',	'type',	NULL,	'left',	'Type',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(773,	62,	'css_class',	'css_class',	NULL,	'left',	'CSS Class',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(774,	62,	'is_active',	'is_active',	NULL,	'left',	'Status',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(775,	62,	'menu_id',	'menu_id',	'',	'left',	'Menu Id',	60,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(776,	63,	'item_title',	'title',	NULL,	'left',	'Title',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(777,	63,	'item_parent_id',	'parent_id',	NULL,	'left',	'Parent',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(778,	63,	'item_url',	'url',	NULL,	'left',	'Url',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(779,	63,	'cms_page_identifier',	'cms_page_identifier',	NULL,	'left',	'CMS page ID',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(780,	63,	'item_type',	'type',	NULL,	'left',	'Type',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(781,	63,	'url_type',	'url_type',	NULL,	'left',	'Url Type',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(782,	63,	'item_css_class',	'css_class',	NULL,	'left',	'CSS Class',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(783,	63,	'item_position',	'position',	NULL,	'left',	'Position',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(784,	63,	'item_is_active',	'is_active',	NULL,	'left',	'Status',	90,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(785,	63,	'position_path',	'position_path',	NULL,	'left',	'Position Path',	100,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(786,	63,	'item_id',	'item_id',	'',	'left',	'Item Id',	110,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(787,	63,	'menu_id',	'menu_id',	'',	'left',	'Menu Id',	120,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(788,	63,	'identifier',	'identifier',	'',	'left',	'Identifier',	130,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(789,	64,	'massaction',	'id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(790,	64,	'time',	'date_object',	'200',	'left',	'Time',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(791,	64,	'display_name',	'display_name',	'350',	'left',	'Name',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(792,	64,	'size',	'size',	NULL,	'left',	'Size, Bytes',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(793,	64,	'type',	'type',	'300',	'left',	'Type',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(794,	64,	'download',	'type',	NULL,	'left',	'Download',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(795,	64,	'action',	'type',	'80px',	'left',	'Action',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(796,	65,	'massaction',	'entity_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(797,	65,	'increment_id',	'increment_id',	NULL,	'left',	'Invoice #',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(798,	65,	'created_at',	'created_at',	NULL,	'left',	'Invoice Date',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(799,	65,	'order_increment_id',	'order_increment_id',	NULL,	'left',	'Order #',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(800,	65,	'order_created_at',	'order_created_at',	NULL,	'left',	'Order Date',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(801,	65,	'billing_name',	'billing_name',	NULL,	'left',	'Bill to Name',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(802,	65,	'state',	'state',	NULL,	'left',	'Status',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(803,	65,	'grand_total',	'grand_total',	NULL,	'right',	'Amount',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(804,	65,	'action',	NULL,	'50px',	'left',	'Action',	90,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(805,	66,	'code',	'code',	NULL,	'left',	'Name',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(806,	66,	'customer_tax_classes',	'customer_tax_classes',	NULL,	'left',	'Customer Tax Class',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(807,	66,	'product_tax_classes',	'product_tax_classes',	NULL,	'left',	'Product Tax Class',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(808,	66,	'tax_rates',	'tax_rates',	NULL,	'left',	'Tax Rate',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(809,	66,	'priority',	'priority',	'50px',	'left',	'Priority',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(810,	66,	'calculate_subtotal',	'calculate_subtotal',	'50px',	'left',	'Subtotal only',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(811,	66,	'position',	'position',	'50px',	'left',	'Sort Order',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(812,	66,	'tax_calculation_rule_id',	'tax_calculation_rule_id',	'',	'left',	'Tax Calculation Rule Id',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(813,	67,	'code',	'code',	NULL,	'left',	'Tax Identifier',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(814,	67,	'tax_country_id',	'tax_country_id',	NULL,	'left',	'Country',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(815,	67,	'region_name',	'region_name',	NULL,	'left',	'State/Region',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(816,	67,	'tax_postcode',	'tax_postcode',	NULL,	'left',	'Zip/Post Code',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(817,	67,	'rate',	'rate',	NULL,	'right',	'Rate',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(818,	67,	'tax_calculation_rate_id',	'tax_calculation_rate_id',	'',	'left',	'Tax Calculation Rate Id',	60,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(819,	67,	'tax_region_id',	'tax_region_id',	'',	'left',	'Tax Region Id',	70,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(820,	67,	'zip_is_range',	'zip_is_range',	'',	'left',	'Zip Is Range',	80,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(821,	67,	'zip_from',	'zip_from',	'',	'left',	'Zip From',	90,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(822,	67,	'zip_to',	'zip_to',	'',	'left',	'Zip To',	100,	'collection',	0,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(823,	68,	'massaction',	'imaclean_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(824,	68,	'filename',	'filename',	NULL,	'left',	'Filename',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(825,	68,	'action',	'stores',	'100',	'left',	'Action',	30,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(826,	69,	'rule_id',	'rule_id',	'50px',	'right',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(827,	69,	'name',	'name',	NULL,	'left',	'Rule Name',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(828,	69,	'from_date',	'from_date',	'120px',	'left',	'Date Start',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(829,	69,	'to_date',	'to_date',	'120px',	'left',	'Date Expire',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(830,	69,	'is_active',	'is_active',	'80px',	'left',	'Status',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(831,	70,	'massaction',	'coupon_id',	NULL,	'center',	NULL,	10,	'grid',	1,	1,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(832,	70,	'code',	'code',	NULL,	'left',	'Coupon Code',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(833,	70,	'created_at',	'created_at',	'160',	'center',	'Created On',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(834,	70,	'used',	'times_used',	'100',	'left',	'Used',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(835,	70,	'times_used',	'times_used',	'50',	'left',	'Times Used',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(836,	71,	'queue_id',	'queue_id',	'10',	'left',	'ID',	10,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(837,	71,	'start_at',	'queue_start_at',	NULL,	'left',	'Queue Start',	20,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(838,	71,	'finish_at',	'queue_finish_at',	NULL,	'left',	'Queue Finish',	30,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(839,	71,	'newsletter_subject',	'newsletter_subject',	NULL,	'left',	'Subject',	40,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(840,	71,	'status',	'queue_status',	'100px',	'left',	'Status',	50,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(841,	71,	'subscribers_sent',	'subscribers_sent',	NULL,	'left',	'Processed',	60,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(842,	71,	'subscribers_total',	'subscribers_total',	NULL,	'left',	'Recipients',	70,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL),
(843,	71,	'action',	NULL,	'100px',	'left',	'Action',	80,	'grid',	1,	0,	0,	NULL,	NULL,	NULL,	1,	NULL,	NULL);

CREATE TABLE `customgrid_grid_profile` (
  `profile_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `grid_id` int(10) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `default_page` int(10) unsigned DEFAULT NULL,
  `default_limit` int(10) unsigned DEFAULT NULL,
  `default_sort` varchar(255) DEFAULT NULL,
  `default_direction` enum('asc','desc') DEFAULT NULL,
  `default_filters` text,
  PRIMARY KEY (`profile_id`),
  KEY `FK_CUSTOM_GRID_GRID_PROFILE_GRID` (`grid_id`),
  CONSTRAINT `FK_CUSTOM_GRID_GRID_PROFILE_GRID` FOREIGN KEY (`grid_id`) REFERENCES `customgrid_grid` (`grid_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `customgrid_grid_role` (
  `grid_role_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `grid_id` int(10) unsigned NOT NULL,
  `role_id` int(10) unsigned NOT NULL,
  `permissions` text,
  `default_profile_id` int(10) unsigned DEFAULT NULL,
  `available_profiles` text,
  PRIMARY KEY (`grid_role_id`),
  KEY `FK_CUSTOM_GRID_GRID_ROLE_GRID` (`grid_id`),
  KEY `FK_CUSTOM_GRID_GRID_ROLE_ROLE` (`role_id`),
  KEY `FK_CUSTOM_GRID_GRID_ROLE_DEFAULT_PROFILE` (`default_profile_id`),
  CONSTRAINT `FK_CUSTOM_GRID_GRID_ROLE_DEFAULT_PROFILE` FOREIGN KEY (`default_profile_id`) REFERENCES `customgrid_grid_profile` (`profile_id`) ON DELETE SET NULL,
  CONSTRAINT `FK_CUSTOM_GRID_GRID_ROLE_GRID` FOREIGN KEY (`grid_id`) REFERENCES `customgrid_grid` (`grid_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_CUSTOM_GRID_GRID_ROLE_ROLE` FOREIGN KEY (`role_id`) REFERENCES `admin_role` (`role_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `customgrid_grid_user` (
  `grid_user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `grid_id` int(10) unsigned NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `default_profile_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`grid_user_id`),
  KEY `FK_CUSTOM_GRID_GRID_USER_GRID` (`grid_id`),
  KEY `FK_CUSTOM_GRID_GRID_USER_USER` (`user_id`),
  KEY `FK_CUSTOM_GRID_GRID_USER_DEFAULT_PROFILE` (`default_profile_id`),
  CONSTRAINT `FK_CUSTOM_GRID_GRID_USER_DEFAULT_PROFILE` FOREIGN KEY (`default_profile_id`) REFERENCES `customgrid_grid_profile` (`profile_id`) ON DELETE SET NULL,
  CONSTRAINT `FK_CUSTOM_GRID_GRID_USER_GRID` FOREIGN KEY (`grid_id`) REFERENCES `customgrid_grid` (`grid_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_CUSTOM_GRID_GRID_USER_USER` FOREIGN KEY (`user_id`) REFERENCES `admin_user` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `customgrid_options_source` (
  `source_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `type` enum('custom_list','mage_model') NOT NULL,
  PRIMARY KEY (`source_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `customgrid_options_source_model` (
  `model_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `source_id` int(10) unsigned NOT NULL,
  `model_name` varchar(255) NOT NULL,
  `model_type` enum('model','resource_model','singleton') NOT NULL,
  `method` varchar(255) NOT NULL,
  `return_type` enum('options_hash','options_array','vo_collection') NOT NULL,
  `value_key` varchar(255) DEFAULT NULL,
  `label_key` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`model_id`),
  KEY `FK_CUSTOMGRID_OPTIONS_SOURCE_MODEL_SOURCE` (`source_id`),
  CONSTRAINT `FK_CUSTOMGRID_OPTIONS_SOURCE_MODEL_SOURCE` FOREIGN KEY (`source_id`) REFERENCES `customgrid_options_source` (`source_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `customgrid_options_source_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `source_id` int(10) unsigned NOT NULL,
  `value` varchar(255) NOT NULL,
  `label` varchar(255) NOT NULL,
  PRIMARY KEY (`option_id`),
  KEY `FK_CUSTOMGRID_OPTIONS_SOURCE_OPTION_SOURCE` (`source_id`),
  CONSTRAINT `FK_CUSTOMGRID_OPTIONS_SOURCE_OPTION_SOURCE` FOREIGN KEY (`source_id`) REFERENCES `customgrid_options_source` (`source_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `dataflow_batch` (
  `batch_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Batch Id',
  `profile_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Profile ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `adapter` varchar(128) DEFAULT NULL COMMENT 'Adapter',
  `params` text COMMENT 'Parameters',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  PRIMARY KEY (`batch_id`),
  KEY `IDX_DATAFLOW_BATCH_PROFILE_ID` (`profile_id`),
  KEY `IDX_DATAFLOW_BATCH_STORE_ID` (`store_id`),
  KEY `IDX_DATAFLOW_BATCH_CREATED_AT` (`created_at`),
  CONSTRAINT `FK_DATAFLOW_BATCH_PROFILE_ID_DATAFLOW_PROFILE_PROFILE_ID` FOREIGN KEY (`profile_id`) REFERENCES `dataflow_profile` (`profile_id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `FK_DATAFLOW_BATCH_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Dataflow Batch';


CREATE TABLE `dataflow_batch_export` (
  `batch_export_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Batch Export Id',
  `batch_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Batch Id',
  `batch_data` longtext COMMENT 'Batch Data',
  `status` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Status',
  PRIMARY KEY (`batch_export_id`),
  KEY `IDX_DATAFLOW_BATCH_EXPORT_BATCH_ID` (`batch_id`),
  CONSTRAINT `FK_DATAFLOW_BATCH_EXPORT_BATCH_ID_DATAFLOW_BATCH_BATCH_ID` FOREIGN KEY (`batch_id`) REFERENCES `dataflow_batch` (`batch_id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Dataflow Batch Export';


CREATE TABLE `dataflow_batch_import` (
  `batch_import_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Batch Import Id',
  `batch_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Batch Id',
  `batch_data` longtext COMMENT 'Batch Data',
  `status` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Status',
  PRIMARY KEY (`batch_import_id`),
  KEY `IDX_DATAFLOW_BATCH_IMPORT_BATCH_ID` (`batch_id`),
  CONSTRAINT `FK_DATAFLOW_BATCH_IMPORT_BATCH_ID_DATAFLOW_BATCH_BATCH_ID` FOREIGN KEY (`batch_id`) REFERENCES `dataflow_batch` (`batch_id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Dataflow Batch Import';


CREATE TABLE `dataflow_import_data` (
  `import_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Import Id',
  `session_id` int(11) DEFAULT NULL COMMENT 'Session Id',
  `serial_number` int(11) NOT NULL DEFAULT '0' COMMENT 'Serial Number',
  `value` text COMMENT 'Value',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT 'Status',
  PRIMARY KEY (`import_id`),
  KEY `IDX_DATAFLOW_IMPORT_DATA_SESSION_ID` (`session_id`),
  CONSTRAINT `FK_DATAFLOW_IMPORT_DATA_SESSION_ID_DATAFLOW_SESSION_SESSION_ID` FOREIGN KEY (`session_id`) REFERENCES `dataflow_session` (`session_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Dataflow Import Data';


CREATE TABLE `dataflow_profile` (
  `profile_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Profile Id',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `actions_xml` text COMMENT 'Actions Xml',
  `gui_data` text COMMENT 'Gui Data',
  `direction` varchar(6) DEFAULT NULL COMMENT 'Direction',
  `entity_type` varchar(64) DEFAULT NULL COMMENT 'Entity Type',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `data_transfer` varchar(11) DEFAULT NULL COMMENT 'Data Transfer',
  PRIMARY KEY (`profile_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Dataflow Profile';

INSERT INTO `dataflow_profile` (`profile_id`, `name`, `created_at`, `updated_at`, `actions_xml`, `gui_data`, `direction`, `entity_type`, `store_id`, `data_transfer`) VALUES
(1,	'Export All Products',	'2017-07-17 11:56:15',	'2017-07-17 11:56:15',	'<action type=\"catalog/convert_adapter_product\" method=\"load\">\\r\\n    <var name=\"store\"><![CDATA[0]]></var>\\r\\n</action>\\r\\n\\r\\n<action type=\"catalog/convert_parser_product\" method=\"unparse\">\\r\\n    <var name=\"store\"><![CDATA[0]]></var>\\r\\n</action>\\r\\n\\r\\n<action type=\"dataflow/convert_mapper_column\" method=\"map\">\\r\\n</action>\\r\\n\\r\\n<action type=\"dataflow/convert_parser_csv\" method=\"unparse\">\\r\\n    <var name=\"delimiter\"><![CDATA[,]]></var>\\r\\n    <var name=\"enclose\"><![CDATA[\"]]></var>\\r\\n    <var name=\"fieldnames\">true</var>\\r\\n</action>\\r\\n\\r\\n<action type=\"dataflow/convert_adapter_io\" method=\"save\">\\r\\n    <var name=\"type\">file</var>\\r\\n    <var name=\"path\">var/export</var>\\r\\n    <var name=\"filename\"><![CDATA[export_all_products.csv]]></var>\\r\\n</action>\\r\\n\\r\\n',	'a:5:{s:4:\"file\";a:7:{s:4:\"type\";s:4:\"file\";s:8:\"filename\";s:23:\"export_all_products.csv\";s:4:\"path\";s:10:\"var/export\";s:4:\"host\";s:0:\"\";s:4:\"user\";s:0:\"\";s:8:\"password\";s:0:\"\";s:7:\"passive\";s:0:\"\";}s:5:\"parse\";a:5:{s:4:\"type\";s:3:\"csv\";s:12:\"single_sheet\";s:0:\"\";s:9:\"delimiter\";s:1:\",\";s:7:\"enclose\";s:1:\"\"\";s:10:\"fieldnames\";s:4:\"true\";}s:3:\"map\";a:3:{s:14:\"only_specified\";s:0:\"\";s:7:\"product\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:8:\"customer\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}}s:7:\"product\";a:1:{s:6:\"filter\";a:8:{s:4:\"name\";s:0:\"\";s:3:\"sku\";s:0:\"\";s:4:\"type\";s:1:\"0\";s:13:\"attribute_set\";s:0:\"\";s:5:\"price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:3:\"qty\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"visibility\";s:1:\"0\";s:6:\"status\";s:1:\"0\";}}s:8:\"customer\";a:1:{s:6:\"filter\";a:10:{s:9:\"firstname\";s:0:\"\";s:8:\"lastname\";s:0:\"\";s:5:\"email\";s:0:\"\";s:5:\"group\";s:1:\"0\";s:10:\"adressType\";s:15:\"default_billing\";s:9:\"telephone\";s:0:\"\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:0:\"\";s:6:\"region\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}}',	'export',	'product',	0,	'file'),
(2,	'Export Product Stocks',	'2017-07-17 11:56:15',	'2017-07-17 11:56:15',	'<action type=\"catalog/convert_adapter_product\" method=\"load\">\\r\\n    <var name=\"store\"><![CDATA[0]]></var>\\r\\n</action>\\r\\n\\r\\n<action type=\"catalog/convert_parser_product\" method=\"unparse\">\\r\\n    <var name=\"store\"><![CDATA[0]]></var>\\r\\n</action>\\r\\n\\r\\n<action type=\"dataflow/convert_mapper_column\" method=\"map\">\\r\\n</action>\\r\\n\\r\\n<action type=\"dataflow/convert_parser_csv\" method=\"unparse\">\\r\\n    <var name=\"delimiter\"><![CDATA[,]]></var>\\r\\n    <var name=\"enclose\"><![CDATA[\"]]></var>\\r\\n    <var name=\"fieldnames\">true</var>\\r\\n</action>\\r\\n\\r\\n<action type=\"dataflow/convert_adapter_io\" method=\"save\">\\r\\n    <var name=\"type\">file</var>\\r\\n    <var name=\"path\">var/export</var>\\r\\n    <var name=\"filename\"><![CDATA[export_all_products.csv]]></var>\\r\\n</action>\\r\\n\\r\\n',	'a:5:{s:4:\"file\";a:7:{s:4:\"type\";s:4:\"file\";s:8:\"filename\";s:25:\"export_product_stocks.csv\";s:4:\"path\";s:10:\"var/export\";s:4:\"host\";s:0:\"\";s:4:\"user\";s:0:\"\";s:8:\"password\";s:0:\"\";s:7:\"passive\";s:0:\"\";}s:5:\"parse\";a:5:{s:4:\"type\";s:3:\"csv\";s:12:\"single_sheet\";s:0:\"\";s:9:\"delimiter\";s:1:\",\";s:7:\"enclose\";s:1:\"\"\";s:10:\"fieldnames\";s:4:\"true\";}s:3:\"map\";a:3:{s:14:\"only_specified\";s:4:\"true\";s:7:\"product\";a:2:{s:2:\"db\";a:4:{i:1;s:5:\"store\";i:2;s:3:\"sku\";i:3;s:3:\"qty\";i:4;s:11:\"is_in_stock\";}s:4:\"file\";a:4:{i:1;s:5:\"store\";i:2;s:3:\"sku\";i:3;s:3:\"qty\";i:4;s:11:\"is_in_stock\";}}s:8:\"customer\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}}s:7:\"product\";a:1:{s:6:\"filter\";a:8:{s:4:\"name\";s:0:\"\";s:3:\"sku\";s:0:\"\";s:4:\"type\";s:1:\"0\";s:13:\"attribute_set\";s:0:\"\";s:5:\"price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:3:\"qty\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"visibility\";s:1:\"0\";s:6:\"status\";s:1:\"0\";}}s:8:\"customer\";a:1:{s:6:\"filter\";a:10:{s:9:\"firstname\";s:0:\"\";s:8:\"lastname\";s:0:\"\";s:5:\"email\";s:0:\"\";s:5:\"group\";s:1:\"0\";s:10:\"adressType\";s:15:\"default_billing\";s:9:\"telephone\";s:0:\"\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:0:\"\";s:6:\"region\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}}',	'export',	'product',	0,	'file'),
(3,	'Import All Products',	'2017-07-17 11:56:15',	'2017-07-17 11:56:15',	'<action type=\"dataflow/convert_parser_csv\" method=\"parse\">\\r\\n    <var name=\"delimiter\"><![CDATA[,]]></var>\\r\\n    <var name=\"enclose\"><![CDATA[\"]]></var>\\r\\n    <var name=\"fieldnames\">true</var>\\r\\n    <var name=\"store\"><![CDATA[0]]></var>\\r\\n    <var name=\"adapter\">catalog/convert_adapter_product</var>\\r\\n    <var name=\"method\">parse</var>\\r\\n</action>',	'a:5:{s:4:\"file\";a:7:{s:4:\"type\";s:4:\"file\";s:8:\"filename\";s:23:\"export_all_products.csv\";s:4:\"path\";s:10:\"var/export\";s:4:\"host\";s:0:\"\";s:4:\"user\";s:0:\"\";s:8:\"password\";s:0:\"\";s:7:\"passive\";s:0:\"\";}s:5:\"parse\";a:5:{s:4:\"type\";s:3:\"csv\";s:12:\"single_sheet\";s:0:\"\";s:9:\"delimiter\";s:1:\",\";s:7:\"enclose\";s:1:\"\"\";s:10:\"fieldnames\";s:4:\"true\";}s:3:\"map\";a:3:{s:14:\"only_specified\";s:0:\"\";s:7:\"product\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:8:\"customer\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}}s:7:\"product\";a:1:{s:6:\"filter\";a:8:{s:4:\"name\";s:0:\"\";s:3:\"sku\";s:0:\"\";s:4:\"type\";s:1:\"0\";s:13:\"attribute_set\";s:0:\"\";s:5:\"price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:3:\"qty\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"visibility\";s:1:\"0\";s:6:\"status\";s:1:\"0\";}}s:8:\"customer\";a:1:{s:6:\"filter\";a:10:{s:9:\"firstname\";s:0:\"\";s:8:\"lastname\";s:0:\"\";s:5:\"email\";s:0:\"\";s:5:\"group\";s:1:\"0\";s:10:\"adressType\";s:15:\"default_billing\";s:9:\"telephone\";s:0:\"\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:0:\"\";s:6:\"region\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}}',	'import',	'product',	0,	'interactive'),
(4,	'Import Product Stocks',	'2017-07-17 11:56:15',	'2017-07-17 11:56:15',	'<action type=\"dataflow/convert_parser_csv\" method=\"parse\">\\r\\n    <var name=\"delimiter\"><![CDATA[,]]></var>\\r\\n    <var name=\"enclose\"><![CDATA[\"]]></var>\\r\\n    <var name=\"fieldnames\">true</var>\\r\\n    <var name=\"store\"><![CDATA[0]]></var>\\r\\n    <var name=\"adapter\">catalog/convert_adapter_product</var>\\r\\n    <var name=\"method\">parse</var>\\r\\n</action>',	'a:5:{s:4:\"file\";a:7:{s:4:\"type\";s:4:\"file\";s:8:\"filename\";s:18:\"export_product.csv\";s:4:\"path\";s:10:\"var/export\";s:4:\"host\";s:0:\"\";s:4:\"user\";s:0:\"\";s:8:\"password\";s:0:\"\";s:7:\"passive\";s:0:\"\";}s:5:\"parse\";a:5:{s:4:\"type\";s:3:\"csv\";s:12:\"single_sheet\";s:0:\"\";s:9:\"delimiter\";s:1:\",\";s:7:\"enclose\";s:1:\"\"\";s:10:\"fieldnames\";s:4:\"true\";}s:3:\"map\";a:3:{s:14:\"only_specified\";s:0:\"\";s:7:\"product\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:8:\"customer\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}}s:7:\"product\";a:1:{s:6:\"filter\";a:8:{s:4:\"name\";s:0:\"\";s:3:\"sku\";s:0:\"\";s:4:\"type\";s:1:\"0\";s:13:\"attribute_set\";s:0:\"\";s:5:\"price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:3:\"qty\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"visibility\";s:1:\"0\";s:6:\"status\";s:1:\"0\";}}s:8:\"customer\";a:1:{s:6:\"filter\";a:10:{s:9:\"firstname\";s:0:\"\";s:8:\"lastname\";s:0:\"\";s:5:\"email\";s:0:\"\";s:5:\"group\";s:1:\"0\";s:10:\"adressType\";s:15:\"default_billing\";s:9:\"telephone\";s:0:\"\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:0:\"\";s:6:\"region\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}}',	'import',	'product',	0,	'interactive'),
(5,	'Export Customers',	'2017-07-17 11:56:16',	'2017-07-17 11:56:16',	'<action type=\"customer/convert_adapter_customer\" method=\"load\">\\r\\n    <var name=\"store\"><![CDATA[0]]></var>\\r\\n    <var name=\"filter/adressType\"><![CDATA[default_billing]]></var>\\r\\n</action>\\r\\n\\r\\n<action type=\"customer/convert_parser_customer\" method=\"unparse\">\\r\\n    <var name=\"store\"><![CDATA[0]]></var>\\r\\n</action>\\r\\n\\r\\n<action type=\"dataflow/convert_mapper_column\" method=\"map\">\\r\\n</action>\\r\\n\\r\\n<action type=\"dataflow/convert_parser_csv\" method=\"unparse\">\\r\\n    <var name=\"delimiter\"><![CDATA[,]]></var>\\r\\n    <var name=\"enclose\"><![CDATA[\"]]></var>\\r\\n    <var name=\"fieldnames\">true</var>\\r\\n</action>\\r\\n\\r\\n<action type=\"dataflow/convert_adapter_io\" method=\"save\">\\r\\n    <var name=\"type\">file</var>\\r\\n    <var name=\"path\">var/export</var>\\r\\n    <var name=\"filename\"><![CDATA[export_customers.csv]]></var>\\r\\n</action>\\r\\n\\r\\n',	'a:5:{s:4:\"file\";a:7:{s:4:\"type\";s:4:\"file\";s:8:\"filename\";s:20:\"export_customers.csv\";s:4:\"path\";s:10:\"var/export\";s:4:\"host\";s:0:\"\";s:4:\"user\";s:0:\"\";s:8:\"password\";s:0:\"\";s:7:\"passive\";s:0:\"\";}s:5:\"parse\";a:5:{s:4:\"type\";s:3:\"csv\";s:12:\"single_sheet\";s:0:\"\";s:9:\"delimiter\";s:1:\",\";s:7:\"enclose\";s:1:\"\"\";s:10:\"fieldnames\";s:4:\"true\";}s:3:\"map\";a:3:{s:14:\"only_specified\";s:0:\"\";s:7:\"product\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:8:\"customer\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}}s:7:\"product\";a:1:{s:6:\"filter\";a:8:{s:4:\"name\";s:0:\"\";s:3:\"sku\";s:0:\"\";s:4:\"type\";s:1:\"0\";s:13:\"attribute_set\";s:0:\"\";s:5:\"price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:3:\"qty\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"visibility\";s:1:\"0\";s:6:\"status\";s:1:\"0\";}}s:8:\"customer\";a:1:{s:6:\"filter\";a:10:{s:9:\"firstname\";s:0:\"\";s:8:\"lastname\";s:0:\"\";s:5:\"email\";s:0:\"\";s:5:\"group\";s:1:\"0\";s:10:\"adressType\";s:15:\"default_billing\";s:9:\"telephone\";s:0:\"\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:0:\"\";s:6:\"region\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}}',	'export',	'customer',	0,	'file'),
(6,	'Import Customers',	'2017-07-17 11:56:16',	'2017-07-17 11:56:16',	'<action type=\"dataflow/convert_parser_csv\" method=\"parse\">\\r\\n    <var name=\"delimiter\"><![CDATA[,]]></var>\\r\\n    <var name=\"enclose\"><![CDATA[\"]]></var>\\r\\n    <var name=\"fieldnames\">true</var>\\r\\n    <var name=\"store\"><![CDATA[0]]></var>\\r\\n    <var name=\"adapter\">customer/convert_adapter_customer</var>\\r\\n    <var name=\"method\">parse</var>\\r\\n</action>',	'a:5:{s:4:\"file\";a:7:{s:4:\"type\";s:4:\"file\";s:8:\"filename\";s:19:\"export_customer.csv\";s:4:\"path\";s:10:\"var/export\";s:4:\"host\";s:0:\"\";s:4:\"user\";s:0:\"\";s:8:\"password\";s:0:\"\";s:7:\"passive\";s:0:\"\";}s:5:\"parse\";a:5:{s:4:\"type\";s:3:\"csv\";s:12:\"single_sheet\";s:0:\"\";s:9:\"delimiter\";s:1:\",\";s:7:\"enclose\";s:1:\"\"\";s:10:\"fieldnames\";s:4:\"true\";}s:3:\"map\";a:3:{s:14:\"only_specified\";s:0:\"\";s:7:\"product\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:8:\"customer\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}}s:7:\"product\";a:1:{s:6:\"filter\";a:8:{s:4:\"name\";s:0:\"\";s:3:\"sku\";s:0:\"\";s:4:\"type\";s:1:\"0\";s:13:\"attribute_set\";s:0:\"\";s:5:\"price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:3:\"qty\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"visibility\";s:1:\"0\";s:6:\"status\";s:1:\"0\";}}s:8:\"customer\";a:1:{s:6:\"filter\";a:10:{s:9:\"firstname\";s:0:\"\";s:8:\"lastname\";s:0:\"\";s:5:\"email\";s:0:\"\";s:5:\"group\";s:1:\"0\";s:10:\"adressType\";s:15:\"default_billing\";s:9:\"telephone\";s:0:\"\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:0:\"\";s:6:\"region\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}}',	'import',	'customer',	0,	'interactive'),
(7,	'ExportAllOrders',	'2018-01-17 20:57:15',	'2018-03-07 13:35:21',	'<action type=\"IKT_OrderExport_Model_ConvertAdapterOrder\" method=\"load\">\r\n    <var name=\"store\"><![CDATA[0]]></var>\r\n    <var name=\"filter/status\"><![CDATA[processing]]></var>\r\n</action>\r\n\r\n<action type=\"IKT_OrderExport_Model_ConvertParserOrder\" method=\"unparse\">\r\n    <var name=\"store\"><![CDATA[0]]></var>\r\n    <var name=\"url_field\"><![CDATA[0]]></var>\r\n</action>\r\n\r\n<action type=\"IKT_OrderExport_Model_ConvertMapperColumn\" method=\"map\">\r\n    <var name=\"map\">\r\n        <map name=\"Item::Sku\"><![CDATA[ISBN / SKU(Product Number)]]></map>\r\n        <map name=\"Item::Name\"><![CDATA[Title]]></map>\r\n        <map name=\"Item::Quantity\"><![CDATA[Quantity]]></map>\r\n        <map name=\"General::Id\"><![CDATA[Customer PO]]></map>\r\n        <map name=\"General::Customerpoline\"><![CDATA[Customer PO Line #]]></map>\r\n        <map name=\"General::Customeralternatereference\"><![CDATA[Customer Alternate Reference #]]></map>\r\n        <map name=\"Shipping::Method\"><![CDATA[Shipping Method]]></map>\r\n        <map name=\"Shipping_Address::Name_Combined\"><![CDATA[Name / Recipient]]></map>\r\n        <map name=\"Shipping_Address::Street_1\"><![CDATA[Address - Line 1]]></map>\r\n        <map name=\"Shipping_Address::Street_2\"><![CDATA[Address - Line 2]]></map>\r\n        <map name=\"Shipping_Address::City\"><![CDATA[City]]></map>\r\n        <map name=\"Shipping_Address::Province\"><![CDATA[State]]></map>\r\n        <map name=\"Shipping_Address::Postal_Code\"><![CDATA[Postal Code]]></map>\r\n        <map name=\"Shipping_Address::Country_Code\"><![CDATA[Country Code]]></map>\r\n        <map name=\"Shipping_Address::Phone\"><![CDATA[Phone Number]]></map>\r\n    </var>\r\n    <var name=\"_only_specified\">true</var>\r\n</action>\r\n\r\n<action type=\"dataflow/convert_parser_csv\" method=\"unparse\">\r\n    <var name=\"delimiter\"><![CDATA[,]]></var>\r\n    <var name=\"enclose\"><![CDATA[\"]]></var>\r\n    <var name=\"fieldnames\">true</var>\r\n</action>\r\n\r\n<action type=\"IKT_OrderExport_Model_ConvertAdapterIo\" method=\"save\">\r\n    <var name=\"type\">file</var>\r\n    <var name=\"path\">var/export</var>\r\n    <var name=\"appenddate\">true</var>\r\n    <var name=\"statusafter\">No change</var>\r\n    <var name=\"notificationemail\">EDI@lightningsource.com</var>\r\n    <var name=\"notificationemailsubject\"><![CDATA[order export - Pub ID: UNCTUS]]></var>\r\n    <var name=\"notificationemailbody\"><![CDATA[Pub ID: UNCTUS]]></var>\r\n    <var name=\"filename\"><![CDATA[order_export.csv]]></var>\r\n</action>\r\n\r\n',	'a:9:{s:6:\"export\";a:3:{s:13:\"add_url_field\";s:1:\"0\";s:15:\"show_in_actions\";s:0:\"\";s:14:\"run_in_cronjob\";s:0:\"\";}s:6:\"import\";a:2:{s:17:\"number_of_records\";s:1:\"1\";s:17:\"decimal_separator\";s:1:\".\";}s:4:\"file\";a:8:{s:4:\"type\";s:4:\"file\";s:8:\"filename\";s:16:\"order_export.csv\";s:10:\"appenddate\";s:4:\"true\";s:4:\"path\";s:10:\"var/export\";s:4:\"host\";s:0:\"\";s:4:\"user\";s:0:\"\";s:8:\"password\";s:0:\"\";s:7:\"passive\";s:0:\"\";}s:5:\"parse\";a:5:{s:4:\"type\";s:3:\"csv\";s:12:\"single_sheet\";s:0:\"\";s:9:\"delimiter\";s:1:\",\";s:7:\"enclose\";s:1:\"\"\";s:10:\"fieldnames\";s:4:\"true\";}s:3:\"map\";a:4:{s:14:\"only_specified\";s:4:\"true\";s:7:\"product\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:8:\"customer\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:5:\"order\";a:3:{s:11:\"db_category\";a:15:{i:1;s:4:\"Item\";i:2;s:4:\"Item\";i:3;s:4:\"Item\";i:4;s:7:\"General\";i:5;s:7:\"General\";i:6;s:7:\"General\";i:7;s:8:\"Shipping\";i:8;s:16:\"Shipping_Address\";i:9;s:16:\"Shipping_Address\";i:10;s:16:\"Shipping_Address\";i:11;s:16:\"Shipping_Address\";i:12;s:16:\"Shipping_Address\";i:13;s:16:\"Shipping_Address\";i:14;s:16:\"Shipping_Address\";i:15;s:16:\"Shipping_Address\";}s:2:\"db\";a:15:{i:1;s:3:\"Sku\";i:2;s:4:\"Name\";i:3;s:8:\"Quantity\";i:4;s:2:\"Id\";i:5;s:14:\"Customerpoline\";i:6;s:26:\"Customeralternatereference\";i:7;s:6:\"Method\";i:8;s:13:\"Name_Combined\";i:9;s:8:\"Street_1\";i:10;s:8:\"Street_2\";i:11;s:4:\"City\";i:12;s:8:\"Province\";i:13;s:11:\"Postal_Code\";i:14;s:12:\"Country_Code\";i:15;s:5:\"Phone\";}s:4:\"file\";a:15:{i:1;s:26:\"ISBN / SKU(Product Number)\";i:2;s:5:\"Title\";i:3;s:8:\"Quantity\";i:4;s:11:\"Customer PO\";i:5;s:18:\"Customer PO Line #\";i:6;s:30:\"Customer Alternate Reference #\";i:7;s:15:\"Shipping Method\";i:8;s:16:\"Name / Recipient\";i:9;s:16:\"Address - Line 1\";i:10;s:16:\"Address - Line 2\";i:11;s:4:\"City\";i:12;s:5:\"State\";i:13;s:11:\"Postal Code\";i:14;s:12:\"Country Code\";i:15;s:12:\"Phone Number\";}}}s:5:\"order\";a:5:{s:11:\"statusafter\";s:9:\"No change\";s:17:\"notificationemail\";s:23:\"EDI@lightningsource.com\";s:24:\"notificationemailsubject\";s:29:\"order export - Pub ID: UNCTUS\";s:21:\"notificationemailbody\";s:14:\"Pub ID: UNCTUS\";s:6:\"filter\";a:3:{s:6:\"status\";s:10:\"processing\";s:4:\"date\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:11:\"ordernumber\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}s:13:\"individualmap\";a:2:{s:5:\"order\";a:2:{s:2:\"db\";a:0:{}s:4:\"file\";a:0:{}}s:10:\"linecolumn\";s:0:\"\";}s:7:\"product\";a:1:{s:6:\"filter\";a:8:{s:4:\"name\";s:0:\"\";s:3:\"sku\";s:0:\"\";s:4:\"type\";s:1:\"0\";s:13:\"attribute_set\";s:0:\"\";s:5:\"price\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:3:\"qty\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}s:10:\"visibility\";s:1:\"0\";s:6:\"status\";s:1:\"0\";}}s:8:\"customer\";a:1:{s:6:\"filter\";a:10:{s:9:\"firstname\";s:0:\"\";s:8:\"lastname\";s:0:\"\";s:5:\"email\";s:0:\"\";s:5:\"group\";s:1:\"0\";s:10:\"adressType\";s:15:\"default_billing\";s:9:\"telephone\";s:0:\"\";s:8:\"postcode\";s:0:\"\";s:7:\"country\";s:0:\"\";s:6:\"region\";s:0:\"\";s:10:\"created_at\";a:2:{s:4:\"from\";s:0:\"\";s:2:\"to\";s:0:\"\";}}}}',	'export',	'order',	0,	'file');

CREATE TABLE `dataflow_profile_history` (
  `history_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'History Id',
  `profile_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Profile Id',
  `action_code` varchar(64) DEFAULT NULL COMMENT 'Action Code',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'User Id',
  `performed_at` timestamp NULL DEFAULT NULL COMMENT 'Performed At',
  PRIMARY KEY (`history_id`),
  KEY `IDX_DATAFLOW_PROFILE_HISTORY_PROFILE_ID` (`profile_id`),
  CONSTRAINT `FK_AEA06B0C500063D3CE6EA671AE776645` FOREIGN KEY (`profile_id`) REFERENCES `dataflow_profile` (`profile_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Dataflow Profile History';

INSERT INTO `dataflow_profile_history` (`history_id`, `profile_id`, `action_code`, `user_id`, `performed_at`) VALUES
(1,	1,	'create',	0,	'2017-07-17 11:56:15'),
(2,	2,	'create',	0,	'2017-07-17 11:56:15'),
(3,	3,	'create',	0,	'2017-07-17 11:56:15'),
(4,	4,	'create',	0,	'2017-07-17 11:56:16'),
(5,	5,	'create',	0,	'2017-07-17 11:56:16'),
(6,	6,	'create',	0,	'2017-07-17 11:56:16'),
(7,	7,	'create',	0,	'2018-01-17 20:57:15'),
(8,	7,	'update',	0,	'2018-01-17 20:58:40'),
(9,	7,	'update',	0,	'2018-01-17 21:04:53'),
(10,	7,	'update',	0,	'2018-01-17 21:11:22'),
(11,	7,	'update',	0,	'2018-01-17 21:12:04'),
(12,	7,	'run',	0,	'2018-01-18 14:48:44'),
(13,	7,	'run',	0,	'2018-01-18 18:16:36'),
(14,	7,	'run',	0,	'2018-01-18 18:34:45'),
(15,	7,	'run',	0,	'2018-01-18 18:35:22'),
(16,	7,	'update',	0,	'2018-01-18 18:40:26'),
(17,	7,	'run',	0,	'2018-01-18 18:53:04'),
(18,	7,	'run',	0,	'2018-01-18 18:58:25'),
(19,	7,	'run',	0,	'2018-01-18 18:59:30'),
(20,	7,	'run',	0,	'2018-01-18 19:02:35'),
(21,	7,	'run',	0,	'2018-01-18 19:11:05'),
(22,	7,	'run',	0,	'2018-01-18 19:12:24'),
(23,	7,	'run',	0,	'2018-01-18 19:19:20'),
(24,	7,	'run',	0,	'2018-01-18 19:24:24'),
(25,	7,	'run',	0,	'2018-01-18 19:34:16'),
(26,	7,	'run',	0,	'2018-01-18 19:49:26'),
(27,	7,	'update',	0,	'2018-01-29 14:37:30'),
(28,	7,	'update',	0,	'2018-03-07 13:35:21');

CREATE TABLE `dataflow_session` (
  `session_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Session Id',
  `user_id` int(11) NOT NULL COMMENT 'User Id',
  `created_date` timestamp NULL DEFAULT NULL COMMENT 'Created Date',
  `file` varchar(255) DEFAULT NULL COMMENT 'File',
  `type` varchar(32) DEFAULT NULL COMMENT 'Type',
  `direction` varchar(32) DEFAULT NULL COMMENT 'Direction',
  `comment` varchar(255) DEFAULT NULL COMMENT 'Comment',
  PRIMARY KEY (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Dataflow Session';


CREATE TABLE `design_change` (
  `design_change_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Design Change Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `design` varchar(255) DEFAULT NULL COMMENT 'Design',
  `date_from` date DEFAULT NULL COMMENT 'First Date of Design Activity',
  `date_to` date DEFAULT NULL COMMENT 'Last Date of Design Activity',
  PRIMARY KEY (`design_change_id`),
  KEY `IDX_DESIGN_CHANGE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_DESIGN_CHANGE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Design Changes';


CREATE TABLE `directory_country` (
  `country_id` varchar(2) NOT NULL DEFAULT '' COMMENT 'Country Id in ISO-2',
  `iso2_code` varchar(2) DEFAULT NULL COMMENT 'Country ISO-2 format',
  `iso3_code` varchar(3) DEFAULT NULL COMMENT 'Country ISO-3',
  PRIMARY KEY (`country_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Directory Country';

INSERT INTO `directory_country` (`country_id`, `iso2_code`, `iso3_code`) VALUES
('AD',	'AD',	'AND'),
('AE',	'AE',	'ARE'),
('AF',	'AF',	'AFG'),
('AG',	'AG',	'ATG'),
('AI',	'AI',	'AIA'),
('AL',	'AL',	'ALB'),
('AM',	'AM',	'ARM'),
('AN',	'AN',	'ANT'),
('AO',	'AO',	'AGO'),
('AQ',	'AQ',	'ATA'),
('AR',	'AR',	'ARG'),
('AS',	'AS',	'ASM'),
('AT',	'AT',	'AUT'),
('AU',	'AU',	'AUS'),
('AW',	'AW',	'ABW'),
('AX',	'AX',	'ALA'),
('AZ',	'AZ',	'AZE'),
('BA',	'BA',	'BIH'),
('BB',	'BB',	'BRB'),
('BD',	'BD',	'BGD'),
('BE',	'BE',	'BEL'),
('BF',	'BF',	'BFA'),
('BG',	'BG',	'BGR'),
('BH',	'BH',	'BHR'),
('BI',	'BI',	'BDI'),
('BJ',	'BJ',	'BEN'),
('BL',	'BL',	'BLM'),
('BM',	'BM',	'BMU'),
('BN',	'BN',	'BRN'),
('BO',	'BO',	'BOL'),
('BR',	'BR',	'BRA'),
('BS',	'BS',	'BHS'),
('BT',	'BT',	'BTN'),
('BV',	'BV',	'BVT'),
('BW',	'BW',	'BWA'),
('BY',	'BY',	'BLR'),
('BZ',	'BZ',	'BLZ'),
('CA',	'CA',	'CAN'),
('CC',	'CC',	'CCK'),
('CD',	'CD',	'COD'),
('CF',	'CF',	'CAF'),
('CG',	'CG',	'COG'),
('CH',	'CH',	'CHE'),
('CI',	'CI',	'CIV'),
('CK',	'CK',	'COK'),
('CL',	'CL',	'CHL'),
('CM',	'CM',	'CMR'),
('CN',	'CN',	'CHN'),
('CO',	'CO',	'COL'),
('CR',	'CR',	'CRI'),
('CU',	'CU',	'CUB'),
('CV',	'CV',	'CPV'),
('CX',	'CX',	'CXR'),
('CY',	'CY',	'CYP'),
('CZ',	'CZ',	'CZE'),
('DE',	'DE',	'DEU'),
('DJ',	'DJ',	'DJI'),
('DK',	'DK',	'DNK'),
('DM',	'DM',	'DMA'),
('DO',	'DO',	'DOM'),
('DZ',	'DZ',	'DZA'),
('EC',	'EC',	'ECU'),
('EE',	'EE',	'EST'),
('EG',	'EG',	'EGY'),
('EH',	'EH',	'ESH'),
('ER',	'ER',	'ERI'),
('ES',	'ES',	'ESP'),
('ET',	'ET',	'ETH'),
('FI',	'FI',	'FIN'),
('FJ',	'FJ',	'FJI'),
('FK',	'FK',	'FLK'),
('FM',	'FM',	'FSM'),
('FO',	'FO',	'FRO'),
('FR',	'FR',	'FRA'),
('GA',	'GA',	'GAB'),
('GB',	'GB',	'GBR'),
('GD',	'GD',	'GRD'),
('GE',	'GE',	'GEO'),
('GF',	'GF',	'GUF'),
('GG',	'GG',	'GGY'),
('GH',	'GH',	'GHA'),
('GI',	'GI',	'GIB'),
('GL',	'GL',	'GRL'),
('GM',	'GM',	'GMB'),
('GN',	'GN',	'GIN'),
('GP',	'GP',	'GLP'),
('GQ',	'GQ',	'GNQ'),
('GR',	'GR',	'GRC'),
('GS',	'GS',	'SGS'),
('GT',	'GT',	'GTM'),
('GU',	'GU',	'GUM'),
('GW',	'GW',	'GNB'),
('GY',	'GY',	'GUY'),
('HK',	'HK',	'HKG'),
('HM',	'HM',	'HMD'),
('HN',	'HN',	'HND'),
('HR',	'HR',	'HRV'),
('HT',	'HT',	'HTI'),
('HU',	'HU',	'HUN'),
('ID',	'ID',	'IDN'),
('IE',	'IE',	'IRL'),
('IL',	'IL',	'ISR'),
('IM',	'IM',	'IMN'),
('IN',	'IN',	'IND'),
('IO',	'IO',	'IOT'),
('IQ',	'IQ',	'IRQ'),
('IR',	'IR',	'IRN'),
('IS',	'IS',	'ISL'),
('IT',	'IT',	'ITA'),
('JE',	'JE',	'JEY'),
('JM',	'JM',	'JAM'),
('JO',	'JO',	'JOR'),
('JP',	'JP',	'JPN'),
('KE',	'KE',	'KEN'),
('KG',	'KG',	'KGZ'),
('KH',	'KH',	'KHM'),
('KI',	'KI',	'KIR'),
('KM',	'KM',	'COM'),
('KN',	'KN',	'KNA'),
('KP',	'KP',	'PRK'),
('KR',	'KR',	'KOR'),
('KW',	'KW',	'KWT'),
('KY',	'KY',	'CYM'),
('KZ',	'KZ',	'KAZ'),
('LA',	'LA',	'LAO'),
('LB',	'LB',	'LBN'),
('LC',	'LC',	'LCA'),
('LI',	'LI',	'LIE'),
('LK',	'LK',	'LKA'),
('LR',	'LR',	'LBR'),
('LS',	'LS',	'LSO'),
('LT',	'LT',	'LTU'),
('LU',	'LU',	'LUX'),
('LV',	'LV',	'LVA'),
('LY',	'LY',	'LBY'),
('MA',	'MA',	'MAR'),
('MC',	'MC',	'MCO'),
('MD',	'MD',	'MDA'),
('ME',	'ME',	'MNE'),
('MF',	'MF',	'MAF'),
('MG',	'MG',	'MDG'),
('MH',	'MH',	'MHL'),
('MK',	'MK',	'MKD'),
('ML',	'ML',	'MLI'),
('MM',	'MM',	'MMR'),
('MN',	'MN',	'MNG'),
('MO',	'MO',	'MAC'),
('MP',	'MP',	'MNP'),
('MQ',	'MQ',	'MTQ'),
('MR',	'MR',	'MRT'),
('MS',	'MS',	'MSR'),
('MT',	'MT',	'MLT'),
('MU',	'MU',	'MUS'),
('MV',	'MV',	'MDV'),
('MW',	'MW',	'MWI'),
('MX',	'MX',	'MEX'),
('MY',	'MY',	'MYS'),
('MZ',	'MZ',	'MOZ'),
('NA',	'NA',	'NAM'),
('NC',	'NC',	'NCL'),
('NE',	'NE',	'NER'),
('NF',	'NF',	'NFK'),
('NG',	'NG',	'NGA'),
('NI',	'NI',	'NIC'),
('NL',	'NL',	'NLD'),
('NO',	'NO',	'NOR'),
('NP',	'NP',	'NPL'),
('NR',	'NR',	'NRU'),
('NU',	'NU',	'NIU'),
('NZ',	'NZ',	'NZL'),
('OM',	'OM',	'OMN'),
('PA',	'PA',	'PAN'),
('PE',	'PE',	'PER'),
('PF',	'PF',	'PYF'),
('PG',	'PG',	'PNG'),
('PH',	'PH',	'PHL'),
('PK',	'PK',	'PAK'),
('PL',	'PL',	'POL'),
('PM',	'PM',	'SPM'),
('PN',	'PN',	'PCN'),
('PR',	'PR',	'PRI'),
('PS',	'PS',	'PSE'),
('PT',	'PT',	'PRT'),
('PW',	'PW',	'PLW'),
('PY',	'PY',	'PRY'),
('QA',	'QA',	'QAT'),
('RE',	'RE',	'REU'),
('RO',	'RO',	'ROU'),
('RS',	'RS',	'SRB'),
('RU',	'RU',	'RUS'),
('RW',	'RW',	'RWA'),
('SA',	'SA',	'SAU'),
('SB',	'SB',	'SLB'),
('SC',	'SC',	'SYC'),
('SD',	'SD',	'SDN'),
('SE',	'SE',	'SWE'),
('SG',	'SG',	'SGP'),
('SH',	'SH',	'SHN'),
('SI',	'SI',	'SVN'),
('SJ',	'SJ',	'SJM'),
('SK',	'SK',	'SVK'),
('SL',	'SL',	'SLE'),
('SM',	'SM',	'SMR'),
('SN',	'SN',	'SEN'),
('SO',	'SO',	'SOM'),
('SR',	'SR',	'SUR'),
('ST',	'ST',	'STP'),
('SV',	'SV',	'SLV'),
('SY',	'SY',	'SYR'),
('SZ',	'SZ',	'SWZ'),
('TC',	'TC',	'TCA'),
('TD',	'TD',	'TCD'),
('TF',	'TF',	'ATF'),
('TG',	'TG',	'TGO'),
('TH',	'TH',	'THA'),
('TJ',	'TJ',	'TJK'),
('TK',	'TK',	'TKL'),
('TL',	'TL',	'TLS'),
('TM',	'TM',	'TKM'),
('TN',	'TN',	'TUN'),
('TO',	'TO',	'TON'),
('TR',	'TR',	'TUR'),
('TT',	'TT',	'TTO'),
('TV',	'TV',	'TUV'),
('TW',	'TW',	'TWN'),
('TZ',	'TZ',	'TZA'),
('UA',	'UA',	'UKR'),
('UG',	'UG',	'UGA'),
('UM',	'UM',	'UMI'),
('US',	'US',	'USA'),
('UY',	'UY',	'URY'),
('UZ',	'UZ',	'UZB'),
('VA',	'VA',	'VAT'),
('VC',	'VC',	'VCT'),
('VE',	'VE',	'VEN'),
('VG',	'VG',	'VGB'),
('VI',	'VI',	'VIR'),
('VN',	'VN',	'VNM'),
('VU',	'VU',	'VUT'),
('WF',	'WF',	'WLF'),
('WS',	'WS',	'WSM'),
('YE',	'YE',	'YEM'),
('YT',	'YT',	'MYT'),
('ZA',	'ZA',	'ZAF'),
('ZM',	'ZM',	'ZMB'),
('ZW',	'ZW',	'ZWE');

CREATE TABLE `directory_country_format` (
  `country_format_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Country Format Id',
  `country_id` varchar(2) DEFAULT NULL COMMENT 'Country Id in ISO-2',
  `type` varchar(30) DEFAULT NULL COMMENT 'Country Format Type',
  `format` text NOT NULL COMMENT 'Country Format',
  PRIMARY KEY (`country_format_id`),
  UNIQUE KEY `UNQ_DIRECTORY_COUNTRY_FORMAT_COUNTRY_ID_TYPE` (`country_id`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Directory Country Format';


CREATE TABLE `directory_country_region` (
  `region_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Region Id',
  `country_id` varchar(4) NOT NULL DEFAULT '0' COMMENT 'Country Id in ISO-2',
  `code` varchar(32) DEFAULT NULL COMMENT 'Region code',
  `default_name` varchar(255) DEFAULT NULL COMMENT 'Region Name',
  PRIMARY KEY (`region_id`),
  KEY `IDX_DIRECTORY_COUNTRY_REGION_COUNTRY_ID` (`country_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Directory Country Region';

INSERT INTO `directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES
(1,	'US',	'AL',	'Alabama'),
(2,	'US',	'AK',	'Alaska'),
(3,	'US',	'AS',	'American Samoa'),
(4,	'US',	'AZ',	'Arizona'),
(5,	'US',	'AR',	'Arkansas'),
(6,	'US',	'AF',	'Armed Forces Africa'),
(7,	'US',	'AA',	'Armed Forces Americas'),
(8,	'US',	'AC',	'Armed Forces Canada'),
(9,	'US',	'AE',	'Armed Forces Europe'),
(10,	'US',	'AM',	'Armed Forces Middle East'),
(11,	'US',	'AP',	'Armed Forces Pacific'),
(12,	'US',	'CA',	'California'),
(13,	'US',	'CO',	'Colorado'),
(14,	'US',	'CT',	'Connecticut'),
(15,	'US',	'DE',	'Delaware'),
(16,	'US',	'DC',	'District of Columbia'),
(17,	'US',	'FM',	'Federated States Of Micronesia'),
(18,	'US',	'FL',	'Florida'),
(19,	'US',	'GA',	'Georgia'),
(20,	'US',	'GU',	'Guam'),
(21,	'US',	'HI',	'Hawaii'),
(22,	'US',	'ID',	'Idaho'),
(23,	'US',	'IL',	'Illinois'),
(24,	'US',	'IN',	'Indiana'),
(25,	'US',	'IA',	'Iowa'),
(26,	'US',	'KS',	'Kansas'),
(27,	'US',	'KY',	'Kentucky'),
(28,	'US',	'LA',	'Louisiana'),
(29,	'US',	'ME',	'Maine'),
(30,	'US',	'MH',	'Marshall Islands'),
(31,	'US',	'MD',	'Maryland'),
(32,	'US',	'MA',	'Massachusetts'),
(33,	'US',	'MI',	'Michigan'),
(34,	'US',	'MN',	'Minnesota'),
(35,	'US',	'MS',	'Mississippi'),
(36,	'US',	'MO',	'Missouri'),
(37,	'US',	'MT',	'Montana'),
(38,	'US',	'NE',	'Nebraska'),
(39,	'US',	'NV',	'Nevada'),
(40,	'US',	'NH',	'New Hampshire'),
(41,	'US',	'NJ',	'New Jersey'),
(42,	'US',	'NM',	'New Mexico'),
(43,	'US',	'NY',	'New York'),
(44,	'US',	'NC',	'North Carolina'),
(45,	'US',	'ND',	'North Dakota'),
(46,	'US',	'MP',	'Northern Mariana Islands'),
(47,	'US',	'OH',	'Ohio'),
(48,	'US',	'OK',	'Oklahoma'),
(49,	'US',	'OR',	'Oregon'),
(50,	'US',	'PW',	'Palau'),
(51,	'US',	'PA',	'Pennsylvania'),
(52,	'US',	'PR',	'Puerto Rico'),
(53,	'US',	'RI',	'Rhode Island'),
(54,	'US',	'SC',	'South Carolina'),
(55,	'US',	'SD',	'South Dakota'),
(56,	'US',	'TN',	'Tennessee'),
(57,	'US',	'TX',	'Texas'),
(58,	'US',	'UT',	'Utah'),
(59,	'US',	'VT',	'Vermont'),
(60,	'US',	'VI',	'Virgin Islands'),
(61,	'US',	'VA',	'Virginia'),
(62,	'US',	'WA',	'Washington'),
(63,	'US',	'WV',	'West Virginia'),
(64,	'US',	'WI',	'Wisconsin'),
(65,	'US',	'WY',	'Wyoming'),
(66,	'CA',	'AB',	'Alberta'),
(67,	'CA',	'BC',	'British Columbia'),
(68,	'CA',	'MB',	'Manitoba'),
(69,	'CA',	'NL',	'Newfoundland and Labrador'),
(70,	'CA',	'NB',	'New Brunswick'),
(71,	'CA',	'NS',	'Nova Scotia'),
(72,	'CA',	'NT',	'Northwest Territories'),
(73,	'CA',	'NU',	'Nunavut'),
(74,	'CA',	'ON',	'Ontario'),
(75,	'CA',	'PE',	'Prince Edward Island'),
(76,	'CA',	'QC',	'Quebec'),
(77,	'CA',	'SK',	'Saskatchewan'),
(78,	'CA',	'YT',	'Yukon Territory'),
(79,	'DE',	'NDS',	'Niedersachsen'),
(80,	'DE',	'BAW',	'Baden-Württemberg'),
(81,	'DE',	'BAY',	'Bayern'),
(82,	'DE',	'BER',	'Berlin'),
(83,	'DE',	'BRG',	'Brandenburg'),
(84,	'DE',	'BRE',	'Bremen'),
(85,	'DE',	'HAM',	'Hamburg'),
(86,	'DE',	'HES',	'Hessen'),
(87,	'DE',	'MEC',	'Mecklenburg-Vorpommern'),
(88,	'DE',	'NRW',	'Nordrhein-Westfalen'),
(89,	'DE',	'RHE',	'Rheinland-Pfalz'),
(90,	'DE',	'SAR',	'Saarland'),
(91,	'DE',	'SAS',	'Sachsen'),
(92,	'DE',	'SAC',	'Sachsen-Anhalt'),
(93,	'DE',	'SCN',	'Schleswig-Holstein'),
(94,	'DE',	'THE',	'Thüringen'),
(95,	'AT',	'WI',	'Wien'),
(96,	'AT',	'NO',	'Niederösterreich'),
(97,	'AT',	'OO',	'Oberösterreich'),
(98,	'AT',	'SB',	'Salzburg'),
(99,	'AT',	'KN',	'Kärnten'),
(100,	'AT',	'ST',	'Steiermark'),
(101,	'AT',	'TI',	'Tirol'),
(102,	'AT',	'BL',	'Burgenland'),
(103,	'AT',	'VB',	'Vorarlberg'),
(104,	'CH',	'AG',	'Aargau'),
(105,	'CH',	'AI',	'Appenzell Innerrhoden'),
(106,	'CH',	'AR',	'Appenzell Ausserrhoden'),
(107,	'CH',	'BE',	'Bern'),
(108,	'CH',	'BL',	'Basel-Landschaft'),
(109,	'CH',	'BS',	'Basel-Stadt'),
(110,	'CH',	'FR',	'Freiburg'),
(111,	'CH',	'GE',	'Genf'),
(112,	'CH',	'GL',	'Glarus'),
(113,	'CH',	'GR',	'Graubünden'),
(114,	'CH',	'JU',	'Jura'),
(115,	'CH',	'LU',	'Luzern'),
(116,	'CH',	'NE',	'Neuenburg'),
(117,	'CH',	'NW',	'Nidwalden'),
(118,	'CH',	'OW',	'Obwalden'),
(119,	'CH',	'SG',	'St. Gallen'),
(120,	'CH',	'SH',	'Schaffhausen'),
(121,	'CH',	'SO',	'Solothurn'),
(122,	'CH',	'SZ',	'Schwyz'),
(123,	'CH',	'TG',	'Thurgau'),
(124,	'CH',	'TI',	'Tessin'),
(125,	'CH',	'UR',	'Uri'),
(126,	'CH',	'VD',	'Waadt'),
(127,	'CH',	'VS',	'Wallis'),
(128,	'CH',	'ZG',	'Zug'),
(129,	'CH',	'ZH',	'Zürich'),
(130,	'ES',	'A Coruсa',	'A Coruña'),
(131,	'ES',	'Alava',	'Alava'),
(132,	'ES',	'Albacete',	'Albacete'),
(133,	'ES',	'Alicante',	'Alicante'),
(134,	'ES',	'Almeria',	'Almeria'),
(135,	'ES',	'Asturias',	'Asturias'),
(136,	'ES',	'Avila',	'Avila'),
(137,	'ES',	'Badajoz',	'Badajoz'),
(138,	'ES',	'Baleares',	'Baleares'),
(139,	'ES',	'Barcelona',	'Barcelona'),
(140,	'ES',	'Burgos',	'Burgos'),
(141,	'ES',	'Caceres',	'Caceres'),
(142,	'ES',	'Cadiz',	'Cadiz'),
(143,	'ES',	'Cantabria',	'Cantabria'),
(144,	'ES',	'Castellon',	'Castellon'),
(145,	'ES',	'Ceuta',	'Ceuta'),
(146,	'ES',	'Ciudad Real',	'Ciudad Real'),
(147,	'ES',	'Cordoba',	'Cordoba'),
(148,	'ES',	'Cuenca',	'Cuenca'),
(149,	'ES',	'Girona',	'Girona'),
(150,	'ES',	'Granada',	'Granada'),
(151,	'ES',	'Guadalajara',	'Guadalajara'),
(152,	'ES',	'Guipuzcoa',	'Guipuzcoa'),
(153,	'ES',	'Huelva',	'Huelva'),
(154,	'ES',	'Huesca',	'Huesca'),
(155,	'ES',	'Jaen',	'Jaen'),
(156,	'ES',	'La Rioja',	'La Rioja'),
(157,	'ES',	'Las Palmas',	'Las Palmas'),
(158,	'ES',	'Leon',	'Leon'),
(159,	'ES',	'Lleida',	'Lleida'),
(160,	'ES',	'Lugo',	'Lugo'),
(161,	'ES',	'Madrid',	'Madrid'),
(162,	'ES',	'Malaga',	'Malaga'),
(163,	'ES',	'Melilla',	'Melilla'),
(164,	'ES',	'Murcia',	'Murcia'),
(165,	'ES',	'Navarra',	'Navarra'),
(166,	'ES',	'Ourense',	'Ourense'),
(167,	'ES',	'Palencia',	'Palencia'),
(168,	'ES',	'Pontevedra',	'Pontevedra'),
(169,	'ES',	'Salamanca',	'Salamanca'),
(170,	'ES',	'Santa Cruz de Tenerife',	'Santa Cruz de Tenerife'),
(171,	'ES',	'Segovia',	'Segovia'),
(172,	'ES',	'Sevilla',	'Sevilla'),
(173,	'ES',	'Soria',	'Soria'),
(174,	'ES',	'Tarragona',	'Tarragona'),
(175,	'ES',	'Teruel',	'Teruel'),
(176,	'ES',	'Toledo',	'Toledo'),
(177,	'ES',	'Valencia',	'Valencia'),
(178,	'ES',	'Valladolid',	'Valladolid'),
(179,	'ES',	'Vizcaya',	'Vizcaya'),
(180,	'ES',	'Zamora',	'Zamora'),
(181,	'ES',	'Zaragoza',	'Zaragoza'),
(182,	'FR',	'1',	'Ain'),
(183,	'FR',	'2',	'Aisne'),
(184,	'FR',	'3',	'Allier'),
(185,	'FR',	'4',	'Alpes-de-Haute-Provence'),
(186,	'FR',	'5',	'Hautes-Alpes'),
(187,	'FR',	'6',	'Alpes-Maritimes'),
(188,	'FR',	'7',	'Ardèche'),
(189,	'FR',	'8',	'Ardennes'),
(190,	'FR',	'9',	'Ariège'),
(191,	'FR',	'10',	'Aube'),
(192,	'FR',	'11',	'Aude'),
(193,	'FR',	'12',	'Aveyron'),
(194,	'FR',	'13',	'Bouches-du-Rhône'),
(195,	'FR',	'14',	'Calvados'),
(196,	'FR',	'15',	'Cantal'),
(197,	'FR',	'16',	'Charente'),
(198,	'FR',	'17',	'Charente-Maritime'),
(199,	'FR',	'18',	'Cher'),
(200,	'FR',	'19',	'Corrèze'),
(201,	'FR',	'2A',	'Corse-du-Sud'),
(202,	'FR',	'2B',	'Haute-Corse'),
(203,	'FR',	'21',	'Côte-d\'Or'),
(204,	'FR',	'22',	'Côtes-d\'Armor'),
(205,	'FR',	'23',	'Creuse'),
(206,	'FR',	'24',	'Dordogne'),
(207,	'FR',	'25',	'Doubs'),
(208,	'FR',	'26',	'Drôme'),
(209,	'FR',	'27',	'Eure'),
(210,	'FR',	'28',	'Eure-et-Loir'),
(211,	'FR',	'29',	'Finistère'),
(212,	'FR',	'30',	'Gard'),
(213,	'FR',	'31',	'Haute-Garonne'),
(214,	'FR',	'32',	'Gers'),
(215,	'FR',	'33',	'Gironde'),
(216,	'FR',	'34',	'Hérault'),
(217,	'FR',	'35',	'Ille-et-Vilaine'),
(218,	'FR',	'36',	'Indre'),
(219,	'FR',	'37',	'Indre-et-Loire'),
(220,	'FR',	'38',	'Isère'),
(221,	'FR',	'39',	'Jura'),
(222,	'FR',	'40',	'Landes'),
(223,	'FR',	'41',	'Loir-et-Cher'),
(224,	'FR',	'42',	'Loire'),
(225,	'FR',	'43',	'Haute-Loire'),
(226,	'FR',	'44',	'Loire-Atlantique'),
(227,	'FR',	'45',	'Loiret'),
(228,	'FR',	'46',	'Lot'),
(229,	'FR',	'47',	'Lot-et-Garonne'),
(230,	'FR',	'48',	'Lozère'),
(231,	'FR',	'49',	'Maine-et-Loire'),
(232,	'FR',	'50',	'Manche'),
(233,	'FR',	'51',	'Marne'),
(234,	'FR',	'52',	'Haute-Marne'),
(235,	'FR',	'53',	'Mayenne'),
(236,	'FR',	'54',	'Meurthe-et-Moselle'),
(237,	'FR',	'55',	'Meuse'),
(238,	'FR',	'56',	'Morbihan'),
(239,	'FR',	'57',	'Moselle'),
(240,	'FR',	'58',	'Nièvre'),
(241,	'FR',	'59',	'Nord'),
(242,	'FR',	'60',	'Oise'),
(243,	'FR',	'61',	'Orne'),
(244,	'FR',	'62',	'Pas-de-Calais'),
(245,	'FR',	'63',	'Puy-de-Dôme'),
(246,	'FR',	'64',	'Pyrénées-Atlantiques'),
(247,	'FR',	'65',	'Hautes-Pyrénées'),
(248,	'FR',	'66',	'Pyrénées-Orientales'),
(249,	'FR',	'67',	'Bas-Rhin'),
(250,	'FR',	'68',	'Haut-Rhin'),
(251,	'FR',	'69',	'Rhône'),
(252,	'FR',	'70',	'Haute-Saône'),
(253,	'FR',	'71',	'Saône-et-Loire'),
(254,	'FR',	'72',	'Sarthe'),
(255,	'FR',	'73',	'Savoie'),
(256,	'FR',	'74',	'Haute-Savoie'),
(257,	'FR',	'75',	'Paris'),
(258,	'FR',	'76',	'Seine-Maritime'),
(259,	'FR',	'77',	'Seine-et-Marne'),
(260,	'FR',	'78',	'Yvelines'),
(261,	'FR',	'79',	'Deux-Sèvres'),
(262,	'FR',	'80',	'Somme'),
(263,	'FR',	'81',	'Tarn'),
(264,	'FR',	'82',	'Tarn-et-Garonne'),
(265,	'FR',	'83',	'Var'),
(266,	'FR',	'84',	'Vaucluse'),
(267,	'FR',	'85',	'Vendée'),
(268,	'FR',	'86',	'Vienne'),
(269,	'FR',	'87',	'Haute-Vienne'),
(270,	'FR',	'88',	'Vosges'),
(271,	'FR',	'89',	'Yonne'),
(272,	'FR',	'90',	'Territoire-de-Belfort'),
(273,	'FR',	'91',	'Essonne'),
(274,	'FR',	'92',	'Hauts-de-Seine'),
(275,	'FR',	'93',	'Seine-Saint-Denis'),
(276,	'FR',	'94',	'Val-de-Marne'),
(277,	'FR',	'95',	'Val-d\'Oise'),
(278,	'RO',	'AB',	'Alba'),
(279,	'RO',	'AR',	'Arad'),
(280,	'RO',	'AG',	'Argeş'),
(281,	'RO',	'BC',	'Bacău'),
(282,	'RO',	'BH',	'Bihor'),
(283,	'RO',	'BN',	'Bistriţa-Năsăud'),
(284,	'RO',	'BT',	'Botoşani'),
(285,	'RO',	'BV',	'Braşov'),
(286,	'RO',	'BR',	'Brăila'),
(287,	'RO',	'B',	'Bucureşti'),
(288,	'RO',	'BZ',	'Buzău'),
(289,	'RO',	'CS',	'Caraş-Severin'),
(290,	'RO',	'CL',	'Călăraşi'),
(291,	'RO',	'CJ',	'Cluj'),
(292,	'RO',	'CT',	'Constanţa'),
(293,	'RO',	'CV',	'Covasna'),
(294,	'RO',	'DB',	'Dâmboviţa'),
(295,	'RO',	'DJ',	'Dolj'),
(296,	'RO',	'GL',	'Galaţi'),
(297,	'RO',	'GR',	'Giurgiu'),
(298,	'RO',	'GJ',	'Gorj'),
(299,	'RO',	'HR',	'Harghita'),
(300,	'RO',	'HD',	'Hunedoara'),
(301,	'RO',	'IL',	'Ialomiţa'),
(302,	'RO',	'IS',	'Iaşi'),
(303,	'RO',	'IF',	'Ilfov'),
(304,	'RO',	'MM',	'Maramureş'),
(305,	'RO',	'MH',	'Mehedinţi'),
(306,	'RO',	'MS',	'Mureş'),
(307,	'RO',	'NT',	'Neamţ'),
(308,	'RO',	'OT',	'Olt'),
(309,	'RO',	'PH',	'Prahova'),
(310,	'RO',	'SM',	'Satu-Mare'),
(311,	'RO',	'SJ',	'Sălaj'),
(312,	'RO',	'SB',	'Sibiu'),
(313,	'RO',	'SV',	'Suceava'),
(314,	'RO',	'TR',	'Teleorman'),
(315,	'RO',	'TM',	'Timiş'),
(316,	'RO',	'TL',	'Tulcea'),
(317,	'RO',	'VS',	'Vaslui'),
(318,	'RO',	'VL',	'Vâlcea'),
(319,	'RO',	'VN',	'Vrancea'),
(320,	'FI',	'Lappi',	'Lappi'),
(321,	'FI',	'Pohjois-Pohjanmaa',	'Pohjois-Pohjanmaa'),
(322,	'FI',	'Kainuu',	'Kainuu'),
(323,	'FI',	'Pohjois-Karjala',	'Pohjois-Karjala'),
(324,	'FI',	'Pohjois-Savo',	'Pohjois-Savo'),
(325,	'FI',	'Etelä-Savo',	'Etelä-Savo'),
(326,	'FI',	'Etelä-Pohjanmaa',	'Etelä-Pohjanmaa'),
(327,	'FI',	'Pohjanmaa',	'Pohjanmaa'),
(328,	'FI',	'Pirkanmaa',	'Pirkanmaa'),
(329,	'FI',	'Satakunta',	'Satakunta'),
(330,	'FI',	'Keski-Pohjanmaa',	'Keski-Pohjanmaa'),
(331,	'FI',	'Keski-Suomi',	'Keski-Suomi'),
(332,	'FI',	'Varsinais-Suomi',	'Varsinais-Suomi'),
(333,	'FI',	'Etelä-Karjala',	'Etelä-Karjala'),
(334,	'FI',	'Päijät-Häme',	'Päijät-Häme'),
(335,	'FI',	'Kanta-Häme',	'Kanta-Häme'),
(336,	'FI',	'Uusimaa',	'Uusimaa'),
(337,	'FI',	'Itä-Uusimaa',	'Itä-Uusimaa'),
(338,	'FI',	'Kymenlaakso',	'Kymenlaakso'),
(339,	'FI',	'Ahvenanmaa',	'Ahvenanmaa'),
(340,	'EE',	'EE-37',	'Harjumaa'),
(341,	'EE',	'EE-39',	'Hiiumaa'),
(342,	'EE',	'EE-44',	'Ida-Virumaa'),
(343,	'EE',	'EE-49',	'Jõgevamaa'),
(344,	'EE',	'EE-51',	'Järvamaa'),
(345,	'EE',	'EE-57',	'Läänemaa'),
(346,	'EE',	'EE-59',	'Lääne-Virumaa'),
(347,	'EE',	'EE-65',	'Põlvamaa'),
(348,	'EE',	'EE-67',	'Pärnumaa'),
(349,	'EE',	'EE-70',	'Raplamaa'),
(350,	'EE',	'EE-74',	'Saaremaa'),
(351,	'EE',	'EE-78',	'Tartumaa'),
(352,	'EE',	'EE-82',	'Valgamaa'),
(353,	'EE',	'EE-84',	'Viljandimaa'),
(354,	'EE',	'EE-86',	'Võrumaa'),
(355,	'LV',	'LV-DGV',	'Daugavpils'),
(356,	'LV',	'LV-JEL',	'Jelgava'),
(357,	'LV',	'Jēkabpils',	'Jēkabpils'),
(358,	'LV',	'LV-JUR',	'Jūrmala'),
(359,	'LV',	'LV-LPX',	'Liepāja'),
(360,	'LV',	'LV-LE',	'Liepājas novads'),
(361,	'LV',	'LV-REZ',	'Rēzekne'),
(362,	'LV',	'LV-RIX',	'Rīga'),
(363,	'LV',	'LV-RI',	'Rīgas novads'),
(364,	'LV',	'Valmiera',	'Valmiera'),
(365,	'LV',	'LV-VEN',	'Ventspils'),
(366,	'LV',	'Aglonas novads',	'Aglonas novads'),
(367,	'LV',	'LV-AI',	'Aizkraukles novads'),
(368,	'LV',	'Aizputes novads',	'Aizputes novads'),
(369,	'LV',	'Aknīstes novads',	'Aknīstes novads'),
(370,	'LV',	'Alojas novads',	'Alojas novads'),
(371,	'LV',	'Alsungas novads',	'Alsungas novads'),
(372,	'LV',	'LV-AL',	'Alūksnes novads'),
(373,	'LV',	'Amatas novads',	'Amatas novads'),
(374,	'LV',	'Apes novads',	'Apes novads'),
(375,	'LV',	'Auces novads',	'Auces novads'),
(376,	'LV',	'Babītes novads',	'Babītes novads'),
(377,	'LV',	'Baldones novads',	'Baldones novads'),
(378,	'LV',	'Baltinavas novads',	'Baltinavas novads'),
(379,	'LV',	'LV-BL',	'Balvu novads'),
(380,	'LV',	'LV-BU',	'Bauskas novads'),
(381,	'LV',	'Beverīnas novads',	'Beverīnas novads'),
(382,	'LV',	'Brocēnu novads',	'Brocēnu novads'),
(383,	'LV',	'Burtnieku novads',	'Burtnieku novads'),
(384,	'LV',	'Carnikavas novads',	'Carnikavas novads'),
(385,	'LV',	'Cesvaines novads',	'Cesvaines novads'),
(386,	'LV',	'Ciblas novads',	'Ciblas novads'),
(387,	'LV',	'LV-CE',	'Cēsu novads'),
(388,	'LV',	'Dagdas novads',	'Dagdas novads'),
(389,	'LV',	'LV-DA',	'Daugavpils novads'),
(390,	'LV',	'LV-DO',	'Dobeles novads'),
(391,	'LV',	'Dundagas novads',	'Dundagas novads'),
(392,	'LV',	'Durbes novads',	'Durbes novads'),
(393,	'LV',	'Engures novads',	'Engures novads'),
(394,	'LV',	'Garkalnes novads',	'Garkalnes novads'),
(395,	'LV',	'Grobiņas novads',	'Grobiņas novads'),
(396,	'LV',	'LV-GU',	'Gulbenes novads'),
(397,	'LV',	'Iecavas novads',	'Iecavas novads'),
(398,	'LV',	'Ikšķiles novads',	'Ikšķiles novads'),
(399,	'LV',	'Ilūkstes novads',	'Ilūkstes novads'),
(400,	'LV',	'Inčukalna novads',	'Inčukalna novads'),
(401,	'LV',	'Jaunjelgavas novads',	'Jaunjelgavas novads'),
(402,	'LV',	'Jaunpiebalgas novads',	'Jaunpiebalgas novads'),
(403,	'LV',	'Jaunpils novads',	'Jaunpils novads'),
(404,	'LV',	'LV-JL',	'Jelgavas novads'),
(405,	'LV',	'LV-JK',	'Jēkabpils novads'),
(406,	'LV',	'Kandavas novads',	'Kandavas novads'),
(407,	'LV',	'Kokneses novads',	'Kokneses novads'),
(408,	'LV',	'Krimuldas novads',	'Krimuldas novads'),
(409,	'LV',	'Krustpils novads',	'Krustpils novads'),
(410,	'LV',	'LV-KR',	'Krāslavas novads'),
(411,	'LV',	'LV-KU',	'Kuldīgas novads'),
(412,	'LV',	'Kārsavas novads',	'Kārsavas novads'),
(413,	'LV',	'Lielvārdes novads',	'Lielvārdes novads'),
(414,	'LV',	'LV-LM',	'Limbažu novads'),
(415,	'LV',	'Lubānas novads',	'Lubānas novads'),
(416,	'LV',	'LV-LU',	'Ludzas novads'),
(417,	'LV',	'Līgatnes novads',	'Līgatnes novads'),
(418,	'LV',	'Līvānu novads',	'Līvānu novads'),
(419,	'LV',	'LV-MA',	'Madonas novads'),
(420,	'LV',	'Mazsalacas novads',	'Mazsalacas novads'),
(421,	'LV',	'Mālpils novads',	'Mālpils novads'),
(422,	'LV',	'Mārupes novads',	'Mārupes novads'),
(423,	'LV',	'Naukšēnu novads',	'Naukšēnu novads'),
(424,	'LV',	'Neretas novads',	'Neretas novads'),
(425,	'LV',	'Nīcas novads',	'Nīcas novads'),
(426,	'LV',	'LV-OG',	'Ogres novads'),
(427,	'LV',	'Olaines novads',	'Olaines novads'),
(428,	'LV',	'Ozolnieku novads',	'Ozolnieku novads'),
(429,	'LV',	'LV-PR',	'Preiļu novads'),
(430,	'LV',	'Priekules novads',	'Priekules novads'),
(431,	'LV',	'Priekuļu novads',	'Priekuļu novads'),
(432,	'LV',	'Pārgaujas novads',	'Pārgaujas novads'),
(433,	'LV',	'Pāvilostas novads',	'Pāvilostas novads'),
(434,	'LV',	'Pļaviņu novads',	'Pļaviņu novads'),
(435,	'LV',	'Raunas novads',	'Raunas novads'),
(436,	'LV',	'Riebiņu novads',	'Riebiņu novads'),
(437,	'LV',	'Rojas novads',	'Rojas novads'),
(438,	'LV',	'Ropažu novads',	'Ropažu novads'),
(439,	'LV',	'Rucavas novads',	'Rucavas novads'),
(440,	'LV',	'Rugāju novads',	'Rugāju novads'),
(441,	'LV',	'Rundāles novads',	'Rundāles novads'),
(442,	'LV',	'LV-RE',	'Rēzeknes novads'),
(443,	'LV',	'Rūjienas novads',	'Rūjienas novads'),
(444,	'LV',	'Salacgrīvas novads',	'Salacgrīvas novads'),
(445,	'LV',	'Salas novads',	'Salas novads'),
(446,	'LV',	'Salaspils novads',	'Salaspils novads'),
(447,	'LV',	'LV-SA',	'Saldus novads'),
(448,	'LV',	'Saulkrastu novads',	'Saulkrastu novads'),
(449,	'LV',	'Siguldas novads',	'Siguldas novads'),
(450,	'LV',	'Skrundas novads',	'Skrundas novads'),
(451,	'LV',	'Skrīveru novads',	'Skrīveru novads'),
(452,	'LV',	'Smiltenes novads',	'Smiltenes novads'),
(453,	'LV',	'Stopiņu novads',	'Stopiņu novads'),
(454,	'LV',	'Strenču novads',	'Strenču novads'),
(455,	'LV',	'Sējas novads',	'Sējas novads'),
(456,	'LV',	'LV-TA',	'Talsu novads'),
(457,	'LV',	'LV-TU',	'Tukuma novads'),
(458,	'LV',	'Tērvetes novads',	'Tērvetes novads'),
(459,	'LV',	'Vaiņodes novads',	'Vaiņodes novads'),
(460,	'LV',	'LV-VK',	'Valkas novads'),
(461,	'LV',	'LV-VM',	'Valmieras novads'),
(462,	'LV',	'Varakļānu novads',	'Varakļānu novads'),
(463,	'LV',	'Vecpiebalgas novads',	'Vecpiebalgas novads'),
(464,	'LV',	'Vecumnieku novads',	'Vecumnieku novads'),
(465,	'LV',	'LV-VE',	'Ventspils novads'),
(466,	'LV',	'Viesītes novads',	'Viesītes novads'),
(467,	'LV',	'Viļakas novads',	'Viļakas novads'),
(468,	'LV',	'Viļānu novads',	'Viļānu novads'),
(469,	'LV',	'Vārkavas novads',	'Vārkavas novads'),
(470,	'LV',	'Zilupes novads',	'Zilupes novads'),
(471,	'LV',	'Ādažu novads',	'Ādažu novads'),
(472,	'LV',	'Ērgļu novads',	'Ērgļu novads'),
(473,	'LV',	'Ķeguma novads',	'Ķeguma novads'),
(474,	'LV',	'Ķekavas novads',	'Ķekavas novads'),
(475,	'LT',	'LT-AL',	'Alytaus Apskritis'),
(476,	'LT',	'LT-KU',	'Kauno Apskritis'),
(477,	'LT',	'LT-KL',	'Klaipėdos Apskritis'),
(478,	'LT',	'LT-MR',	'Marijampolės Apskritis'),
(479,	'LT',	'LT-PN',	'Panevėžio Apskritis'),
(480,	'LT',	'LT-SA',	'Šiaulių Apskritis'),
(481,	'LT',	'LT-TA',	'Tauragės Apskritis'),
(482,	'LT',	'LT-TE',	'Telšių Apskritis'),
(483,	'LT',	'LT-UT',	'Utenos Apskritis'),
(484,	'LT',	'LT-VL',	'Vilniaus Apskritis');

CREATE TABLE `directory_country_region_name` (
  `locale` varchar(8) NOT NULL DEFAULT '' COMMENT 'Locale',
  `region_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Region Id',
  `name` varchar(255) DEFAULT NULL COMMENT 'Region Name',
  PRIMARY KEY (`locale`,`region_id`),
  KEY `IDX_DIRECTORY_COUNTRY_REGION_NAME_REGION_ID` (`region_id`),
  CONSTRAINT `FK_D7CFDEB379F775328EB6F62695E2B3E1` FOREIGN KEY (`region_id`) REFERENCES `directory_country_region` (`region_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Directory Country Region Name';

INSERT INTO `directory_country_region_name` (`locale`, `region_id`, `name`) VALUES
('en_US',	1,	'Alabama'),
('en_US',	2,	'Alaska'),
('en_US',	3,	'American Samoa'),
('en_US',	4,	'Arizona'),
('en_US',	5,	'Arkansas'),
('en_US',	6,	'Armed Forces Africa'),
('en_US',	7,	'Armed Forces Americas'),
('en_US',	8,	'Armed Forces Canada'),
('en_US',	9,	'Armed Forces Europe'),
('en_US',	10,	'Armed Forces Middle East'),
('en_US',	11,	'Armed Forces Pacific'),
('en_US',	12,	'California'),
('en_US',	13,	'Colorado'),
('en_US',	14,	'Connecticut'),
('en_US',	15,	'Delaware'),
('en_US',	16,	'District of Columbia'),
('en_US',	17,	'Federated States Of Micronesia'),
('en_US',	18,	'Florida'),
('en_US',	19,	'Georgia'),
('en_US',	20,	'Guam'),
('en_US',	21,	'Hawaii'),
('en_US',	22,	'Idaho'),
('en_US',	23,	'Illinois'),
('en_US',	24,	'Indiana'),
('en_US',	25,	'Iowa'),
('en_US',	26,	'Kansas'),
('en_US',	27,	'Kentucky'),
('en_US',	28,	'Louisiana'),
('en_US',	29,	'Maine'),
('en_US',	30,	'Marshall Islands'),
('en_US',	31,	'Maryland'),
('en_US',	32,	'Massachusetts'),
('en_US',	33,	'Michigan'),
('en_US',	34,	'Minnesota'),
('en_US',	35,	'Mississippi'),
('en_US',	36,	'Missouri'),
('en_US',	37,	'Montana'),
('en_US',	38,	'Nebraska'),
('en_US',	39,	'Nevada'),
('en_US',	40,	'New Hampshire'),
('en_US',	41,	'New Jersey'),
('en_US',	42,	'New Mexico'),
('en_US',	43,	'New York'),
('en_US',	44,	'North Carolina'),
('en_US',	45,	'North Dakota'),
('en_US',	46,	'Northern Mariana Islands'),
('en_US',	47,	'Ohio'),
('en_US',	48,	'Oklahoma'),
('en_US',	49,	'Oregon'),
('en_US',	50,	'Palau'),
('en_US',	51,	'Pennsylvania'),
('en_US',	52,	'Puerto Rico'),
('en_US',	53,	'Rhode Island'),
('en_US',	54,	'South Carolina'),
('en_US',	55,	'South Dakota'),
('en_US',	56,	'Tennessee'),
('en_US',	57,	'Texas'),
('en_US',	58,	'Utah'),
('en_US',	59,	'Vermont'),
('en_US',	60,	'Virgin Islands'),
('en_US',	61,	'Virginia'),
('en_US',	62,	'Washington'),
('en_US',	63,	'West Virginia'),
('en_US',	64,	'Wisconsin'),
('en_US',	65,	'Wyoming'),
('en_US',	66,	'Alberta'),
('en_US',	67,	'British Columbia'),
('en_US',	68,	'Manitoba'),
('en_US',	69,	'Newfoundland and Labrador'),
('en_US',	70,	'New Brunswick'),
('en_US',	71,	'Nova Scotia'),
('en_US',	72,	'Northwest Territories'),
('en_US',	73,	'Nunavut'),
('en_US',	74,	'Ontario'),
('en_US',	75,	'Prince Edward Island'),
('en_US',	76,	'Quebec'),
('en_US',	77,	'Saskatchewan'),
('en_US',	78,	'Yukon Territory'),
('en_US',	79,	'Niedersachsen'),
('en_US',	80,	'Baden-Württemberg'),
('en_US',	81,	'Bayern'),
('en_US',	82,	'Berlin'),
('en_US',	83,	'Brandenburg'),
('en_US',	84,	'Bremen'),
('en_US',	85,	'Hamburg'),
('en_US',	86,	'Hessen'),
('en_US',	87,	'Mecklenburg-Vorpommern'),
('en_US',	88,	'Nordrhein-Westfalen'),
('en_US',	89,	'Rheinland-Pfalz'),
('en_US',	90,	'Saarland'),
('en_US',	91,	'Sachsen'),
('en_US',	92,	'Sachsen-Anhalt'),
('en_US',	93,	'Schleswig-Holstein'),
('en_US',	94,	'Thüringen'),
('en_US',	95,	'Wien'),
('en_US',	96,	'Niederösterreich'),
('en_US',	97,	'Oberösterreich'),
('en_US',	98,	'Salzburg'),
('en_US',	99,	'Kärnten'),
('en_US',	100,	'Steiermark'),
('en_US',	101,	'Tirol'),
('en_US',	102,	'Burgenland'),
('en_US',	103,	'Vorarlberg'),
('en_US',	104,	'Aargau'),
('en_US',	105,	'Appenzell Innerrhoden'),
('en_US',	106,	'Appenzell Ausserrhoden'),
('en_US',	107,	'Bern'),
('en_US',	108,	'Basel-Landschaft'),
('en_US',	109,	'Basel-Stadt'),
('en_US',	110,	'Freiburg'),
('en_US',	111,	'Genf'),
('en_US',	112,	'Glarus'),
('en_US',	113,	'Graubünden'),
('en_US',	114,	'Jura'),
('en_US',	115,	'Luzern'),
('en_US',	116,	'Neuenburg'),
('en_US',	117,	'Nidwalden'),
('en_US',	118,	'Obwalden'),
('en_US',	119,	'St. Gallen'),
('en_US',	120,	'Schaffhausen'),
('en_US',	121,	'Solothurn'),
('en_US',	122,	'Schwyz'),
('en_US',	123,	'Thurgau'),
('en_US',	124,	'Tessin'),
('en_US',	125,	'Uri'),
('en_US',	126,	'Waadt'),
('en_US',	127,	'Wallis'),
('en_US',	128,	'Zug'),
('en_US',	129,	'Zürich'),
('en_US',	130,	'A Coruña'),
('en_US',	131,	'Alava'),
('en_US',	132,	'Albacete'),
('en_US',	133,	'Alicante'),
('en_US',	134,	'Almeria'),
('en_US',	135,	'Asturias'),
('en_US',	136,	'Avila'),
('en_US',	137,	'Badajoz'),
('en_US',	138,	'Baleares'),
('en_US',	139,	'Barcelona'),
('en_US',	140,	'Burgos'),
('en_US',	141,	'Caceres'),
('en_US',	142,	'Cadiz'),
('en_US',	143,	'Cantabria'),
('en_US',	144,	'Castellon'),
('en_US',	145,	'Ceuta'),
('en_US',	146,	'Ciudad Real'),
('en_US',	147,	'Cordoba'),
('en_US',	148,	'Cuenca'),
('en_US',	149,	'Girona'),
('en_US',	150,	'Granada'),
('en_US',	151,	'Guadalajara'),
('en_US',	152,	'Guipuzcoa'),
('en_US',	153,	'Huelva'),
('en_US',	154,	'Huesca'),
('en_US',	155,	'Jaen'),
('en_US',	156,	'La Rioja'),
('en_US',	157,	'Las Palmas'),
('en_US',	158,	'Leon'),
('en_US',	159,	'Lleida'),
('en_US',	160,	'Lugo'),
('en_US',	161,	'Madrid'),
('en_US',	162,	'Malaga'),
('en_US',	163,	'Melilla'),
('en_US',	164,	'Murcia'),
('en_US',	165,	'Navarra'),
('en_US',	166,	'Ourense'),
('en_US',	167,	'Palencia'),
('en_US',	168,	'Pontevedra'),
('en_US',	169,	'Salamanca'),
('en_US',	170,	'Santa Cruz de Tenerife'),
('en_US',	171,	'Segovia'),
('en_US',	172,	'Sevilla'),
('en_US',	173,	'Soria'),
('en_US',	174,	'Tarragona'),
('en_US',	175,	'Teruel'),
('en_US',	176,	'Toledo'),
('en_US',	177,	'Valencia'),
('en_US',	178,	'Valladolid'),
('en_US',	179,	'Vizcaya'),
('en_US',	180,	'Zamora'),
('en_US',	181,	'Zaragoza'),
('en_US',	182,	'Ain'),
('en_US',	183,	'Aisne'),
('en_US',	184,	'Allier'),
('en_US',	185,	'Alpes-de-Haute-Provence'),
('en_US',	186,	'Hautes-Alpes'),
('en_US',	187,	'Alpes-Maritimes'),
('en_US',	188,	'Ardèche'),
('en_US',	189,	'Ardennes'),
('en_US',	190,	'Ariège'),
('en_US',	191,	'Aube'),
('en_US',	192,	'Aude'),
('en_US',	193,	'Aveyron'),
('en_US',	194,	'Bouches-du-Rhône'),
('en_US',	195,	'Calvados'),
('en_US',	196,	'Cantal'),
('en_US',	197,	'Charente'),
('en_US',	198,	'Charente-Maritime'),
('en_US',	199,	'Cher'),
('en_US',	200,	'Corrèze'),
('en_US',	201,	'Corse-du-Sud'),
('en_US',	202,	'Haute-Corse'),
('en_US',	203,	'Côte-d\'Or'),
('en_US',	204,	'Côtes-d\'Armor'),
('en_US',	205,	'Creuse'),
('en_US',	206,	'Dordogne'),
('en_US',	207,	'Doubs'),
('en_US',	208,	'Drôme'),
('en_US',	209,	'Eure'),
('en_US',	210,	'Eure-et-Loir'),
('en_US',	211,	'Finistère'),
('en_US',	212,	'Gard'),
('en_US',	213,	'Haute-Garonne'),
('en_US',	214,	'Gers'),
('en_US',	215,	'Gironde'),
('en_US',	216,	'Hérault'),
('en_US',	217,	'Ille-et-Vilaine'),
('en_US',	218,	'Indre'),
('en_US',	219,	'Indre-et-Loire'),
('en_US',	220,	'Isère'),
('en_US',	221,	'Jura'),
('en_US',	222,	'Landes'),
('en_US',	223,	'Loir-et-Cher'),
('en_US',	224,	'Loire'),
('en_US',	225,	'Haute-Loire'),
('en_US',	226,	'Loire-Atlantique'),
('en_US',	227,	'Loiret'),
('en_US',	228,	'Lot'),
('en_US',	229,	'Lot-et-Garonne'),
('en_US',	230,	'Lozère'),
('en_US',	231,	'Maine-et-Loire'),
('en_US',	232,	'Manche'),
('en_US',	233,	'Marne'),
('en_US',	234,	'Haute-Marne'),
('en_US',	235,	'Mayenne'),
('en_US',	236,	'Meurthe-et-Moselle'),
('en_US',	237,	'Meuse'),
('en_US',	238,	'Morbihan'),
('en_US',	239,	'Moselle'),
('en_US',	240,	'Nièvre'),
('en_US',	241,	'Nord'),
('en_US',	242,	'Oise'),
('en_US',	243,	'Orne'),
('en_US',	244,	'Pas-de-Calais'),
('en_US',	245,	'Puy-de-Dôme'),
('en_US',	246,	'Pyrénées-Atlantiques'),
('en_US',	247,	'Hautes-Pyrénées'),
('en_US',	248,	'Pyrénées-Orientales'),
('en_US',	249,	'Bas-Rhin'),
('en_US',	250,	'Haut-Rhin'),
('en_US',	251,	'Rhône'),
('en_US',	252,	'Haute-Saône'),
('en_US',	253,	'Saône-et-Loire'),
('en_US',	254,	'Sarthe'),
('en_US',	255,	'Savoie'),
('en_US',	256,	'Haute-Savoie'),
('en_US',	257,	'Paris'),
('en_US',	258,	'Seine-Maritime'),
('en_US',	259,	'Seine-et-Marne'),
('en_US',	260,	'Yvelines'),
('en_US',	261,	'Deux-Sèvres'),
('en_US',	262,	'Somme'),
('en_US',	263,	'Tarn'),
('en_US',	264,	'Tarn-et-Garonne'),
('en_US',	265,	'Var'),
('en_US',	266,	'Vaucluse'),
('en_US',	267,	'Vendée'),
('en_US',	268,	'Vienne'),
('en_US',	269,	'Haute-Vienne'),
('en_US',	270,	'Vosges'),
('en_US',	271,	'Yonne'),
('en_US',	272,	'Territoire-de-Belfort'),
('en_US',	273,	'Essonne'),
('en_US',	274,	'Hauts-de-Seine'),
('en_US',	275,	'Seine-Saint-Denis'),
('en_US',	276,	'Val-de-Marne'),
('en_US',	277,	'Val-d\'Oise'),
('en_US',	278,	'Alba'),
('en_US',	279,	'Arad'),
('en_US',	280,	'Argeş'),
('en_US',	281,	'Bacău'),
('en_US',	282,	'Bihor'),
('en_US',	283,	'Bistriţa-Năsăud'),
('en_US',	284,	'Botoşani'),
('en_US',	285,	'Braşov'),
('en_US',	286,	'Brăila'),
('en_US',	287,	'Bucureşti'),
('en_US',	288,	'Buzău'),
('en_US',	289,	'Caraş-Severin'),
('en_US',	290,	'Călăraşi'),
('en_US',	291,	'Cluj'),
('en_US',	292,	'Constanţa'),
('en_US',	293,	'Covasna'),
('en_US',	294,	'Dâmboviţa'),
('en_US',	295,	'Dolj'),
('en_US',	296,	'Galaţi'),
('en_US',	297,	'Giurgiu'),
('en_US',	298,	'Gorj'),
('en_US',	299,	'Harghita'),
('en_US',	300,	'Hunedoara'),
('en_US',	301,	'Ialomiţa'),
('en_US',	302,	'Iaşi'),
('en_US',	303,	'Ilfov'),
('en_US',	304,	'Maramureş'),
('en_US',	305,	'Mehedinţi'),
('en_US',	306,	'Mureş'),
('en_US',	307,	'Neamţ'),
('en_US',	308,	'Olt'),
('en_US',	309,	'Prahova'),
('en_US',	310,	'Satu-Mare'),
('en_US',	311,	'Sălaj'),
('en_US',	312,	'Sibiu'),
('en_US',	313,	'Suceava'),
('en_US',	314,	'Teleorman'),
('en_US',	315,	'Timiş'),
('en_US',	316,	'Tulcea'),
('en_US',	317,	'Vaslui'),
('en_US',	318,	'Vâlcea'),
('en_US',	319,	'Vrancea'),
('en_US',	320,	'Lappi'),
('en_US',	321,	'Pohjois-Pohjanmaa'),
('en_US',	322,	'Kainuu'),
('en_US',	323,	'Pohjois-Karjala'),
('en_US',	324,	'Pohjois-Savo'),
('en_US',	325,	'Etelä-Savo'),
('en_US',	326,	'Etelä-Pohjanmaa'),
('en_US',	327,	'Pohjanmaa'),
('en_US',	328,	'Pirkanmaa'),
('en_US',	329,	'Satakunta'),
('en_US',	330,	'Keski-Pohjanmaa'),
('en_US',	331,	'Keski-Suomi'),
('en_US',	332,	'Varsinais-Suomi'),
('en_US',	333,	'Etelä-Karjala'),
('en_US',	334,	'Päijät-Häme'),
('en_US',	335,	'Kanta-Häme'),
('en_US',	336,	'Uusimaa'),
('en_US',	337,	'Itä-Uusimaa'),
('en_US',	338,	'Kymenlaakso'),
('en_US',	339,	'Ahvenanmaa'),
('en_US',	340,	'Harjumaa'),
('en_US',	341,	'Hiiumaa'),
('en_US',	342,	'Ida-Virumaa'),
('en_US',	343,	'Jõgevamaa'),
('en_US',	344,	'Järvamaa'),
('en_US',	345,	'Läänemaa'),
('en_US',	346,	'Lääne-Virumaa'),
('en_US',	347,	'Põlvamaa'),
('en_US',	348,	'Pärnumaa'),
('en_US',	349,	'Raplamaa'),
('en_US',	350,	'Saaremaa'),
('en_US',	351,	'Tartumaa'),
('en_US',	352,	'Valgamaa'),
('en_US',	353,	'Viljandimaa'),
('en_US',	354,	'Võrumaa'),
('en_US',	355,	'Daugavpils'),
('en_US',	356,	'Jelgava'),
('en_US',	357,	'Jēkabpils'),
('en_US',	358,	'Jūrmala'),
('en_US',	359,	'Liepāja'),
('en_US',	360,	'Liepājas novads'),
('en_US',	361,	'Rēzekne'),
('en_US',	362,	'Rīga'),
('en_US',	363,	'Rīgas novads'),
('en_US',	364,	'Valmiera'),
('en_US',	365,	'Ventspils'),
('en_US',	366,	'Aglonas novads'),
('en_US',	367,	'Aizkraukles novads'),
('en_US',	368,	'Aizputes novads'),
('en_US',	369,	'Aknīstes novads'),
('en_US',	370,	'Alojas novads'),
('en_US',	371,	'Alsungas novads'),
('en_US',	372,	'Alūksnes novads'),
('en_US',	373,	'Amatas novads'),
('en_US',	374,	'Apes novads'),
('en_US',	375,	'Auces novads'),
('en_US',	376,	'Babītes novads'),
('en_US',	377,	'Baldones novads'),
('en_US',	378,	'Baltinavas novads'),
('en_US',	379,	'Balvu novads'),
('en_US',	380,	'Bauskas novads'),
('en_US',	381,	'Beverīnas novads'),
('en_US',	382,	'Brocēnu novads'),
('en_US',	383,	'Burtnieku novads'),
('en_US',	384,	'Carnikavas novads'),
('en_US',	385,	'Cesvaines novads'),
('en_US',	386,	'Ciblas novads'),
('en_US',	387,	'Cēsu novads'),
('en_US',	388,	'Dagdas novads'),
('en_US',	389,	'Daugavpils novads'),
('en_US',	390,	'Dobeles novads'),
('en_US',	391,	'Dundagas novads'),
('en_US',	392,	'Durbes novads'),
('en_US',	393,	'Engures novads'),
('en_US',	394,	'Garkalnes novads'),
('en_US',	395,	'Grobiņas novads'),
('en_US',	396,	'Gulbenes novads'),
('en_US',	397,	'Iecavas novads'),
('en_US',	398,	'Ikšķiles novads'),
('en_US',	399,	'Ilūkstes novads'),
('en_US',	400,	'Inčukalna novads'),
('en_US',	401,	'Jaunjelgavas novads'),
('en_US',	402,	'Jaunpiebalgas novads'),
('en_US',	403,	'Jaunpils novads'),
('en_US',	404,	'Jelgavas novads'),
('en_US',	405,	'Jēkabpils novads'),
('en_US',	406,	'Kandavas novads'),
('en_US',	407,	'Kokneses novads'),
('en_US',	408,	'Krimuldas novads'),
('en_US',	409,	'Krustpils novads'),
('en_US',	410,	'Krāslavas novads'),
('en_US',	411,	'Kuldīgas novads'),
('en_US',	412,	'Kārsavas novads'),
('en_US',	413,	'Lielvārdes novads'),
('en_US',	414,	'Limbažu novads'),
('en_US',	415,	'Lubānas novads'),
('en_US',	416,	'Ludzas novads'),
('en_US',	417,	'Līgatnes novads'),
('en_US',	418,	'Līvānu novads'),
('en_US',	419,	'Madonas novads'),
('en_US',	420,	'Mazsalacas novads'),
('en_US',	421,	'Mālpils novads'),
('en_US',	422,	'Mārupes novads'),
('en_US',	423,	'Naukšēnu novads'),
('en_US',	424,	'Neretas novads'),
('en_US',	425,	'Nīcas novads'),
('en_US',	426,	'Ogres novads'),
('en_US',	427,	'Olaines novads'),
('en_US',	428,	'Ozolnieku novads'),
('en_US',	429,	'Preiļu novads'),
('en_US',	430,	'Priekules novads'),
('en_US',	431,	'Priekuļu novads'),
('en_US',	432,	'Pārgaujas novads'),
('en_US',	433,	'Pāvilostas novads'),
('en_US',	434,	'Pļaviņu novads'),
('en_US',	435,	'Raunas novads'),
('en_US',	436,	'Riebiņu novads'),
('en_US',	437,	'Rojas novads'),
('en_US',	438,	'Ropažu novads'),
('en_US',	439,	'Rucavas novads'),
('en_US',	440,	'Rugāju novads'),
('en_US',	441,	'Rundāles novads'),
('en_US',	442,	'Rēzeknes novads'),
('en_US',	443,	'Rūjienas novads'),
('en_US',	444,	'Salacgrīvas novads'),
('en_US',	445,	'Salas novads'),
('en_US',	446,	'Salaspils novads'),
('en_US',	447,	'Saldus novads'),
('en_US',	448,	'Saulkrastu novads'),
('en_US',	449,	'Siguldas novads'),
('en_US',	450,	'Skrundas novads'),
('en_US',	451,	'Skrīveru novads'),
('en_US',	452,	'Smiltenes novads'),
('en_US',	453,	'Stopiņu novads'),
('en_US',	454,	'Strenču novads'),
('en_US',	455,	'Sējas novads'),
('en_US',	456,	'Talsu novads'),
('en_US',	457,	'Tukuma novads'),
('en_US',	458,	'Tērvetes novads'),
('en_US',	459,	'Vaiņodes novads'),
('en_US',	460,	'Valkas novads'),
('en_US',	461,	'Valmieras novads'),
('en_US',	462,	'Varakļānu novads'),
('en_US',	463,	'Vecpiebalgas novads'),
('en_US',	464,	'Vecumnieku novads'),
('en_US',	465,	'Ventspils novads'),
('en_US',	466,	'Viesītes novads'),
('en_US',	467,	'Viļakas novads'),
('en_US',	468,	'Viļānu novads'),
('en_US',	469,	'Vārkavas novads'),
('en_US',	470,	'Zilupes novads'),
('en_US',	471,	'Ādažu novads'),
('en_US',	472,	'Ērgļu novads'),
('en_US',	473,	'Ķeguma novads'),
('en_US',	474,	'Ķekavas novads'),
('en_US',	475,	'Alytaus Apskritis'),
('en_US',	476,	'Kauno Apskritis'),
('en_US',	477,	'Klaipėdos Apskritis'),
('en_US',	478,	'Marijampolės Apskritis'),
('en_US',	479,	'Panevėžio Apskritis'),
('en_US',	480,	'Šiaulių Apskritis'),
('en_US',	481,	'Tauragės Apskritis'),
('en_US',	482,	'Telšių Apskritis'),
('en_US',	483,	'Utenos Apskritis'),
('en_US',	484,	'Vilniaus Apskritis');

CREATE TABLE `directory_currency_rate` (
  `currency_from` varchar(3) NOT NULL DEFAULT '' COMMENT 'Currency Code Convert From',
  `currency_to` varchar(3) NOT NULL DEFAULT '' COMMENT 'Currency Code Convert To',
  `rate` decimal(24,12) NOT NULL DEFAULT '0.000000000000' COMMENT 'Currency Conversion Rate',
  PRIMARY KEY (`currency_from`,`currency_to`),
  KEY `IDX_DIRECTORY_CURRENCY_RATE_CURRENCY_TO` (`currency_to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Directory Currency Rate';

INSERT INTO `directory_currency_rate` (`currency_from`, `currency_to`, `rate`) VALUES
('EUR',	'EUR',	1.000000000000),
('EUR',	'USD',	1.415000000000),
('USD',	'EUR',	0.706700000000),
('USD',	'USD',	1.000000000000);

CREATE TABLE `downloadable_link` (
  `link_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Link ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `sort_order` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort order',
  `number_of_downloads` int(11) DEFAULT NULL COMMENT 'Number of downloads',
  `is_shareable` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Shareable flag',
  `link_url` varchar(255) DEFAULT NULL COMMENT 'Link Url',
  `link_file` varchar(255) DEFAULT NULL COMMENT 'Link File',
  `link_type` varchar(20) DEFAULT NULL COMMENT 'Link Type',
  `sample_url` varchar(255) DEFAULT NULL COMMENT 'Sample Url',
  `sample_file` varchar(255) DEFAULT NULL COMMENT 'Sample File',
  `sample_type` varchar(20) DEFAULT NULL COMMENT 'Sample Type',
  PRIMARY KEY (`link_id`),
  KEY `IDX_DOWNLOADABLE_LINK_PRODUCT_ID` (`product_id`),
  KEY `IDX_DOWNLOADABLE_LINK_PRODUCT_ID_SORT_ORDER` (`product_id`,`sort_order`),
  CONSTRAINT `FK_DOWNLOADABLE_LINK_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Downloadable Link Table';


CREATE TABLE `downloadable_link_price` (
  `price_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Price ID',
  `link_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Link ID',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  PRIMARY KEY (`price_id`),
  KEY `IDX_DOWNLOADABLE_LINK_PRICE_LINK_ID` (`link_id`),
  KEY `IDX_DOWNLOADABLE_LINK_PRICE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_DOWNLOADABLE_LINK_PRICE_LINK_ID_DOWNLOADABLE_LINK_LINK_ID` FOREIGN KEY (`link_id`) REFERENCES `downloadable_link` (`link_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_DOWNLOADABLE_LINK_PRICE_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Downloadable Link Price Table';


CREATE TABLE `downloadable_link_purchased` (
  `purchased_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Purchased ID',
  `order_id` int(10) unsigned DEFAULT '0' COMMENT 'Order ID',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment ID',
  `order_item_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Order Item ID',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Date of creation',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Date of modification',
  `customer_id` int(10) unsigned DEFAULT '0' COMMENT 'Customer ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product name',
  `product_sku` varchar(255) DEFAULT NULL COMMENT 'Product sku',
  `link_section_title` varchar(255) DEFAULT NULL COMMENT 'Link_section_title',
  PRIMARY KEY (`purchased_id`),
  KEY `IDX_DOWNLOADABLE_LINK_PURCHASED_ORDER_ID` (`order_id`),
  KEY `IDX_DOWNLOADABLE_LINK_PURCHASED_ORDER_ITEM_ID` (`order_item_id`),
  KEY `IDX_DOWNLOADABLE_LINK_PURCHASED_CUSTOMER_ID` (`customer_id`),
  CONSTRAINT `FK_DL_LNK_PURCHASED_CSTR_ID_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_DL_LNK_PURCHASED_ORDER_ID_SALES_FLAT_ORDER_ENTT_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Downloadable Link Purchased Table';


CREATE TABLE `downloadable_link_purchased_item` (
  `item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Item ID',
  `purchased_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Purchased ID',
  `order_item_id` int(10) unsigned DEFAULT '0' COMMENT 'Order Item ID',
  `product_id` int(10) unsigned DEFAULT '0' COMMENT 'Product ID',
  `link_hash` varchar(255) DEFAULT NULL COMMENT 'Link hash',
  `number_of_downloads_bought` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Number of downloads bought',
  `number_of_downloads_used` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Number of downloads used',
  `link_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Link ID',
  `link_title` varchar(255) DEFAULT NULL COMMENT 'Link Title',
  `is_shareable` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Shareable Flag',
  `link_url` varchar(255) DEFAULT NULL COMMENT 'Link Url',
  `link_file` varchar(255) DEFAULT NULL COMMENT 'Link File',
  `link_type` varchar(255) DEFAULT NULL COMMENT 'Link Type',
  `status` varchar(50) DEFAULT NULL COMMENT 'Status',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Creation Time',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Update Time',
  PRIMARY KEY (`item_id`),
  KEY `IDX_DOWNLOADABLE_LINK_PURCHASED_ITEM_LINK_HASH` (`link_hash`),
  KEY `IDX_DOWNLOADABLE_LINK_PURCHASED_ITEM_ORDER_ITEM_ID` (`order_item_id`),
  KEY `IDX_DOWNLOADABLE_LINK_PURCHASED_ITEM_PURCHASED_ID` (`purchased_id`),
  CONSTRAINT `FK_46CC8E252307CE62F00A8F1887512A39` FOREIGN KEY (`purchased_id`) REFERENCES `downloadable_link_purchased` (`purchased_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_B219BF25756700DEE44550B21220ECCE` FOREIGN KEY (`order_item_id`) REFERENCES `sales_flat_order_item` (`item_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Downloadable Link Purchased Item Table';


CREATE TABLE `downloadable_link_title` (
  `title_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Title ID',
  `link_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Link ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  PRIMARY KEY (`title_id`),
  UNIQUE KEY `UNQ_DOWNLOADABLE_LINK_TITLE_LINK_ID_STORE_ID` (`link_id`,`store_id`),
  KEY `IDX_DOWNLOADABLE_LINK_TITLE_LINK_ID` (`link_id`),
  KEY `IDX_DOWNLOADABLE_LINK_TITLE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_DOWNLOADABLE_LINK_TITLE_LINK_ID_DOWNLOADABLE_LINK_LINK_ID` FOREIGN KEY (`link_id`) REFERENCES `downloadable_link` (`link_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_DOWNLOADABLE_LINK_TITLE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Link Title Table';


CREATE TABLE `downloadable_sample` (
  `sample_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Sample ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `sample_url` varchar(255) DEFAULT NULL COMMENT 'Sample URL',
  `sample_file` varchar(255) DEFAULT NULL COMMENT 'Sample file',
  `sample_type` varchar(20) DEFAULT NULL COMMENT 'Sample Type',
  `sort_order` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  PRIMARY KEY (`sample_id`),
  KEY `IDX_DOWNLOADABLE_SAMPLE_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_DL_SAMPLE_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Downloadable Sample Table';


CREATE TABLE `downloadable_sample_title` (
  `title_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Title ID',
  `sample_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sample ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  PRIMARY KEY (`title_id`),
  UNIQUE KEY `UNQ_DOWNLOADABLE_SAMPLE_TITLE_SAMPLE_ID_STORE_ID` (`sample_id`,`store_id`),
  KEY `IDX_DOWNLOADABLE_SAMPLE_TITLE_SAMPLE_ID` (`sample_id`),
  KEY `IDX_DOWNLOADABLE_SAMPLE_TITLE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_DL_SAMPLE_TTL_SAMPLE_ID_DL_SAMPLE_SAMPLE_ID` FOREIGN KEY (`sample_id`) REFERENCES `downloadable_sample` (`sample_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_DOWNLOADABLE_SAMPLE_TITLE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Downloadable Sample Title Table';


CREATE TABLE `eav_attribute` (
  `attribute_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Attribute Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `attribute_code` varchar(255) DEFAULT NULL COMMENT 'Attribute Code',
  `attribute_model` varchar(255) DEFAULT NULL COMMENT 'Attribute Model',
  `backend_model` varchar(255) DEFAULT NULL COMMENT 'Backend Model',
  `backend_type` varchar(8) NOT NULL DEFAULT 'static' COMMENT 'Backend Type',
  `backend_table` varchar(255) DEFAULT NULL COMMENT 'Backend Table',
  `frontend_model` varchar(255) DEFAULT NULL COMMENT 'Frontend Model',
  `frontend_input` varchar(50) DEFAULT NULL COMMENT 'Frontend Input',
  `frontend_label` varchar(255) DEFAULT NULL COMMENT 'Frontend Label',
  `frontend_class` varchar(255) DEFAULT NULL COMMENT 'Frontend Class',
  `source_model` varchar(255) DEFAULT NULL COMMENT 'Source Model',
  `is_required` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Defines Is Required',
  `is_user_defined` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Defines Is User Defined',
  `default_value` text COMMENT 'Default Value',
  `is_unique` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Defines Is Unique',
  `note` varchar(255) DEFAULT NULL COMMENT 'Note',
  PRIMARY KEY (`attribute_id`),
  UNIQUE KEY `UNQ_EAV_ATTRIBUTE_ENTITY_TYPE_ID_ATTRIBUTE_CODE` (`entity_type_id`,`attribute_code`),
  KEY `IDX_EAV_ATTRIBUTE_ENTITY_TYPE_ID` (`entity_type_id`),
  CONSTRAINT `FK_EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Attribute';

INSERT INTO `eav_attribute` (`attribute_id`, `entity_type_id`, `attribute_code`, `attribute_model`, `backend_model`, `backend_type`, `backend_table`, `frontend_model`, `frontend_input`, `frontend_label`, `frontend_class`, `source_model`, `is_required`, `is_user_defined`, `default_value`, `is_unique`, `note`) VALUES
(1,	1,	'website_id',	NULL,	'customer/customer_attribute_backend_website',	'static',	NULL,	NULL,	'select',	'Associate to Website',	NULL,	'customer/customer_attribute_source_website',	1,	0,	NULL,	0,	NULL),
(2,	1,	'store_id',	NULL,	'customer/customer_attribute_backend_store',	'static',	NULL,	NULL,	'select',	'Create In',	NULL,	'customer/customer_attribute_source_store',	1,	0,	NULL,	0,	NULL),
(3,	1,	'created_in',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Created From',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(4,	1,	'prefix',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Prefix',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(5,	1,	'firstname',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'First Name',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(6,	1,	'middlename',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Middle Name/Initial',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(7,	1,	'lastname',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Last Name',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(8,	1,	'suffix',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Suffix',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(9,	1,	'email',	NULL,	NULL,	'static',	NULL,	NULL,	'text',	'Email',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(10,	1,	'group_id',	NULL,	NULL,	'static',	NULL,	NULL,	'select',	'Group',	NULL,	'customer/customer_attribute_source_group',	1,	0,	NULL,	0,	NULL),
(11,	1,	'dob',	NULL,	'eav/entity_attribute_backend_datetime',	'datetime',	NULL,	'eav/entity_attribute_frontend_datetime',	'date',	'Date Of Birth',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(12,	1,	'password_hash',	NULL,	'customer/customer_attribute_backend_password',	'varchar',	NULL,	NULL,	'hidden',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(13,	1,	'default_billing',	NULL,	'customer/customer_attribute_backend_billing',	'int',	NULL,	NULL,	'text',	'Default Billing Address',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(14,	1,	'default_shipping',	NULL,	'customer/customer_attribute_backend_shipping',	'int',	NULL,	NULL,	'text',	'Default Shipping Address',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(15,	1,	'taxvat',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Tax/VAT Number',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(16,	1,	'confirmation',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Is Confirmed',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(17,	1,	'created_at',	NULL,	NULL,	'static',	NULL,	NULL,	'datetime',	'Created At',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(18,	1,	'gender',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Gender',	NULL,	'eav/entity_attribute_source_table',	0,	0,	NULL,	0,	NULL),
(19,	2,	'prefix',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Prefix',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(20,	2,	'firstname',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'First Name',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(21,	2,	'middlename',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Middle Name/Initial',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(22,	2,	'lastname',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Last Name',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(23,	2,	'suffix',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Suffix',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(24,	2,	'company',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Company',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(25,	2,	'street',	NULL,	'customer/entity_address_attribute_backend_street',	'text',	NULL,	NULL,	'multiline',	'Street Address',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(26,	2,	'city',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'City',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(27,	2,	'country_id',	NULL,	NULL,	'varchar',	NULL,	NULL,	'select',	'Country',	NULL,	'customer/entity_address_attribute_source_country',	1,	0,	NULL,	0,	NULL),
(28,	2,	'region',	NULL,	'customer/entity_address_attribute_backend_region',	'varchar',	NULL,	NULL,	'text',	'State/Province',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(29,	2,	'region_id',	NULL,	NULL,	'int',	NULL,	NULL,	'hidden',	'State/Province',	NULL,	'customer/entity_address_attribute_source_region',	0,	0,	NULL,	0,	NULL),
(30,	2,	'postcode',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Zip/Postal Code',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(31,	2,	'telephone',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Telephone',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(32,	2,	'fax',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Fax',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(33,	1,	'rp_token',	NULL,	NULL,	'varchar',	NULL,	NULL,	'hidden',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(34,	1,	'rp_token_created_at',	NULL,	NULL,	'datetime',	NULL,	NULL,	'date',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(35,	1,	'disable_auto_group_change',	NULL,	'customer/attribute_backend_data_boolean',	'static',	NULL,	NULL,	'boolean',	'Disable Automatic Group Change Based on VAT ID',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(36,	2,	'vat_id',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'VAT number',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(37,	2,	'vat_is_valid',	NULL,	NULL,	'int',	NULL,	NULL,	'text',	'VAT number validity',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(38,	2,	'vat_request_id',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'VAT number validation request ID',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(39,	2,	'vat_request_date',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'VAT number validation request date',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(40,	2,	'vat_request_success',	NULL,	NULL,	'int',	NULL,	NULL,	'text',	'VAT number validation request success',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(41,	3,	'name',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Name',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(42,	3,	'is_active',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Is Active',	NULL,	'eav/entity_attribute_source_boolean',	1,	0,	NULL,	0,	NULL),
(43,	3,	'url_key',	NULL,	'catalog/category_attribute_backend_urlkey',	'varchar',	NULL,	NULL,	'text',	'URL Key',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(44,	3,	'description',	NULL,	NULL,	'text',	NULL,	NULL,	'textarea',	'Description',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(45,	3,	'image',	NULL,	'catalog/category_attribute_backend_image',	'varchar',	NULL,	NULL,	'image',	'Image',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(46,	3,	'meta_title',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Page Title',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(47,	3,	'meta_keywords',	NULL,	NULL,	'text',	NULL,	NULL,	'textarea',	'Meta Keywords',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(48,	3,	'meta_description',	NULL,	NULL,	'text',	NULL,	NULL,	'textarea',	'Meta Description',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(49,	3,	'display_mode',	NULL,	NULL,	'varchar',	NULL,	NULL,	'select',	'Display Mode',	NULL,	'catalog/category_attribute_source_mode',	0,	0,	NULL,	0,	NULL),
(50,	3,	'landing_page',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'CMS Block',	NULL,	'catalog/category_attribute_source_page',	0,	0,	NULL,	0,	NULL),
(51,	3,	'is_anchor',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Is Anchor',	NULL,	'eav/entity_attribute_source_boolean',	0,	0,	NULL,	0,	NULL),
(52,	3,	'path',	NULL,	NULL,	'static',	NULL,	NULL,	'text',	'Path',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(53,	3,	'position',	NULL,	NULL,	'static',	NULL,	NULL,	'text',	'Position',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(54,	3,	'all_children',	NULL,	NULL,	'text',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(55,	3,	'path_in_store',	NULL,	NULL,	'text',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(56,	3,	'children',	NULL,	NULL,	'text',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(57,	3,	'url_path',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(58,	3,	'custom_design',	NULL,	NULL,	'varchar',	NULL,	NULL,	'select',	'Custom Design',	NULL,	'core/design_source_design',	0,	0,	NULL,	0,	NULL),
(59,	3,	'custom_design_from',	NULL,	'eav/entity_attribute_backend_datetime',	'datetime',	NULL,	NULL,	'date',	'Active From',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(60,	3,	'custom_design_to',	NULL,	'eav/entity_attribute_backend_datetime',	'datetime',	NULL,	NULL,	'date',	'Active To',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(61,	3,	'page_layout',	NULL,	NULL,	'varchar',	NULL,	NULL,	'select',	'Page Layout',	NULL,	'catalog/category_attribute_source_layout',	0,	0,	NULL,	0,	NULL),
(62,	3,	'custom_layout_update',	NULL,	'catalog/attribute_backend_customlayoutupdate',	'text',	NULL,	NULL,	'textarea',	'Custom Layout Update',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(63,	3,	'level',	NULL,	NULL,	'static',	NULL,	NULL,	'text',	'Level',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(64,	3,	'children_count',	NULL,	NULL,	'static',	NULL,	NULL,	'text',	'Children Count',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(65,	3,	'available_sort_by',	NULL,	'catalog/category_attribute_backend_sortby',	'text',	NULL,	NULL,	'multiselect',	'Available Product Listing Sort By',	NULL,	'catalog/category_attribute_source_sortby',	1,	0,	NULL,	0,	NULL),
(66,	3,	'default_sort_by',	NULL,	'catalog/category_attribute_backend_sortby',	'varchar',	NULL,	NULL,	'select',	'Default Product Listing Sort By',	NULL,	'catalog/category_attribute_source_sortby',	1,	0,	NULL,	0,	NULL),
(67,	3,	'include_in_menu',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Include in Navigation Menu',	NULL,	'eav/entity_attribute_source_boolean',	1,	0,	'1',	0,	NULL),
(68,	3,	'custom_use_parent_settings',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Use Parent Category Settings',	NULL,	'eav/entity_attribute_source_boolean',	0,	0,	NULL,	0,	NULL),
(69,	3,	'custom_apply_to_products',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Apply To Products',	NULL,	'eav/entity_attribute_source_boolean',	0,	0,	NULL,	0,	NULL),
(70,	3,	'filter_price_range',	NULL,	NULL,	'decimal',	NULL,	NULL,	'text',	'Layered Navigation Price Step',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(71,	4,	'name',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Name',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(72,	4,	'description',	NULL,	NULL,	'text',	NULL,	NULL,	'textarea',	'Description',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(73,	4,	'short_description',	NULL,	NULL,	'text',	NULL,	NULL,	'textarea',	'Short Description',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(74,	4,	'sku',	NULL,	'catalog/product_attribute_backend_sku',	'static',	NULL,	NULL,	'text',	'SKU',	NULL,	NULL,	1,	0,	NULL,	1,	NULL),
(75,	4,	'price',	NULL,	'catalog/product_attribute_backend_price',	'decimal',	NULL,	NULL,	'price',	'Price',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(76,	4,	'special_price',	NULL,	'catalog/product_attribute_backend_price',	'decimal',	NULL,	NULL,	'price',	'Special Price',	'validate-special-price',	NULL,	0,	0,	NULL,	0,	NULL),
(77,	4,	'special_from_date',	NULL,	'catalog/product_attribute_backend_startdate_specialprice',	'datetime',	NULL,	NULL,	'date',	'Special Price From Date',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(78,	4,	'special_to_date',	NULL,	'eav/entity_attribute_backend_datetime',	'datetime',	NULL,	NULL,	'date',	'Special Price To Date',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(79,	4,	'cost',	NULL,	'catalog/product_attribute_backend_price',	'decimal',	NULL,	NULL,	'price',	'Cost',	NULL,	NULL,	0,	1,	NULL,	0,	NULL),
(80,	4,	'weight',	NULL,	NULL,	'decimal',	NULL,	NULL,	'weight',	'Weight',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(81,	4,	'manufacturer',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Manufacturer',	NULL,	NULL,	0,	1,	NULL,	0,	NULL),
(82,	4,	'meta_title',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Meta Title',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(83,	4,	'meta_keyword',	NULL,	NULL,	'text',	NULL,	NULL,	'textarea',	'Meta Keywords',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(84,	4,	'meta_description',	NULL,	NULL,	'varchar',	NULL,	NULL,	'textarea',	'Meta Description',	NULL,	NULL,	0,	0,	NULL,	0,	'Maximum 255 chars'),
(85,	4,	'image',	NULL,	NULL,	'varchar',	NULL,	'catalog/product_attribute_frontend_image',	'media_image',	'Base Image',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(86,	4,	'small_image',	NULL,	NULL,	'varchar',	NULL,	'catalog/product_attribute_frontend_image',	'media_image',	'Small Image',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(87,	4,	'thumbnail',	NULL,	NULL,	'varchar',	NULL,	'catalog/product_attribute_frontend_image',	'media_image',	'Thumbnail',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(88,	4,	'media_gallery',	NULL,	'catalog/product_attribute_backend_media',	'varchar',	NULL,	NULL,	'gallery',	'Media Gallery',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(89,	4,	'old_id',	NULL,	NULL,	'int',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(90,	4,	'group_price',	NULL,	'catalog/product_attribute_backend_groupprice',	'decimal',	NULL,	NULL,	'text',	'Group Price',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(91,	4,	'tier_price',	NULL,	'catalog/product_attribute_backend_tierprice',	'decimal',	NULL,	NULL,	'text',	'Tier Price',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(92,	4,	'color',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Color',	NULL,	NULL,	0,	1,	NULL,	0,	NULL),
(93,	4,	'news_from_date',	NULL,	'catalog/product_attribute_backend_startdate',	'datetime',	NULL,	NULL,	'date',	'Set Product as New from Date',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(94,	4,	'news_to_date',	NULL,	'eav/entity_attribute_backend_datetime',	'datetime',	NULL,	NULL,	'date',	'Set Product as New to Date',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(95,	4,	'gallery',	NULL,	NULL,	'varchar',	NULL,	NULL,	'gallery',	'Image Gallery',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(96,	4,	'status',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Status',	NULL,	'catalog/product_status',	1,	0,	NULL,	0,	NULL),
(97,	4,	'url_key',	NULL,	'catalog/product_attribute_backend_urlkey',	'varchar',	NULL,	NULL,	'text',	'URL Key',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(98,	4,	'url_path',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(99,	4,	'minimal_price',	NULL,	NULL,	'decimal',	NULL,	NULL,	'price',	'Minimal Price',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(100,	4,	'is_recurring',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Enable Recurring Profile',	NULL,	'eav/entity_attribute_source_boolean',	0,	0,	NULL,	0,	'Products with recurring profile participate in catalog as nominal items.'),
(101,	4,	'recurring_profile',	NULL,	'catalog/product_attribute_backend_recurring',	'text',	NULL,	NULL,	'text',	'Recurring Payment Profile',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(102,	4,	'visibility',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Visibility',	NULL,	'catalog/product_visibility',	1,	0,	'4',	0,	NULL),
(103,	4,	'custom_design',	NULL,	NULL,	'varchar',	NULL,	NULL,	'select',	'Custom Design',	NULL,	'core/design_source_design',	0,	0,	NULL,	0,	NULL),
(104,	4,	'custom_design_from',	NULL,	'catalog/product_attribute_backend_startdate',	'datetime',	NULL,	NULL,	'date',	'Active From',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(105,	4,	'custom_design_to',	NULL,	'eav/entity_attribute_backend_datetime',	'datetime',	NULL,	NULL,	'date',	'Active To',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(106,	4,	'custom_layout_update',	NULL,	'catalog/attribute_backend_customlayoutupdate',	'text',	NULL,	NULL,	'textarea',	'Custom Layout Update',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(107,	4,	'page_layout',	NULL,	NULL,	'varchar',	NULL,	NULL,	'select',	'Page Layout',	NULL,	'catalog/product_attribute_source_layout',	0,	0,	NULL,	0,	NULL),
(108,	4,	'category_ids',	NULL,	NULL,	'static',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(109,	4,	'options_container',	NULL,	NULL,	'varchar',	NULL,	NULL,	'select',	'Display Product Options In',	NULL,	'catalog/entity_product_attribute_design_options_container',	0,	0,	'container1',	0,	NULL),
(110,	4,	'required_options',	NULL,	NULL,	'static',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(111,	4,	'has_options',	NULL,	NULL,	'static',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(112,	4,	'image_label',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Image Label',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(113,	4,	'small_image_label',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Small Image Label',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(114,	4,	'thumbnail_label',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Thumbnail Label',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(115,	4,	'created_at',	NULL,	'eav/entity_attribute_backend_time_created',	'static',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(116,	4,	'updated_at',	NULL,	'eav/entity_attribute_backend_time_updated',	'static',	NULL,	NULL,	'text',	NULL,	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(117,	4,	'country_of_manufacture',	NULL,	NULL,	'varchar',	NULL,	NULL,	'select',	'Country of Manufacture',	NULL,	'catalog/product_attribute_source_countryofmanufacture',	0,	0,	NULL,	0,	NULL),
(118,	4,	'msrp_enabled',	NULL,	'catalog/product_attribute_backend_msrp',	'varchar',	NULL,	NULL,	'select',	'Apply MAP',	NULL,	'catalog/product_attribute_source_msrp_type_enabled',	0,	0,	'2',	0,	NULL),
(119,	4,	'msrp_display_actual_price_type',	NULL,	'catalog/product_attribute_backend_boolean',	'varchar',	NULL,	NULL,	'select',	'Display Actual Price',	NULL,	'catalog/product_attribute_source_msrp_type_price',	0,	0,	'4',	0,	NULL),
(120,	4,	'msrp',	NULL,	'catalog/product_attribute_backend_price',	'decimal',	NULL,	NULL,	'price',	'Manufacturer\'s Suggested Retail Price',	NULL,	NULL,	0,	0,	NULL,	0,	NULL),
(121,	4,	'tax_class_id',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Tax Class',	NULL,	'tax/class_source_product',	1,	0,	NULL,	0,	NULL),
(122,	4,	'gift_message_available',	NULL,	'catalog/product_attribute_backend_boolean',	'varchar',	NULL,	NULL,	'select',	'Allow Gift Message',	NULL,	'eav/entity_attribute_source_boolean',	0,	0,	NULL,	0,	NULL),
(123,	4,	'price_type',	NULL,	NULL,	'int',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(124,	4,	'sku_type',	NULL,	NULL,	'int',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(125,	4,	'weight_type',	NULL,	NULL,	'int',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(126,	4,	'price_view',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Price View',	NULL,	'bundle/product_attribute_source_price_view',	1,	0,	NULL,	0,	NULL),
(127,	4,	'shipment_type',	NULL,	NULL,	'int',	NULL,	NULL,	NULL,	'Shipment',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(128,	4,	'links_purchased_separately',	NULL,	NULL,	'int',	NULL,	NULL,	NULL,	'Links can be purchased separately',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(129,	4,	'samples_title',	NULL,	NULL,	'varchar',	NULL,	NULL,	NULL,	'Samples title',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(130,	4,	'links_title',	NULL,	NULL,	'varchar',	NULL,	NULL,	NULL,	'Links title',	NULL,	NULL,	1,	0,	NULL,	0,	NULL),
(131,	4,	'links_exist',	NULL,	NULL,	'int',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	0,	'0',	0,	NULL),
(133,	4,	'featured_position',	NULL,	NULL,	'varchar',	NULL,	NULL,	'text',	'Featured Position',	'validate-digits',	NULL,	0,	1,	NULL,	0,	NULL),
(134,	4,	'author',	NULL,	NULL,	'int',	NULL,	NULL,	'select',	'Author',	NULL,	'eav/entity_attribute_source_table',	0,	1,	'',	0,	NULL),
(135,	4,	'back_cover',	NULL,	NULL,	'varchar',	NULL,	NULL,	'media_image',	'Back Cover',	NULL,	NULL,	0,	1,	NULL,	0,	NULL);

CREATE TABLE `eav_attribute_group` (
  `attribute_group_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Attribute Group Id',
  `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Set Id',
  `attribute_group_name` varchar(255) DEFAULT NULL COMMENT 'Attribute Group Name',
  `sort_order` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `default_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Default Id',
  PRIMARY KEY (`attribute_group_id`),
  UNIQUE KEY `UNQ_EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_NAME` (`attribute_set_id`,`attribute_group_name`),
  KEY `IDX_EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_SORT_ORDER` (`attribute_set_id`,`sort_order`),
  CONSTRAINT `FK_EAV_ATTR_GROUP_ATTR_SET_ID_EAV_ATTR_SET_ATTR_SET_ID` FOREIGN KEY (`attribute_set_id`) REFERENCES `eav_attribute_set` (`attribute_set_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Attribute Group';

INSERT INTO `eav_attribute_group` (`attribute_group_id`, `attribute_set_id`, `attribute_group_name`, `sort_order`, `default_id`) VALUES
(1,	1,	'General',	1,	1),
(2,	2,	'General',	1,	1),
(3,	3,	'General',	10,	1),
(4,	3,	'General Information',	2,	0),
(5,	3,	'Display Settings',	20,	0),
(6,	3,	'Custom Design',	30,	0),
(7,	4,	'General',	1,	1),
(8,	4,	'Prices',	4,	0),
(9,	4,	'Meta Information',	5,	0),
(10,	4,	'Images',	6,	0),
(11,	4,	'Recurring Profile',	7,	0),
(12,	4,	'Design',	8,	0),
(13,	5,	'General',	1,	1),
(14,	6,	'General',	1,	1),
(15,	7,	'General',	1,	1),
(16,	8,	'General',	1,	1),
(17,	4,	'Gift Options',	9,	0),
(18,	4,	'Attributes',	2,	0),
(19,	4,	'Unused',	3,	0);

CREATE TABLE `eav_attribute_label` (
  `attribute_label_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Attribute Label Id',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `value` varchar(255) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`attribute_label_id`),
  KEY `IDX_EAV_ATTRIBUTE_LABEL_ATTRIBUTE_ID` (`attribute_id`),
  KEY `IDX_EAV_ATTRIBUTE_LABEL_STORE_ID` (`store_id`),
  KEY `IDX_EAV_ATTRIBUTE_LABEL_ATTRIBUTE_ID_STORE_ID` (`attribute_id`,`store_id`),
  CONSTRAINT `FK_EAV_ATTRIBUTE_LABEL_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ATTRIBUTE_LABEL_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Attribute Label';

INSERT INTO `eav_attribute_label` (`attribute_label_id`, `attribute_id`, `store_id`, `value`) VALUES
(7,	133,	1,	'Featured Position'),
(15,	134,	1,	'Author'),
(16,	135,	1,	'Back Cover');

CREATE TABLE `eav_attribute_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Id',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Id',
  `sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  PRIMARY KEY (`option_id`),
  KEY `IDX_EAV_ATTRIBUTE_OPTION_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `FK_EAV_ATTRIBUTE_OPTION_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Attribute Option';

INSERT INTO `eav_attribute_option` (`option_id`, `attribute_id`, `sort_order`) VALUES
(1,	18,	0),
(2,	18,	1),
(3,	134,	3),
(4,	134,	2),
(5,	134,	0),
(6,	134,	1),
(7,	134,	4),
(8,	134,	5),
(9,	134,	6),
(10,	134,	7),
(11,	134,	8),
(12,	134,	9);

CREATE TABLE `eav_attribute_option_value` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value Id',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `value` varchar(255) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  KEY `IDX_EAV_ATTRIBUTE_OPTION_VALUE_OPTION_ID` (`option_id`),
  KEY `IDX_EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ATTR_OPT_VAL_OPT_ID_EAV_ATTR_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `eav_attribute_option` (`option_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Attribute Option Value';

INSERT INTO `eav_attribute_option_value` (`value_id`, `option_id`, `store_id`, `value`) VALUES
(1,	1,	0,	'Male'),
(2,	2,	0,	'Female'),
(97,	12,	0,	'Tobe Levin, editor'),
(98,	12,	1,	'Tobe Levin, editor'),
(99,	5,	0,	'Hubert Prolongeau'),
(100,	5,	1,	'Hubert Prolongeau'),
(101,	6,	0,	'Khady, with Marie-Therese Cuny'),
(102,	6,	1,	'Khady, with Marie-Therese Cuny'),
(103,	4,	0,	'Nick Hadikwa Mwaluko'),
(104,	4,	1,	'Nick Hadikwa Mwaluko'),
(105,	3,	0,	'Alice Walker'),
(106,	3,	1,	'Alice Walker'),
(107,	7,	0,	'Maria Kiminta and Tobe Levin'),
(108,	7,	1,	'Maria Kiminta and Tobe Levin'),
(109,	8,	0,	'Frankie Hutton'),
(110,	8,	1,	'Frankie Hutton'),
(111,	9,	0,	'Violet Barungi and Hilda Twongyeirwe'),
(112,	9,	1,	'Violet Barungi and Hilda Twongyeirwe'),
(113,	10,	0,	'Jeanie Kortum'),
(114,	10,	1,	'Jeanie Kortum'),
(115,	11,	0,	'Kameel Ahmady'),
(116,	11,	1,	'Kameel Ahmady');

CREATE TABLE `eav_attribute_set` (
  `attribute_set_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Attribute Set Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `attribute_set_name` varchar(255) DEFAULT NULL COMMENT 'Attribute Set Name',
  `sort_order` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  PRIMARY KEY (`attribute_set_id`),
  UNIQUE KEY `UNQ_EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME` (`entity_type_id`,`attribute_set_name`),
  KEY `IDX_EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_SORT_ORDER` (`entity_type_id`,`sort_order`),
  CONSTRAINT `FK_EAV_ATTR_SET_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Attribute Set';

INSERT INTO `eav_attribute_set` (`attribute_set_id`, `entity_type_id`, `attribute_set_name`, `sort_order`) VALUES
(1,	1,	'Default',	1),
(2,	2,	'Default',	1),
(3,	3,	'Default',	1),
(4,	4,	'Default',	1),
(5,	5,	'Default',	1),
(6,	6,	'Default',	1),
(7,	7,	'Default',	1),
(8,	8,	'Default',	1);

CREATE TABLE `eav_entity` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Set Id',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Parent Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Updated At',
  `is_active` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Defines Is Entity Active',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_EAV_ENTITY_ENTITY_TYPE_ID` (`entity_type_id`),
  KEY `IDX_EAV_ENTITY_STORE_ID` (`store_id`),
  CONSTRAINT `FK_EAV_ENTITY_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTITY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Entity';


CREATE TABLE `eav_entity_attribute` (
  `entity_attribute_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Attribute Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Set Id',
  `attribute_group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Group Id',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Id',
  `sort_order` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  PRIMARY KEY (`entity_attribute_id`),
  UNIQUE KEY `UNQ_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID` (`attribute_set_id`,`attribute_id`),
  UNIQUE KEY `UNQ_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_GROUP_ID_ATTRIBUTE_ID` (`attribute_group_id`,`attribute_id`),
  KEY `IDX_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_SORT_ORDER` (`attribute_set_id`,`sort_order`),
  KEY `IDX_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `FK_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTT_ATTR_ATTR_GROUP_ID_EAV_ATTR_GROUP_ATTR_GROUP_ID` FOREIGN KEY (`attribute_group_id`) REFERENCES `eav_attribute_group` (`attribute_group_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Entity Attributes';

INSERT INTO `eav_entity_attribute` (`entity_attribute_id`, `entity_type_id`, `attribute_set_id`, `attribute_group_id`, `attribute_id`, `sort_order`) VALUES
(1,	1,	1,	1,	1,	10),
(2,	1,	1,	1,	2,	0),
(3,	1,	1,	1,	3,	20),
(4,	1,	1,	1,	4,	30),
(5,	1,	1,	1,	5,	40),
(6,	1,	1,	1,	6,	50),
(7,	1,	1,	1,	7,	60),
(8,	1,	1,	1,	8,	70),
(9,	1,	1,	1,	9,	80),
(10,	1,	1,	1,	10,	25),
(11,	1,	1,	1,	11,	90),
(12,	1,	1,	1,	12,	0),
(13,	1,	1,	1,	13,	0),
(14,	1,	1,	1,	14,	0),
(15,	1,	1,	1,	15,	100),
(16,	1,	1,	1,	16,	0),
(17,	1,	1,	1,	17,	86),
(18,	1,	1,	1,	18,	110),
(19,	2,	2,	2,	19,	10),
(20,	2,	2,	2,	20,	20),
(21,	2,	2,	2,	21,	30),
(22,	2,	2,	2,	22,	40),
(23,	2,	2,	2,	23,	50),
(24,	2,	2,	2,	24,	60),
(25,	2,	2,	2,	25,	70),
(26,	2,	2,	2,	26,	80),
(27,	2,	2,	2,	27,	90),
(28,	2,	2,	2,	28,	100),
(29,	2,	2,	2,	29,	100),
(30,	2,	2,	2,	30,	110),
(31,	2,	2,	2,	31,	120),
(32,	2,	2,	2,	32,	130),
(33,	1,	1,	1,	33,	111),
(34,	1,	1,	1,	34,	112),
(35,	1,	1,	1,	35,	28),
(36,	2,	2,	2,	36,	140),
(37,	2,	2,	2,	37,	132),
(38,	2,	2,	2,	38,	133),
(39,	2,	2,	2,	39,	134),
(40,	2,	2,	2,	40,	135),
(41,	3,	3,	4,	41,	1),
(42,	3,	3,	4,	42,	2),
(43,	3,	3,	4,	43,	3),
(44,	3,	3,	4,	44,	4),
(45,	3,	3,	4,	45,	5),
(46,	3,	3,	4,	46,	6),
(47,	3,	3,	4,	47,	7),
(48,	3,	3,	4,	48,	8),
(49,	3,	3,	5,	49,	10),
(50,	3,	3,	5,	50,	20),
(51,	3,	3,	5,	51,	30),
(52,	3,	3,	4,	52,	12),
(53,	3,	3,	4,	53,	13),
(54,	3,	3,	4,	54,	14),
(55,	3,	3,	4,	55,	15),
(56,	3,	3,	4,	56,	16),
(57,	3,	3,	4,	57,	17),
(58,	3,	3,	6,	58,	10),
(59,	3,	3,	6,	59,	30),
(60,	3,	3,	6,	60,	40),
(61,	3,	3,	6,	61,	50),
(62,	3,	3,	6,	62,	60),
(63,	3,	3,	4,	63,	24),
(64,	3,	3,	4,	64,	25),
(65,	3,	3,	5,	65,	40),
(66,	3,	3,	5,	66,	50),
(67,	3,	3,	4,	67,	10),
(68,	3,	3,	6,	68,	5),
(69,	3,	3,	6,	69,	6),
(70,	3,	3,	5,	70,	51),
(88,	4,	4,	7,	89,	6),
(96,	4,	4,	7,	98,	11),
(97,	4,	4,	8,	99,	8),
(106,	4,	4,	7,	108,	13),
(108,	4,	4,	7,	110,	14),
(109,	4,	4,	7,	111,	15),
(110,	4,	4,	7,	112,	16),
(111,	4,	4,	7,	113,	17),
(112,	4,	4,	7,	114,	18),
(113,	4,	4,	7,	115,	19),
(114,	4,	4,	7,	116,	20),
(121,	4,	4,	7,	123,	22),
(122,	4,	4,	7,	124,	23),
(123,	4,	4,	7,	125,	24),
(125,	4,	4,	7,	127,	25),
(126,	4,	4,	7,	128,	26),
(127,	4,	4,	7,	129,	27),
(128,	4,	4,	7,	130,	28),
(129,	4,	4,	7,	131,	29),
(369,	4,	4,	7,	71,	1),
(371,	4,	4,	7,	72,	3),
(373,	4,	4,	7,	73,	2),
(375,	4,	4,	7,	96,	6),
(377,	4,	4,	7,	97,	4),
(379,	4,	4,	7,	102,	5),
(381,	4,	4,	18,	74,	1),
(383,	4,	4,	18,	133,	3),
(385,	4,	4,	18,	134,	2),
(387,	4,	4,	19,	80,	1),
(389,	4,	4,	19,	90,	2),
(391,	4,	4,	19,	91,	7),
(393,	4,	4,	19,	93,	8),
(395,	4,	4,	19,	94,	3),
(397,	4,	4,	19,	117,	9),
(399,	4,	4,	19,	118,	5),
(401,	4,	4,	19,	119,	6),
(403,	4,	4,	19,	120,	4),
(405,	4,	4,	8,	75,	1),
(407,	4,	4,	8,	76,	2),
(409,	4,	4,	8,	77,	3),
(411,	4,	4,	8,	78,	4),
(413,	4,	4,	8,	121,	5),
(415,	4,	4,	8,	126,	6),
(417,	4,	4,	9,	82,	1),
(419,	4,	4,	9,	83,	2),
(421,	4,	4,	9,	84,	3),
(423,	4,	4,	10,	85,	1),
(425,	4,	4,	10,	86,	2),
(427,	4,	4,	10,	87,	3),
(429,	4,	4,	10,	88,	4),
(431,	4,	4,	10,	95,	5),
(433,	4,	4,	11,	100,	1),
(435,	4,	4,	11,	101,	2),
(437,	4,	4,	12,	103,	1),
(439,	4,	4,	12,	104,	2),
(441,	4,	4,	12,	105,	3),
(443,	4,	4,	12,	106,	4),
(445,	4,	4,	12,	107,	5),
(447,	4,	4,	12,	109,	6),
(449,	4,	4,	17,	122,	1),
(451,	4,	4,	18,	135,	5);

CREATE TABLE `eav_entity_datetime` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Id',
  `value` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Attribute Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `UNQ_EAV_ENTITY_DATETIME_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `IDX_EAV_ENTITY_DATETIME_ENTITY_TYPE_ID` (`entity_type_id`),
  KEY `IDX_EAV_ENTITY_DATETIME_ATTRIBUTE_ID` (`attribute_id`),
  KEY `IDX_EAV_ENTITY_DATETIME_STORE_ID` (`store_id`),
  KEY `IDX_EAV_ENTITY_DATETIME_ENTITY_ID` (`entity_id`),
  KEY `IDX_EAV_ENTITY_DATETIME_ATTRIBUTE_ID_VALUE` (`attribute_id`,`value`),
  KEY `IDX_EAV_ENTITY_DATETIME_ENTITY_TYPE_ID_VALUE` (`entity_type_id`,`value`),
  CONSTRAINT `FK_EAV_ENTITY_DATETIME_ENTITY_ID_EAV_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `eav_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTITY_DATETIME_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTT_DTIME_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Entity Value Prefix';


CREATE TABLE `eav_entity_decimal` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Id',
  `value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Attribute Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `UNQ_EAV_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `IDX_EAV_ENTITY_DECIMAL_ENTITY_TYPE_ID` (`entity_type_id`),
  KEY `IDX_EAV_ENTITY_DECIMAL_ATTRIBUTE_ID` (`attribute_id`),
  KEY `IDX_EAV_ENTITY_DECIMAL_STORE_ID` (`store_id`),
  KEY `IDX_EAV_ENTITY_DECIMAL_ENTITY_ID` (`entity_id`),
  KEY `IDX_EAV_ENTITY_DECIMAL_ATTRIBUTE_ID_VALUE` (`attribute_id`,`value`),
  KEY `IDX_EAV_ENTITY_DECIMAL_ENTITY_TYPE_ID_VALUE` (`entity_type_id`,`value`),
  CONSTRAINT `FK_EAV_ENTITY_DECIMAL_ENTITY_ID_EAV_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `eav_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTITY_DECIMAL_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTT_DEC_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Entity Value Prefix';


CREATE TABLE `eav_entity_int` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Id',
  `value` int(11) NOT NULL DEFAULT '0' COMMENT 'Attribute Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `UNQ_EAV_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `IDX_EAV_ENTITY_INT_ENTITY_TYPE_ID` (`entity_type_id`),
  KEY `IDX_EAV_ENTITY_INT_ATTRIBUTE_ID` (`attribute_id`),
  KEY `IDX_EAV_ENTITY_INT_STORE_ID` (`store_id`),
  KEY `IDX_EAV_ENTITY_INT_ENTITY_ID` (`entity_id`),
  KEY `IDX_EAV_ENTITY_INT_ATTRIBUTE_ID_VALUE` (`attribute_id`,`value`),
  KEY `IDX_EAV_ENTITY_INT_ENTITY_TYPE_ID_VALUE` (`entity_type_id`,`value`),
  CONSTRAINT `FK_EAV_ENTITY_INT_ENTITY_ID_EAV_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `eav_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTITY_INT_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTITY_INT_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Entity Value Prefix';


CREATE TABLE `eav_entity_store` (
  `entity_store_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Store Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `increment_prefix` varchar(20) DEFAULT NULL COMMENT 'Increment Prefix',
  `increment_last_id` varchar(50) DEFAULT NULL COMMENT 'Last Incremented Id',
  PRIMARY KEY (`entity_store_id`),
  KEY `IDX_EAV_ENTITY_STORE_ENTITY_TYPE_ID` (`entity_type_id`),
  KEY `IDX_EAV_ENTITY_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_EAV_ENTITY_STORE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTT_STORE_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Entity Store';

INSERT INTO `eav_entity_store` (`entity_store_id`, `entity_type_id`, `store_id`, `increment_prefix`, `increment_last_id`) VALUES
(1,	5,	1,	'1',	'100000009'),
(2,	6,	1,	'1',	'100000007'),
(3,	8,	1,	'1',	'100000001');

CREATE TABLE `eav_entity_text` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Id',
  `value` text NOT NULL COMMENT 'Attribute Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `UNQ_EAV_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `IDX_EAV_ENTITY_TEXT_ENTITY_TYPE_ID` (`entity_type_id`),
  KEY `IDX_EAV_ENTITY_TEXT_ATTRIBUTE_ID` (`attribute_id`),
  KEY `IDX_EAV_ENTITY_TEXT_STORE_ID` (`store_id`),
  KEY `IDX_EAV_ENTITY_TEXT_ENTITY_ID` (`entity_id`),
  CONSTRAINT `FK_EAV_ENTITY_TEXT_ENTITY_ID_EAV_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `eav_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTITY_TEXT_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTITY_TEXT_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Entity Value Prefix';


CREATE TABLE `eav_entity_type` (
  `entity_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Type Id',
  `entity_type_code` varchar(50) NOT NULL COMMENT 'Entity Type Code',
  `entity_model` varchar(255) NOT NULL COMMENT 'Entity Model',
  `attribute_model` varchar(255) DEFAULT NULL COMMENT 'Attribute Model',
  `entity_table` varchar(255) DEFAULT NULL COMMENT 'Entity Table',
  `value_table_prefix` varchar(255) DEFAULT NULL COMMENT 'Value Table Prefix',
  `entity_id_field` varchar(255) DEFAULT NULL COMMENT 'Entity Id Field',
  `is_data_sharing` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Defines Is Data Sharing',
  `data_sharing_key` varchar(100) DEFAULT 'default' COMMENT 'Data Sharing Key',
  `default_attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Default Attribute Set Id',
  `increment_model` varchar(255) DEFAULT '' COMMENT 'Increment Model',
  `increment_per_store` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Increment Per Store',
  `increment_pad_length` smallint(5) unsigned NOT NULL DEFAULT '8' COMMENT 'Increment Pad Length',
  `increment_pad_char` varchar(1) NOT NULL DEFAULT '0' COMMENT 'Increment Pad Char',
  `additional_attribute_table` varchar(255) DEFAULT '' COMMENT 'Additional Attribute Table',
  `entity_attribute_collection` varchar(255) DEFAULT NULL COMMENT 'Entity Attribute Collection',
  PRIMARY KEY (`entity_type_id`),
  KEY `IDX_EAV_ENTITY_TYPE_ENTITY_TYPE_CODE` (`entity_type_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Entity Type';

INSERT INTO `eav_entity_type` (`entity_type_id`, `entity_type_code`, `entity_model`, `attribute_model`, `entity_table`, `value_table_prefix`, `entity_id_field`, `is_data_sharing`, `data_sharing_key`, `default_attribute_set_id`, `increment_model`, `increment_per_store`, `increment_pad_length`, `increment_pad_char`, `additional_attribute_table`, `entity_attribute_collection`) VALUES
(1,	'customer',	'customer/customer',	'customer/attribute',	'customer/entity',	NULL,	NULL,	1,	'default',	1,	'eav/entity_increment_numeric',	0,	8,	'0',	'customer/eav_attribute',	'customer/attribute_collection'),
(2,	'customer_address',	'customer/address',	'customer/attribute',	'customer/address_entity',	NULL,	NULL,	1,	'default',	2,	NULL,	0,	8,	'0',	'customer/eav_attribute',	'customer/address_attribute_collection'),
(3,	'catalog_category',	'catalog/category',	'catalog/resource_eav_attribute',	'catalog/category',	NULL,	NULL,	1,	'default',	3,	NULL,	0,	8,	'0',	'catalog/eav_attribute',	'catalog/category_attribute_collection'),
(4,	'catalog_product',	'catalog/product',	'catalog/resource_eav_attribute',	'catalog/product',	NULL,	NULL,	1,	'default',	4,	NULL,	0,	8,	'0',	'catalog/eav_attribute',	'catalog/product_attribute_collection'),
(5,	'order',	'sales/order',	NULL,	'sales/order',	NULL,	NULL,	1,	'default',	0,	'eav/entity_increment_numeric',	1,	8,	'0',	NULL,	NULL),
(6,	'invoice',	'sales/order_invoice',	NULL,	'sales/invoice',	NULL,	NULL,	1,	'default',	0,	'eav/entity_increment_numeric',	1,	8,	'0',	NULL,	NULL),
(7,	'creditmemo',	'sales/order_creditmemo',	NULL,	'sales/creditmemo',	NULL,	NULL,	1,	'default',	0,	'eav/entity_increment_numeric',	1,	8,	'0',	NULL,	NULL),
(8,	'shipment',	'sales/order_shipment',	NULL,	'sales/shipment',	NULL,	NULL,	1,	'default',	0,	'eav/entity_increment_numeric',	1,	8,	'0',	NULL,	NULL);

CREATE TABLE `eav_entity_varchar` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value Id',
  `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Id',
  `value` varchar(255) DEFAULT NULL COMMENT 'Attribute Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `UNQ_EAV_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `IDX_EAV_ENTITY_VARCHAR_ENTITY_TYPE_ID` (`entity_type_id`),
  KEY `IDX_EAV_ENTITY_VARCHAR_ATTRIBUTE_ID` (`attribute_id`),
  KEY `IDX_EAV_ENTITY_VARCHAR_STORE_ID` (`store_id`),
  KEY `IDX_EAV_ENTITY_VARCHAR_ENTITY_ID` (`entity_id`),
  KEY `IDX_EAV_ENTITY_VARCHAR_ATTRIBUTE_ID_VALUE` (`attribute_id`,`value`),
  KEY `IDX_EAV_ENTITY_VARCHAR_ENTITY_TYPE_ID_VALUE` (`entity_type_id`,`value`),
  CONSTRAINT `FK_EAV_ENTITY_VARCHAR_ENTITY_ID_EAV_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `eav_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTITY_VARCHAR_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_ENTT_VCHR_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Entity Value Prefix';


CREATE TABLE `eav_form_element` (
  `element_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Element Id',
  `type_id` smallint(5) unsigned NOT NULL COMMENT 'Type Id',
  `fieldset_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Fieldset Id',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute Id',
  `sort_order` int(11) NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  PRIMARY KEY (`element_id`),
  UNIQUE KEY `UNQ_EAV_FORM_ELEMENT_TYPE_ID_ATTRIBUTE_ID` (`type_id`,`attribute_id`),
  KEY `IDX_EAV_FORM_ELEMENT_TYPE_ID` (`type_id`),
  KEY `IDX_EAV_FORM_ELEMENT_FIELDSET_ID` (`fieldset_id`),
  KEY `IDX_EAV_FORM_ELEMENT_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `FK_EAV_FORM_ELEMENT_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_FORM_ELEMENT_FIELDSET_ID_EAV_FORM_FIELDSET_FIELDSET_ID` FOREIGN KEY (`fieldset_id`) REFERENCES `eav_form_fieldset` (`fieldset_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_FORM_ELEMENT_TYPE_ID_EAV_FORM_TYPE_TYPE_ID` FOREIGN KEY (`type_id`) REFERENCES `eav_form_type` (`type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Form Element';

INSERT INTO `eav_form_element` (`element_id`, `type_id`, `fieldset_id`, `attribute_id`, `sort_order`) VALUES
(1,	1,	NULL,	20,	0),
(2,	1,	NULL,	21,	1),
(3,	1,	NULL,	22,	2),
(4,	1,	NULL,	24,	3),
(5,	1,	NULL,	9,	4),
(6,	1,	NULL,	25,	5),
(7,	1,	NULL,	26,	6),
(8,	1,	NULL,	28,	7),
(9,	1,	NULL,	30,	8),
(10,	1,	NULL,	27,	9),
(11,	1,	NULL,	31,	10),
(12,	1,	NULL,	32,	11),
(13,	2,	NULL,	20,	0),
(14,	2,	NULL,	21,	1),
(15,	2,	NULL,	22,	2),
(16,	2,	NULL,	24,	3),
(17,	2,	NULL,	9,	4),
(18,	2,	NULL,	25,	5),
(19,	2,	NULL,	26,	6),
(20,	2,	NULL,	28,	7),
(21,	2,	NULL,	30,	8),
(22,	2,	NULL,	27,	9),
(23,	2,	NULL,	31,	10),
(24,	2,	NULL,	32,	11),
(25,	3,	NULL,	20,	0),
(26,	3,	NULL,	21,	1),
(27,	3,	NULL,	22,	2),
(28,	3,	NULL,	24,	3),
(29,	3,	NULL,	25,	4),
(30,	3,	NULL,	26,	5),
(31,	3,	NULL,	28,	6),
(32,	3,	NULL,	30,	7),
(33,	3,	NULL,	27,	8),
(34,	3,	NULL,	31,	9),
(35,	3,	NULL,	32,	10),
(36,	4,	NULL,	20,	0),
(37,	4,	NULL,	21,	1),
(38,	4,	NULL,	22,	2),
(39,	4,	NULL,	24,	3),
(40,	4,	NULL,	25,	4),
(41,	4,	NULL,	26,	5),
(42,	4,	NULL,	28,	6),
(43,	4,	NULL,	30,	7),
(44,	4,	NULL,	27,	8),
(45,	4,	NULL,	31,	9),
(46,	4,	NULL,	32,	10),
(47,	5,	1,	5,	0),
(48,	5,	1,	6,	1),
(49,	5,	1,	7,	2),
(50,	5,	1,	9,	3),
(51,	5,	2,	24,	0),
(52,	5,	2,	31,	1),
(53,	5,	2,	25,	2),
(54,	5,	2,	26,	3),
(55,	5,	2,	28,	4),
(56,	5,	2,	30,	5),
(57,	5,	2,	27,	6);

CREATE TABLE `eav_form_fieldset` (
  `fieldset_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Fieldset Id',
  `type_id` smallint(5) unsigned NOT NULL COMMENT 'Type Id',
  `code` varchar(64) NOT NULL COMMENT 'Code',
  `sort_order` int(11) NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  PRIMARY KEY (`fieldset_id`),
  UNIQUE KEY `UNQ_EAV_FORM_FIELDSET_TYPE_ID_CODE` (`type_id`,`code`),
  KEY `IDX_EAV_FORM_FIELDSET_TYPE_ID` (`type_id`),
  CONSTRAINT `FK_EAV_FORM_FIELDSET_TYPE_ID_EAV_FORM_TYPE_TYPE_ID` FOREIGN KEY (`type_id`) REFERENCES `eav_form_type` (`type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Form Fieldset';

INSERT INTO `eav_form_fieldset` (`fieldset_id`, `type_id`, `code`, `sort_order`) VALUES
(1,	5,	'general',	1),
(2,	5,	'address',	2);

CREATE TABLE `eav_form_fieldset_label` (
  `fieldset_id` smallint(5) unsigned NOT NULL COMMENT 'Fieldset Id',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store Id',
  `label` varchar(255) NOT NULL COMMENT 'Label',
  PRIMARY KEY (`fieldset_id`,`store_id`),
  KEY `IDX_EAV_FORM_FIELDSET_LABEL_FIELDSET_ID` (`fieldset_id`),
  KEY `IDX_EAV_FORM_FIELDSET_LABEL_STORE_ID` (`store_id`),
  CONSTRAINT `FK_EAV_FORM_FIELDSET_LABEL_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_FORM_FSET_LBL_FSET_ID_EAV_FORM_FSET_FSET_ID` FOREIGN KEY (`fieldset_id`) REFERENCES `eav_form_fieldset` (`fieldset_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Form Fieldset Label';

INSERT INTO `eav_form_fieldset_label` (`fieldset_id`, `store_id`, `label`) VALUES
(1,	0,	'Personal Information'),
(2,	0,	'Address Information');

CREATE TABLE `eav_form_type` (
  `type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Type Id',
  `code` varchar(64) NOT NULL COMMENT 'Code',
  `label` varchar(255) NOT NULL COMMENT 'Label',
  `is_system` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is System',
  `theme` varchar(64) DEFAULT NULL COMMENT 'Theme',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store Id',
  PRIMARY KEY (`type_id`),
  UNIQUE KEY `UNQ_EAV_FORM_TYPE_CODE_THEME_STORE_ID` (`code`,`theme`,`store_id`),
  KEY `IDX_EAV_FORM_TYPE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_EAV_FORM_TYPE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Form Type';

INSERT INTO `eav_form_type` (`type_id`, `code`, `label`, `is_system`, `theme`, `store_id`) VALUES
(1,	'checkout_onepage_register',	'checkout_onepage_register',	1,	'',	0),
(2,	'checkout_onepage_register_guest',	'checkout_onepage_register_guest',	1,	'',	0),
(3,	'checkout_onepage_billing_address',	'checkout_onepage_billing_address',	1,	'',	0),
(4,	'checkout_onepage_shipping_address',	'checkout_onepage_shipping_address',	1,	'',	0),
(5,	'checkout_multishipping_register',	'checkout_multishipping_register',	1,	'',	0);

CREATE TABLE `eav_form_type_entity` (
  `type_id` smallint(5) unsigned NOT NULL COMMENT 'Type Id',
  `entity_type_id` smallint(5) unsigned NOT NULL COMMENT 'Entity Type Id',
  PRIMARY KEY (`type_id`,`entity_type_id`),
  KEY `IDX_EAV_FORM_TYPE_ENTITY_ENTITY_TYPE_ID` (`entity_type_id`),
  CONSTRAINT `FK_EAV_FORM_TYPE_ENTITY_TYPE_ID_EAV_FORM_TYPE_TYPE_ID` FOREIGN KEY (`type_id`) REFERENCES `eav_form_type` (`type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_EAV_FORM_TYPE_ENTT_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Eav Form Type Entity';

INSERT INTO `eav_form_type_entity` (`type_id`, `entity_type_id`) VALUES
(1,	1),
(2,	1),
(5,	1),
(1,	2),
(2,	2),
(3,	2),
(4,	2),
(5,	2);

CREATE TABLE `gift_message` (
  `gift_message_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'GiftMessage Id',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer id',
  `sender` varchar(255) DEFAULT NULL COMMENT 'Sender',
  `recipient` varchar(255) DEFAULT NULL COMMENT 'Recipient',
  `message` text COMMENT 'Message',
  PRIMARY KEY (`gift_message_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Gift Message';


CREATE TABLE `imaclean` (
  `imaclean_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `filename` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`imaclean_id`),
  UNIQUE KEY `filename` (`filename`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `importexport_importdata` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `entity` varchar(50) NOT NULL COMMENT 'Entity',
  `behavior` varchar(10) NOT NULL DEFAULT 'append' COMMENT 'Behavior',
  `data` longtext COMMENT 'Data',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Import Data Table';


CREATE TABLE `index_event` (
  `event_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event Id',
  `type` varchar(64) NOT NULL COMMENT 'Type',
  `entity` varchar(64) NOT NULL COMMENT 'Entity',
  `entity_pk` bigint(20) DEFAULT NULL COMMENT 'Entity Primary Key',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Creation Time',
  `old_data` mediumtext COMMENT 'Old Data',
  `new_data` mediumtext COMMENT 'New Data',
  PRIMARY KEY (`event_id`),
  UNIQUE KEY `UNQ_INDEX_EVENT_TYPE_ENTITY_ENTITY_PK` (`type`,`entity`,`entity_pk`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Index Event';


CREATE TABLE `index_process` (
  `process_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Process Id',
  `indexer_code` varchar(32) NOT NULL COMMENT 'Indexer Code',
  `status` varchar(15) NOT NULL DEFAULT 'pending' COMMENT 'Status',
  `started_at` timestamp NULL DEFAULT NULL COMMENT 'Started At',
  `ended_at` timestamp NULL DEFAULT NULL COMMENT 'Ended At',
  `mode` varchar(9) NOT NULL DEFAULT 'real_time' COMMENT 'Mode',
  PRIMARY KEY (`process_id`),
  UNIQUE KEY `UNQ_INDEX_PROCESS_INDEXER_CODE` (`indexer_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Index Process';

INSERT INTO `index_process` (`process_id`, `indexer_code`, `status`, `started_at`, `ended_at`, `mode`) VALUES
(1,	'catalog_product_attribute',	'pending',	'2018-06-28 16:07:39',	'2018-06-28 16:07:39',	'real_time'),
(2,	'catalog_product_price',	'pending',	'2018-06-28 16:07:39',	'2018-06-28 16:07:39',	'real_time'),
(3,	'catalog_url',	'pending',	'2018-06-28 16:07:39',	'2018-06-28 16:07:39',	'real_time'),
(4,	'catalog_product_flat',	'pending',	'2017-07-17 12:07:24',	'2017-07-17 12:07:24',	'real_time'),
(5,	'catalog_category_flat',	'pending',	'2017-07-17 12:07:24',	'2017-07-17 12:07:24',	'real_time'),
(6,	'catalog_category_product',	'pending',	'2018-06-28 16:07:39',	'2018-06-28 16:07:39',	'real_time'),
(7,	'catalogsearch_fulltext',	'pending',	'2018-06-28 16:07:39',	'2018-06-28 16:07:39',	'real_time'),
(8,	'cataloginventory_stock',	'pending',	'2018-06-28 16:07:39',	'2018-06-28 16:07:39',	'real_time'),
(9,	'tag_summary',	'pending',	'2018-06-28 16:07:39',	'2018-06-28 16:07:39',	'real_time');

CREATE TABLE `index_process_event` (
  `process_id` int(10) unsigned NOT NULL COMMENT 'Process Id',
  `event_id` bigint(20) unsigned NOT NULL COMMENT 'Event Id',
  `status` varchar(7) NOT NULL DEFAULT 'new' COMMENT 'Status',
  PRIMARY KEY (`process_id`,`event_id`),
  KEY `IDX_INDEX_PROCESS_EVENT_EVENT_ID` (`event_id`),
  CONSTRAINT `FK_INDEX_PROCESS_EVENT_EVENT_ID_INDEX_EVENT_EVENT_ID` FOREIGN KEY (`event_id`) REFERENCES `index_event` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_INDEX_PROCESS_EVENT_PROCESS_ID_INDEX_PROCESS_PROCESS_ID` FOREIGN KEY (`process_id`) REFERENCES `index_process` (`process_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Index Process Event';


CREATE TABLE `lightningsource` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `result_file_name` varchar(255) NOT NULL,
  `result_file_content` text NOT NULL,
  `actions` text NOT NULL,
  `date_time` datetime NOT NULL,
  `server_addr` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE `lightningsource_us_orders` (
  `order_id` varchar(255) NOT NULL,
  `email_alert_sent_date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE `log_customer` (
  `log_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Log ID',
  `visitor_id` bigint(20) unsigned DEFAULT NULL COMMENT 'Visitor ID',
  `customer_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Customer ID',
  `login_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Login Time',
  `logout_at` timestamp NULL DEFAULT NULL COMMENT 'Logout Time',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`log_id`),
  KEY `IDX_LOG_CUSTOMER_VISITOR_ID` (`visitor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Customers Table';


CREATE TABLE `log_quote` (
  `quote_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote ID',
  `visitor_id` bigint(20) unsigned DEFAULT NULL COMMENT 'Visitor ID',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Creation Time',
  `deleted_at` timestamp NULL DEFAULT NULL COMMENT 'Deletion Time',
  PRIMARY KEY (`quote_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Quotes Table';


CREATE TABLE `log_summary` (
  `summary_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Summary ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `type_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Type ID',
  `visitor_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Visitor Count',
  `customer_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Customer Count',
  `add_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Date',
  PRIMARY KEY (`summary_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Summary Table';


CREATE TABLE `log_summary_type` (
  `type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Type ID',
  `type_code` varchar(64) DEFAULT NULL COMMENT 'Type Code',
  `period` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Period',
  `period_type` varchar(6) NOT NULL DEFAULT 'MINUTE' COMMENT 'Period Type',
  PRIMARY KEY (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Summary Types Table';


CREATE TABLE `log_url` (
  `url_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'URL ID',
  `visitor_id` bigint(20) unsigned DEFAULT NULL COMMENT 'Visitor ID',
  `visit_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Visit Time',
  KEY `IDX_LOG_URL_VISITOR_ID` (`visitor_id`),
  KEY `url_id` (`url_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log URL Table';


CREATE TABLE `log_url_info` (
  `url_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'URL ID',
  `url` varchar(255) DEFAULT NULL COMMENT 'URL',
  `referer` varchar(255) DEFAULT NULL COMMENT 'Referrer',
  PRIMARY KEY (`url_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log URL Info Table';


CREATE TABLE `log_visitor` (
  `visitor_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Visitor ID',
  `session_id` varchar(64) DEFAULT NULL COMMENT 'Session ID',
  `first_visit_at` timestamp NULL DEFAULT NULL COMMENT 'First Visit Time',
  `last_visit_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Last Visit Time',
  `last_url_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Last URL ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`visitor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Visitors Table';


CREATE TABLE `log_visitor_info` (
  `visitor_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Visitor ID',
  `http_referer` varchar(255) DEFAULT NULL COMMENT 'HTTP Referrer',
  `http_user_agent` varchar(255) DEFAULT NULL COMMENT 'HTTP User-Agent',
  `http_accept_charset` varchar(255) DEFAULT NULL COMMENT 'HTTP Accept-Charset',
  `http_accept_language` varchar(255) DEFAULT NULL COMMENT 'HTTP Accept-Language',
  `server_addr` varbinary(16) DEFAULT NULL,
  `remote_addr` varbinary(16) DEFAULT NULL,
  PRIMARY KEY (`visitor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Visitor Info Table';


CREATE TABLE `log_visitor_online` (
  `visitor_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Visitor ID',
  `visitor_type` varchar(1) NOT NULL COMMENT 'Visitor Type',
  `remote_addr` varbinary(16) DEFAULT NULL,
  `first_visit_at` timestamp NULL DEFAULT NULL COMMENT 'First Visit Time',
  `last_visit_at` timestamp NULL DEFAULT NULL COMMENT 'Last Visit Time',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  `last_url` varchar(255) DEFAULT NULL COMMENT 'Last URL',
  PRIMARY KEY (`visitor_id`),
  KEY `IDX_LOG_VISITOR_ONLINE_VISITOR_TYPE` (`visitor_type`),
  KEY `IDX_LOG_VISITOR_ONLINE_FIRST_VISIT_AT_LAST_VISIT_AT` (`first_visit_at`,`last_visit_at`),
  KEY `IDX_LOG_VISITOR_ONLINE_CUSTOMER_ID` (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Visitor Online Table';


CREATE TABLE `newsletter_problem` (
  `problem_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Problem Id',
  `subscriber_id` int(10) unsigned DEFAULT NULL COMMENT 'Subscriber Id',
  `queue_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue Id',
  `problem_error_code` int(10) unsigned DEFAULT '0' COMMENT 'Problem Error Code',
  `problem_error_text` varchar(200) DEFAULT NULL COMMENT 'Problem Error Text',
  PRIMARY KEY (`problem_id`),
  KEY `IDX_NEWSLETTER_PROBLEM_SUBSCRIBER_ID` (`subscriber_id`),
  KEY `IDX_NEWSLETTER_PROBLEM_QUEUE_ID` (`queue_id`),
  CONSTRAINT `FK_NEWSLETTER_PROBLEM_QUEUE_ID_NEWSLETTER_QUEUE_QUEUE_ID` FOREIGN KEY (`queue_id`) REFERENCES `newsletter_queue` (`queue_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_NLTTR_PROBLEM_SUBSCRIBER_ID_NLTTR_SUBSCRIBER_SUBSCRIBER_ID` FOREIGN KEY (`subscriber_id`) REFERENCES `newsletter_subscriber` (`subscriber_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Problems';


CREATE TABLE `newsletter_queue` (
  `queue_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Queue Id',
  `template_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Template Id',
  `newsletter_type` int(11) DEFAULT NULL COMMENT 'Newsletter Type',
  `newsletter_text` text COMMENT 'Newsletter Text',
  `newsletter_styles` text COMMENT 'Newsletter Styles',
  `newsletter_subject` varchar(200) DEFAULT NULL COMMENT 'Newsletter Subject',
  `newsletter_sender_name` varchar(200) DEFAULT NULL COMMENT 'Newsletter Sender Name',
  `newsletter_sender_email` varchar(200) DEFAULT NULL COMMENT 'Newsletter Sender Email',
  `queue_status` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue Status',
  `queue_start_at` timestamp NULL DEFAULT NULL COMMENT 'Queue Start At',
  `queue_finish_at` timestamp NULL DEFAULT NULL COMMENT 'Queue Finish At',
  PRIMARY KEY (`queue_id`),
  KEY `IDX_NEWSLETTER_QUEUE_TEMPLATE_ID` (`template_id`),
  CONSTRAINT `FK_NEWSLETTER_QUEUE_TEMPLATE_ID_NEWSLETTER_TEMPLATE_TEMPLATE_ID` FOREIGN KEY (`template_id`) REFERENCES `newsletter_template` (`template_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Queue';


CREATE TABLE `newsletter_queue_link` (
  `queue_link_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Queue Link Id',
  `queue_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue Id',
  `subscriber_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Subscriber Id',
  `letter_sent_at` timestamp NULL DEFAULT NULL COMMENT 'Letter Sent At',
  PRIMARY KEY (`queue_link_id`),
  KEY `IDX_NEWSLETTER_QUEUE_LINK_SUBSCRIBER_ID` (`subscriber_id`),
  KEY `IDX_NEWSLETTER_QUEUE_LINK_QUEUE_ID` (`queue_id`),
  KEY `IDX_NEWSLETTER_QUEUE_LINK_QUEUE_ID_LETTER_SENT_AT` (`queue_id`,`letter_sent_at`),
  CONSTRAINT `FK_NEWSLETTER_QUEUE_LINK_QUEUE_ID_NEWSLETTER_QUEUE_QUEUE_ID` FOREIGN KEY (`queue_id`) REFERENCES `newsletter_queue` (`queue_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_NLTTR_QUEUE_LNK_SUBSCRIBER_ID_NLTTR_SUBSCRIBER_SUBSCRIBER_ID` FOREIGN KEY (`subscriber_id`) REFERENCES `newsletter_subscriber` (`subscriber_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Queue Link';


CREATE TABLE `newsletter_queue_store_link` (
  `queue_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Queue Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  PRIMARY KEY (`queue_id`,`store_id`),
  KEY `IDX_NEWSLETTER_QUEUE_STORE_LINK_STORE_ID` (`store_id`),
  CONSTRAINT `FK_NEWSLETTER_QUEUE_STORE_LINK_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_NLTTR_QUEUE_STORE_LNK_QUEUE_ID_NLTTR_QUEUE_QUEUE_ID` FOREIGN KEY (`queue_id`) REFERENCES `newsletter_queue` (`queue_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Queue Store Link';


CREATE TABLE `newsletter_subscriber` (
  `subscriber_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Subscriber Id',
  `store_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Store Id',
  `change_status_at` timestamp NULL DEFAULT NULL COMMENT 'Change Status At',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Id',
  `subscriber_email` varchar(150) DEFAULT NULL COMMENT 'Subscriber Email',
  `subscriber_status` int(11) NOT NULL DEFAULT '0' COMMENT 'Subscriber Status',
  `subscriber_confirm_code` varchar(32) DEFAULT 'NULL' COMMENT 'Subscriber Confirm Code',
  PRIMARY KEY (`subscriber_id`),
  KEY `IDX_NEWSLETTER_SUBSCRIBER_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_NEWSLETTER_SUBSCRIBER_STORE_ID` (`store_id`),
  CONSTRAINT `FK_NEWSLETTER_SUBSCRIBER_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Subscriber';


CREATE TABLE `newsletter_template` (
  `template_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Template Id',
  `template_code` varchar(150) DEFAULT NULL COMMENT 'Template Code',
  `template_text` text COMMENT 'Template Text',
  `template_text_preprocessed` text COMMENT 'Template Text Preprocessed',
  `template_styles` text COMMENT 'Template Styles',
  `template_type` int(10) unsigned DEFAULT NULL COMMENT 'Template Type',
  `template_subject` varchar(200) DEFAULT NULL COMMENT 'Template Subject',
  `template_sender_name` varchar(200) DEFAULT NULL COMMENT 'Template Sender Name',
  `template_sender_email` varchar(200) DEFAULT NULL COMMENT 'Template Sender Email',
  `template_actual` smallint(5) unsigned DEFAULT '1' COMMENT 'Template Actual',
  `added_at` timestamp NULL DEFAULT NULL COMMENT 'Added At',
  `modified_at` timestamp NULL DEFAULT NULL COMMENT 'Modified At',
  PRIMARY KEY (`template_id`),
  KEY `IDX_NEWSLETTER_TEMPLATE_TEMPLATE_ACTUAL` (`template_actual`),
  KEY `IDX_NEWSLETTER_TEMPLATE_ADDED_AT` (`added_at`),
  KEY `IDX_NEWSLETTER_TEMPLATE_MODIFIED_AT` (`modified_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Template';

INSERT INTO `newsletter_template` (`template_id`, `template_code`, `template_text`, `template_text_preprocessed`, `template_styles`, `template_type`, `template_subject`, `template_sender_name`, `template_sender_email`, `template_actual`, `added_at`, `modified_at`) VALUES
(1,	'Example Newsletter Template',	'{{template config_path=\"design/email/header\"}}\n{{inlinecss file=\"email-inline.css\"}}\n\n<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n<tr>\n    <td class=\"full\">\n        <table class=\"columns\">\n            <tr>\n                <td class=\"email-heading\">\n                    <h1>Welcome</h1>\n                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit,\n                    sed do eiusmod tempor incididunt ut labore et.</p>\n                </td>\n                <td class=\"store-info\">\n                    <h4>Contact Us</h4>\n                    <p>\n                        {{depend store_phone}}\n                        <b>Call Us:</b>\n                        <a href=\"tel:{{var phone}}\">{{var store_phone}}</a><br>\n                        {{/depend}}\n                        {{depend store_hours}}\n                        <span class=\"no-link\">{{var store_hours}}</span><br>\n                        {{/depend}}\n                        {{depend store_email}}\n                        <b>Email:</b> <a href=\"mailto:{{var store_email}}\">{{var store_email}}</a>\n                        {{/depend}}\n                    </p>\n                </td>\n            </tr>\n        </table>\n    </td>\n</tr>\n<tr>\n    <td class=\"full\">\n        <table class=\"columns\">\n            <tr>\n                <td>\n                    <img width=\"600\" src=\"http://placehold.it/600x200\" class=\"main-image\">\n                </td>\n                <td class=\"expander\"></td>\n            </tr>\n        </table>\n        <table class=\"columns\">\n            <tr>\n                <td class=\"panel\">\n                    <p>Phasellus dictum sapien a neque luctus cursus. Pellentesque sem dolor, fringilla et pharetra\n                    vitae. <a href=\"#\">Click it! &raquo;</a></p>\n                </td>\n                <td class=\"expander\"></td>\n            </tr>\n        </table>\n    </td>\n</tr>\n<tr>\n    <td>\n        <table class=\"row\">\n            <tr>\n                <td class=\"half left wrapper\">\n                    <table class=\"columns\">\n                        <tr>\n                            <td>\n                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor\n                                incididunt ut labore et. Lorem ipsum dolor sit amet, consectetur adipisicing elit,\n                                sed do eiusmod tempor incididunt ut labore et. Lorem ipsum dolor sit amet.</p>\n                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor\n                                incididunt ut labore et. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed\n                                do eiusmod tempor incididunt ut labore et. Lorem ipsum dolor sit amet.</p>\n                                <table class=\"button\">\n                                    <tr>\n                                        <td>\n                                            <a href=\"#\">Click Me!</a>\n                                        </td>\n                                    </tr>\n                                </table>\n                            </td>\n                            <td class=\"expander\"></td>\n                        </tr>\n                    </table>\n                </td>\n                <td class=\"half right wrapper last\">\n                    <table class=\"columns\">\n                        <tr>\n                            <td class=\"panel sidebar-links\">\n                                <h6>Header Thing</h6>\n                                <p>Sub-head or something</p>\n                                <table>\n                                    <tr>\n                                        <td>\n                                            <p><a href=\"#\">Just a Plain Link &raquo;</a></p>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <hr/>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <p><a href=\"#\">Just a Plain Link &raquo;</a></p>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <hr/>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <p><a href=\"#\">Just a Plain Link &raquo;</a></p>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <hr/>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <p><a href=\"#\">Just a Plain Link &raquo;</a></p>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <hr/>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <p><a href=\"#\">Just a Plain Link &raquo;</a></p>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <hr/>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <p><a href=\"#\">Just a Plain Link &raquo;</a></p>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <hr/>\n                                        </td>\n                                    </tr>\n                                    <tr>\n                                        <td>\n                                            <p><a href=\"#\">Just a Plain Link &raquo;</a></p>\n                                        </td>\n                                    </tr>\n                                    <tr><td>&nbsp;</td></tr>\n                                </table>\n                            </td>\n                            <td class=\"expander\"></td>\n                        </tr>\n                    </table>\n                    <br>\n                    <table class=\"columns\">\n                        <tr>\n                            <td class=\"panel\">\n                                <h6>Connect With Us:</h6>\n                                <table class=\"social-button facebook\">\n                                    <tr>\n                                        <td>\n                                            <a href=\"#\">Facebook</a>\n                                        </td>\n                                    </tr>\n                                </table>\n                                <hr>\n                                <table class=\"social-button twitter\">\n                                    <tr>\n                                        <td>\n                                            <a href=\"#\">Twitter</a>\n                                        </td>\n                                    </tr>\n                                </table>\n                                <hr>\n                                <table class=\"social-button google-plus\">\n                                    <tr>\n                                        <td>\n                                            <a href=\"#\">Google +</a>\n                                        </td>\n                                    </tr>\n                                </table>\n                                <br>\n                                <h6>Contact Info:</h6>\n                                {{depend store_phone}}\n                                <p>\n                                    <b>Call Us:</b>\n                                    <a href=\"tel:{{var phone}}\">{{var store_phone}}</a>\n                                </p>\n                                {{/depend}}\n                                {{depend store_hours}}\n                                <p><span class=\"no-link\">{{var store_hours}}</span><br></p>\n                                {{/depend}}\n                                {{depend store_email}}\n                                <p><b>Email:</b> <a href=\"mailto:{{var store_email}}\">{{var store_email}}</a></p>\n                                {{/depend}}\n                            </td>\n                            <td class=\"expander\"></td>\n                        </tr>\n                    </table>\n                </td>\n            </tr>\n        </table>\n        <table class=\"row\">\n            <tr>\n                <td class=\"full wrapper\">\n                    {{block type=\"catalog/product_new\" template=\"email/catalog/product/new.phtml\" products_count=\"4\"\n                    column_count=\"4\" }}\n                </td>\n            </tr>\n        </table>\n        <table class=\"row\">\n            <tr>\n                <td class=\"full wrapper last\">\n                    <table class=\"columns\">\n                        <tr>\n                            <td align=\"center\">\n                                <center>\n                                    <p><a href=\"#\">Terms</a> | <a href=\"#\">Privacy</a> | <a href=\"#\">Unsubscribe</a></p>\n                                </center>\n                            </td>\n                            <td class=\"expander\"></td>\n                        </tr>\n                    </table>\n                </td>\n            </tr>\n        </table>\n    </td>\n</tr>\n</table>\n\n{{template config_path=\"design/email/footer\"}}',	NULL,	NULL,	2,	'Example Subject',	'Owner',	'owner@example.com',	1,	'2017-07-17 11:56:18',	'2017-07-17 11:56:18');

CREATE TABLE `oauth_consumer` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `name` varchar(255) NOT NULL COMMENT 'Name of consumer',
  `key` varchar(32) NOT NULL COMMENT 'Key code',
  `secret` varchar(32) NOT NULL COMMENT 'Secret code',
  `callback_url` varchar(255) DEFAULT NULL COMMENT 'Callback URL',
  `rejected_callback_url` varchar(255) NOT NULL COMMENT 'Rejected callback URL',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_OAUTH_CONSUMER_KEY` (`key`),
  UNIQUE KEY `UNQ_OAUTH_CONSUMER_SECRET` (`secret`),
  KEY `IDX_OAUTH_CONSUMER_CREATED_AT` (`created_at`),
  KEY `IDX_OAUTH_CONSUMER_UPDATED_AT` (`updated_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='OAuth Consumers';


CREATE TABLE `oauth_nonce` (
  `nonce` varchar(32) NOT NULL COMMENT 'Nonce String',
  `timestamp` int(10) unsigned NOT NULL COMMENT 'Nonce Timestamp',
  UNIQUE KEY `UNQ_OAUTH_NONCE_NONCE` (`nonce`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='oauth_nonce';


CREATE TABLE `oauth_token` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `consumer_id` int(10) unsigned NOT NULL COMMENT 'Consumer ID',
  `admin_id` int(10) unsigned DEFAULT NULL COMMENT 'Admin user ID',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer user ID',
  `type` varchar(16) NOT NULL COMMENT 'Token Type',
  `token` varchar(32) NOT NULL COMMENT 'Token',
  `secret` varchar(32) NOT NULL COMMENT 'Token Secret',
  `verifier` varchar(32) DEFAULT NULL COMMENT 'Token Verifier',
  `callback_url` varchar(255) NOT NULL COMMENT 'Token Callback URL',
  `revoked` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Token revoked',
  `authorized` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Token authorized',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Token creation timestamp',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_OAUTH_TOKEN_TOKEN` (`token`),
  KEY `IDX_OAUTH_TOKEN_CONSUMER_ID` (`consumer_id`),
  KEY `FK_OAUTH_TOKEN_ADMIN_ID_ADMIN_USER_USER_ID` (`admin_id`),
  KEY `FK_OAUTH_TOKEN_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` (`customer_id`),
  CONSTRAINT `FK_OAUTH_TOKEN_ADMIN_ID_ADMIN_USER_USER_ID` FOREIGN KEY (`admin_id`) REFERENCES `admin_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_OAUTH_TOKEN_CONSUMER_ID_OAUTH_CONSUMER_ENTITY_ID` FOREIGN KEY (`consumer_id`) REFERENCES `oauth_consumer` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_OAUTH_TOKEN_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='OAuth Tokens';


CREATE TABLE `partners` (
  `partners_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `url_path` varchar(255) NOT NULL DEFAULT '',
  `job_title` varchar(255) NOT NULL DEFAULT '',
  `filename` varchar(255) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '0',
  `created_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`partners_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `partners` (`partners_id`, `name`, `url_path`, `job_title`, `filename`, `description`, `status`, `created_time`, `update_time`) VALUES
(1,	'Elfriede Jelinek',	'partner/elfriede-jelinek',	'Nobel Laureate in Literature 2004',	'220px-Elfriede_jelinek_2004_small.png',	'<p>Nobel Laureate in Literature 2004</p>',	1,	'2018-06-19 16:05:06',	'2018-06-19 16:05:06'),
(2,	'Vera Ingrid Grant',	'partner/vera-ingrid-grant',	'Director of the Ethelbert Cooper Gallery of African & African American Art at the Hutchins Center, Harvard University',	'vera.jpg',	'<p>Director of the Ethelbert Cooper Gallery of African &amp; African American Art at the Hutchins Center, Harvard University</p>',	1,	'2018-06-19 16:05:39',	'2018-06-19 16:05:39'),
(3,	'Diane Rosenfeld',	'partner/diane-rosenfeld',	'Lecturer in Law, Harvard University Law School',	'diana.jpg',	'<p>Diane L. Rosenfeld is a lecturer on Law and Director of the Gender Violence Program at Harvard Law School.</p>\r\n<p><a href=\"http://dianerosenfeld.org/about/\" target=\"_blank\">dianerosenfeld.org/about</a></p>',	1,	'2018-06-19 16:05:55',	'2018-06-19 16:05:55'),
(4,	'Maria Jaschok',	'partner/maria-jaschok',	'Director, International Gender Studies Centre, Lady Margaret Hall, University of Oxford',	'M_Jaschok.jpg',	'<p>Director, International Gender Studies Centre, Lady Margaret Hall, University of Oxford</p>',	1,	'2018-06-19 16:06:09',	'2018-06-19 16:06:09'),
(5,	'Owolabi Bjalkander',	'partner/owolabi-bjalkander',	'',	'',	'<p>former Parliamentary Assistant to Christine McCafferty, MP (2003 UK Female Genital Mutilation Bill), Sierra Leone</p>',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:17:01'),
(6,	'Dr. Obioma Nnaemeka',	'partner/dr--obioma-nnaemeka',	'Professor of French & Women’s Studies',	'obioma.png',	'<p>Chancellor&rsquo;s Distinguished Professor of French, Women&rsquo;s/Gender Studies and African/African Diaspora Studies, Director of the Women&rsquo;s Studies Program at Indiana University, Indianapolis, USA as well as President of the Association of African Women Scholars and the President/CEO of the Jessie Obidiegwu Education Fund.</p>',	1,	'2018-01-30 14:41:29',	'2018-01-30 14:41:29'),
(7,	'Fatoumata Siré-Diakité',	'partner/fatoumata-sire-diakite',	'Ambassador from Mali to Germany and Founder/President',	'',	'<p>Association pour le Progr&egrave;s et la D&eacute;fense des Femmes Maliennes, Bamako/Berlin</p>',	2,	'2017-12-18 10:10:21',	'2017-12-18 10:10:21'),
(8,	'Dr. Pierrette Herzberger-Fofana',	'partner/dr--pierrette-herzberger-fofana',	'City Councilwoman and author',	'pierrette.jpg',	'<p>City Councilwoman, Erlangen; Board member and former president FORWARD-Germany; recipient of <em>Helene Weber</em>&nbsp;Prize&nbsp;2009 and in 2003 public recognition from the President of Senegal for her book <em>Litt&eacute;rature F&eacute;minine Francophone d&rsquo;Afrique noire suivi d&rsquo;un Dictionnaire des Romanci&egrave;res</em></p>',	1,	'2018-01-30 14:44:35',	'2018-01-30 14:44:35'),
(9,	'Dr. Angelika Köster-Lossack',	'partner/dr--angelika-koster-lossack',	'',	'Angelika.jpg',	'<p>Former Green Party representative in the German Bundestag (Parliament), co-founder of FORWARD-Germany, e.V. against FGM (far right in picture)</p>',	1,	'2018-01-30 14:47:03',	'2018-01-30 14:47:03'),
(10,	'Florence Howe',	'partner/florence-howe',	'',	'',	'<p>Founding Publisher/Director of The Feminist Press at CUNY</p>',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:23:23'),
(11,	'Shulamit Reinharz',	'partner/shulamit-reinharz',	'Founding Director',	'',	'Women’s Studies Center and Hadasseh-Brandeis Institute, Brandeis University, USA',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:23:41'),
(12,	'Mariame Racine Sow',	'partner/mariame-racine-sow',	'Project Officer',	'',	'Groupe pour l\'Etude et l’Enseignement de la Population, Dakar, Senegal',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:25:09'),
(13,	'Fana Habteab',	'partner/fana-habteab',	'President',	'',	'European Network against Harmful Traditional Practices, especially Female Genital Mutilation (EuroNet-FGM), Sweden',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:26:01'),
(14,	'Frankie Hutton',	'partner/frankie-hutton',	'',	'',	'Amistad Commission Member, State of New Jersey and founder, The Rose Project',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:26:32'),
(15,	'Godfrey Williams-Okorodus',	'partner/godfrey-williams-okorodus',	'Artist',	'',	'Nigeria/Belgium',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:26:58'),
(16,	'Erica Pomerance',	'partner/erica-pomerance',	'Filmmaker',	'',	'Montreal, Canada',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:27:17'),
(17,	'Yayehyirad Kitaw',	'partner/yayehyirad-kitaw',	'Physician',	'',	'Advisory Council, Ethiopian Public Health Authority and Editor-in-Chief, Journal on Female Genital Mutilation, Scientific Organ of the Inter-African Committee University of Addis Ababa, Ethiopia',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:28:53'),
(18,	'Berhane Ras-Work',	'partner/berhane-ras-work',	'Founding President',	'',	'Inter-African Committee',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:29:53'),
(19,	'Adriana Kaplan Marcusan',	'partner/adriana-kaplan-marcusan',	'',	'',	'Universidad Autonoma de Barcelona and Founder, Wassukafo, The Gambia',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:30:28'),
(20,	'Augustine H. Asaah',	'partner/augustine-h--asaah',	'Head',	'',	'Department of Modern Languages, University of Ghana',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:31:08'),
(21,	'Hanny Lightfoot-Klein',	'partner/hanny-lightfoot-klein',	'',	'',	'Activist and Author, USA',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:31:46'),
(22,	'Soraya Mire',	'partner/soraya-mire',	'Activist',	'',	'Filmmaker and Author, Somalia/ USA',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:32:07'),
(23,	'Comfort Momoh',	'partner/comfort-momoh',	'',	'',	'M.B.E., FGM Specialist Midwife, African Well Woman Clinic, St. Thomas\' Hospital, London',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:39:27'),
(24,	'Marianne Sarkis',	'partner/marianne-sarkis',	'',	'',	'Medical Anthropologist and Director/Webmaster FGM Education and Networking Project, Worcester, MA',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:39:49'),
(25,	'Linda May Kallestein',	'partner/linda-may-kallestein',	'Journalist and Filmmaker (The CUT)',	'',	'Journalist and Filmmaker (The CUT), Norway',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:40:25'),
(26,	'Marilyn Safir',	'partner/marilyn-safir',	'',	'',	'Professor of Women’s Studies and Psychology, University of Haifa, Israel',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:40:50'),
(27,	'Dagmar Schultz',	'partner/dagmar-schultz',	'Founding Publisher',	'',	'<p>Founding Publisher, Orlanda Frauenverlag, Berlin</p>',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:41:48'),
(28,	'Lucy Mashua',	'partner/lucy-mashua',	'',	'',	'Global Ambassador Fighting Female Genital Mutilation (FGM), Kenya/USA',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:41:34'),
(29,	'Waltraud Dumont du Voitel',	'partner/waltraud-dumont-du-voitel',	'',	'',	'German Foundation for Gender Studies/Feminist Europa, Heidelberg',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:42:17'),
(30,	'Sarah McCulloch',	'partner/sarah-mcculloch',	'',	'',	'Founder and Director, ACCM – UK',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:42:53'),
(31,	'Mary Ann Smorra',	'partner/mary-ann-smorra',	'Professor of Education',	'',	'Professor of Education, Georgian Court University,NJ, USA',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:43:28'),
(32,	'Sachiko Mitsumori',	'partner/sachiko-mitsumori',	'',	'',	'Women’s Action against FGM, Tokyo, Japan',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:43:51'),
(33,	'Raymond Lloyd',	'partner/raymond-lloyd',	'',	'',	'Honorary Secretary Council for Parity Democracy, UK, www.shequality.org',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:44:10'),
(34,	'Efua Dorkenoo',	'partner/efua-dorkenoo',	'',	'',	'OBE, Advocacy Director-FGM Programme, Equality Now; former WHO Technical Expert on FGM (1995-2001) and founder of  FORWARD UK',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:44:25'),
(35,	'Lois A. Herman',	'partner/lois-a--herman',	'Coordinator',	'',	'Coordinator, Women’s UN Report Network (WUNRN)',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:44:46'),
(36,	'Gabi Helfert',	'partner/gabi-helfert',	'Photographer',	'',	'Photographer, Sustainability Project Manager and Social Media Consultant, Rotterdam, The Netherlands',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:45:14'),
(37,	'Libana',	'partner/libana',	'',	'',	'<p>Global Music Connecting Cultures, <a title=\"www.libana.com\" href=\"http://www.libana.com\">www.libana.com</a></p>',	1,	'2011-08-02 00:00:00',	'2012-08-02 07:49:31'),
(38,	'Christiane Adamczyk',	'partner/christiane-adamczyk',	'GIZ',	'',	'<p><a href=\"http://www.giz.de\">http://www.giz.de</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 12:53:03'),
(39,	'Adebisi Adebayo',	'partner/adebisi-adebayo',	'Executive Director, IAC Geneva & Dr. Yayeyirad Kitaw, Editor-in-Chief, Journal on Female Genital Mutilation and Other Harmful Traditional Practices',	'',	'<p>Scientific Organ of the IAC [Inter-African Committee]. University of Addis Ababa, Ethiopia</p>\n<p><a href=\"https://www.facebook.com/pages/Inter-African-Committee-IAC/204034110324\">https://www.facebook.com/pages/Inter-African-Committee-IAC/204034110324</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 12:56:59'),
(40,	'Neneh Bojang',	'partner/neneh-bojang',	'IAC – Norway  and EuroNet – FGM',	'',	'<p><a href=\"http://www.iacnorway.org/index.php?lang=en\">http://www.iacnorway.org/index.php?lang=en</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:01:15'),
(41,	'Emma Bonino',	'partner/emma-bonino',	'No Peace Without Justice',	'',	'<p><a href=\"http://www.npwj.org/FGM/Overview.html\">http://www.npwj.org/FGM/Overview.html</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:02:08'),
(42,	'Hilary Burrage',	'partner/hilary-burrage',	'#NoFGM',	'',	'<p><a href=\"http://hilaryburrage.com/fgm/\">http://hilaryburrage.com/fgm/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:02:58'),
(43,	'Katharina Buss',	'partner/katharina-buss',	'Terre des Femmes – CHANGE Project, DAPHNE Grant',	'',	'<p><a href=\"www.change-agent.eu\">www.change-agent.eu</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:03:59'),
(44,	'Daniela Colombo',	'partner/daniela-colombo',	'AIDOS',	'',	'<p><a href=\"http://www.aidos.it/\">http://www.aidos.it/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:04:57'),
(45,	'Nikki Denholme',	'partner/nikki-denholme',	'FGM Education Programme Nerw Zealand',	'',	'<p><a href=\"http://www.fgm.co.nz/\">http://www.fgm.co.nz/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:05:30'),
(46,	'Fatoumata Siré Diakité and Dr. Aminata Diakité',	'partner/fatoumata-sire-diakite-and-dr--aminata-diakite',	'APDF',	'',	'<p><a href=\"http://courantsdefemmes.free.fr/Assoces/Mali/APDF/apdf.html\">http://courantsdefemmes.free.fr/Assoces/Mali/APDF/apdf.html</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:06:39'),
(47,	'Cody Donahue',	'partner/cody-donahue',	'Consultant, Child Protection, Programme Division, UNICEF',	'',	'<p><a href=\"http://www.unfpa.org/webdav/site/global/shared/documents/publications/2012/Annual_report_on_FGM-C_2011_low_res.pdf\">http://www.unfpa.org/webdav/site/global/shared/documents/publications/2012/Annual_report_on_FGM-C_2011_low_res.pdf</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:08:04'),
(48,	'Efua Dorkenoo-',	'partner/efua-dorkenoo-',	'Equality Now',	'',	'<p><a href=\"http://mashuavoiceforthevoiceless.blogspot.de/ http://www.equalitynow.org/fgm\">http://mashuavoiceforthevoiceless.blogspot.de/ http://www.equalitynow.org/fgm</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:09:11'),
(49,	'Excisions parlons-en',	'partner/excisions-parlons-en',	'',	'',	'<p><a href=\"http://www.excisionparlonsen.org/\">http://www.excisionparlonsen.org/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:11:30'),
(50,	'Dr. Isabelle Gillette-Faye',	'partner/dr--isabelle-gillette-faye',	'GAMS',	'',	'<p><a href=\"http://www.federationgams.org/presentation.php\">http://www.federationgams.org/presentation.php</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:13:00'),
(51,	'Dr. Pierrette Herzberger-Fofana and Heidi Besas',	'partner/dr--pierrette-herzberger-fofana-and-heidi-besas',	'Eexecutive Director',	'',	'<p><a href=\"http://www.female-genital-mutilation-fgm.forward-deutschland.de/1.html\">http://www.female-genital-mutilation-fgm.forward-deutschland.de/1.html</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:14:02'),
(52,	'Dr. Frankie Hutton',	'partner/dr--frankie-hutton',	'Rose Project',	'',	'<p><a href=\"http://roseproject.com/\">http://roseproject.com/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:16:31'),
(53,	'Heba El Kala’awy',	'partner/heba-el-kalaawy',	'Intact Network & Population Council',	'',	'<p><a href=\"http://www.intact-network.net/intact/index.php\">http://www.intact-network.net/intact/index.php</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:17:12'),
(54,	'Khady Koita and Els Leye',	'partner/khady-koita-and-els-leye',	'La Palabre',	'',	'<p><a href=\"http://mashuavoiceforthevoiceless.blogspot.de/\">http://mashuavoiceforthevoiceless.blogspot.de/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:27:09'),
(55,	'Lucy Mashua-',	'partner/lucy-mashua-',	'Global Ambassador against FGM',	'',	'<p><a href=\"http://mashuavoiceforthevoiceless.blogspot.de/\">http://mashuavoiceforthevoiceless.blogspot.de/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:29:54'),
(56,	'Sarah McCulloch-',	'partner/sarah-mcculloch-',	'ACCM (Agency for Culture and Change Management) Sheffield',	'',	'<p><a href=\"http://www.accmsheffield.org/?target=home\">http://www.accmsheffield.org/?target=home</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:30:32'),
(57,	'Susan McLucas',	'partner/susan-mclucas',	'Sini Sanumen / Healthy Tomorrow',	'',	'<p><a href=\"http://www.stopexcision.net/\">http://www.stopexcision.net/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:32:06'),
(58,	'Sachiko Mitsumori-',	'partner/sachiko-mitsumori-',	'Women’s Action against FGM - Japan',	'',	'<p><a href=\"http://connection.ebscohost.com/c/articles/2742331/womens-action-against-fgm-japan-waaf\">http://connection.ebscohost.com/c/articles/2742331/womens-action-against-fgm-japan-waaf</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:32:54'),
(59,	'Thomas von der Osten-Sacken',	'partner/thomas-von-der-osten-sacken',	'WADI',	'',	'<p><a href=\"http://www.wadi-online.de/\">http://www.wadi-online.de/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:45:06'),
(60,	'Naana Otoo-Oyortey',	'partner/naana-otoo-oyortey',	'',	'',	'<p><a href=\"http://www.forwarduk.org.uk/\">http://www.forwarduk.org.uk/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:37:38'),
(61,	'Holger Postulart and Elizabeth Wilson',	'partner/holger-postulart-and-elizabeth-wilson',	'Global Alliance against Female Genital Mutilation',	'',	'<p><a href=\"http://www.global-alliance-fgm.org/\">http://www.global-alliance-fgm.org/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:38:21'),
(62,	'Rebecca Salonen',	'partner/rebecca-salonen',	'Godparents\' Association',	'',	'<p><a href=\"http://godparents.net/\">http://godparents.net/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:39:12'),
(63,	'Dirk Wüstenberg and Ibrahim Gueye',	'partner/dirk-wustenberg-and-ibrahim-gueye',	'INTEGRA',	'',	'<p><a href=\"http://www.netzwerk-integra.de/\">http://www.netzwerk-integra.de/</a></p>',	1,	'2011-08-01 00:00:00',	'2013-09-06 13:39:52');

CREATE TABLE `paypal_cert` (
  `cert_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Cert Id',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
  `content` text COMMENT 'Content',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  PRIMARY KEY (`cert_id`),
  KEY `IDX_PAYPAL_CERT_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_PAYPAL_CERT_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Paypal Certificate Table';


CREATE TABLE `paypal_payment_transaction` (
  `transaction_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `txn_id` varchar(100) DEFAULT NULL COMMENT 'Txn Id',
  `additional_information` blob COMMENT 'Additional Information',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  PRIMARY KEY (`transaction_id`),
  UNIQUE KEY `UNQ_PAYPAL_PAYMENT_TRANSACTION_TXN_ID` (`txn_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='PayPal Payflow Link Payment Transaction';


CREATE TABLE `paypal_settlement_report` (
  `report_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Report Id',
  `report_date` timestamp NULL DEFAULT NULL COMMENT 'Report Date',
  `account_id` varchar(64) DEFAULT NULL COMMENT 'Account Id',
  `filename` varchar(24) DEFAULT NULL COMMENT 'Filename',
  `last_modified` timestamp NULL DEFAULT NULL COMMENT 'Last Modified',
  PRIMARY KEY (`report_id`),
  UNIQUE KEY `UNQ_PAYPAL_SETTLEMENT_REPORT_REPORT_DATE_ACCOUNT_ID` (`report_date`,`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Paypal Settlement Report Table';


CREATE TABLE `paypal_settlement_report_row` (
  `row_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Row Id',
  `report_id` int(10) unsigned NOT NULL COMMENT 'Report Id',
  `transaction_id` varchar(19) DEFAULT NULL COMMENT 'Transaction Id',
  `invoice_id` varchar(127) DEFAULT NULL COMMENT 'Invoice Id',
  `paypal_reference_id` varchar(19) DEFAULT NULL COMMENT 'Paypal Reference Id',
  `paypal_reference_id_type` varchar(3) DEFAULT NULL COMMENT 'Paypal Reference Id Type',
  `transaction_event_code` varchar(5) DEFAULT NULL COMMENT 'Transaction Event Code',
  `transaction_initiation_date` timestamp NULL DEFAULT NULL COMMENT 'Transaction Initiation Date',
  `transaction_completion_date` timestamp NULL DEFAULT NULL COMMENT 'Transaction Completion Date',
  `transaction_debit_or_credit` varchar(2) NOT NULL DEFAULT 'CR' COMMENT 'Transaction Debit Or Credit',
  `gross_transaction_amount` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Gross Transaction Amount',
  `gross_transaction_currency` varchar(3) DEFAULT '' COMMENT 'Gross Transaction Currency',
  `fee_debit_or_credit` varchar(2) DEFAULT NULL COMMENT 'Fee Debit Or Credit',
  `fee_amount` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Fee Amount',
  `fee_currency` varchar(3) DEFAULT NULL COMMENT 'Fee Currency',
  `custom_field` varchar(255) DEFAULT NULL COMMENT 'Custom Field',
  `consumer_id` varchar(127) DEFAULT NULL COMMENT 'Consumer Id',
  `payment_tracking_id` varchar(255) DEFAULT NULL COMMENT 'Payment Tracking ID',
  `store_id` varchar(50) DEFAULT NULL COMMENT 'Store ID',
  PRIMARY KEY (`row_id`),
  KEY `IDX_PAYPAL_SETTLEMENT_REPORT_ROW_REPORT_ID` (`report_id`),
  CONSTRAINT `FK_E183E488F593E0DE10C6EBFFEBAC9B55` FOREIGN KEY (`report_id`) REFERENCES `paypal_settlement_report` (`report_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Paypal Settlement Report Row Table';


CREATE TABLE `permission_block` (
  `block_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Block ID',
  `block_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Block Name',
  `is_allowed` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Mark that block can be processed by filters',
  PRIMARY KEY (`block_id`),
  UNIQUE KEY `UNQ_PERMISSION_BLOCK_BLOCK_NAME` (`block_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='System blocks that can be processed via content filter';

INSERT INTO `permission_block` (`block_id`, `block_name`, `is_allowed`) VALUES
(1,	'core/template',	1),
(2,	'catalog/product_new',	1);

CREATE TABLE `permission_variable` (
  `variable_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Variable ID',
  `variable_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Config Path',
  `is_allowed` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Mark that config can be processed by filters',
  PRIMARY KEY (`variable_id`,`variable_name`),
  UNIQUE KEY `UNQ_PERMISSION_VARIABLE_VARIABLE_NAME` (`variable_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='System variables that can be processed via content filter';

INSERT INTO `permission_variable` (`variable_id`, `variable_name`, `is_allowed`) VALUES
(1,	'trans_email/ident_support/name',	1),
(2,	'trans_email/ident_support/email',	1),
(3,	'web/unsecure/base_url',	1),
(4,	'web/secure/base_url',	1),
(5,	'trans_email/ident_general/name',	1),
(6,	'trans_email/ident_general/email',	1),
(7,	'trans_email/ident_sales/name',	1),
(8,	'trans_email/ident_sales/email',	1),
(9,	'trans_email/ident_custom1/name',	1),
(10,	'trans_email/ident_custom1/email',	1),
(11,	'trans_email/ident_custom2/name',	1),
(12,	'trans_email/ident_custom2/email',	1),
(13,	'general/store_information/name',	1),
(14,	'general/store_information/phone',	1),
(15,	'general/store_information/address',	1);

CREATE TABLE `persistent_session` (
  `persistent_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Session id',
  `key` varchar(50) NOT NULL COMMENT 'Unique cookie key',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer id',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `info` text COMMENT 'Session Data',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  PRIMARY KEY (`persistent_id`),
  UNIQUE KEY `IDX_PERSISTENT_SESSION_KEY` (`key`),
  UNIQUE KEY `IDX_PERSISTENT_SESSION_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_PERSISTENT_SESSION_UPDATED_AT` (`updated_at`),
  KEY `FK_PERSISTENT_SESSION_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_PERSISTENT_SESSION_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `FK_PERSISTENT_SESSION_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Persistent Session';


CREATE TABLE `poll` (
  `poll_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Poll Id',
  `poll_title` varchar(255) DEFAULT NULL COMMENT 'Poll title',
  `votes_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Votes Count',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store id',
  `date_posted` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Date posted',
  `date_closed` timestamp NULL DEFAULT NULL COMMENT 'Date closed',
  `active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Is active',
  `closed` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Is closed',
  `answers_display` smallint(6) DEFAULT NULL COMMENT 'Answers display',
  PRIMARY KEY (`poll_id`),
  KEY `IDX_POLL_STORE_ID` (`store_id`),
  CONSTRAINT `FK_POLL_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Poll';


CREATE TABLE `poll_answer` (
  `answer_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Answer Id',
  `poll_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Poll Id',
  `answer_title` varchar(255) DEFAULT NULL COMMENT 'Answer title',
  `votes_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Votes Count',
  `answer_order` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Answers display',
  PRIMARY KEY (`answer_id`),
  KEY `IDX_POLL_ANSWER_POLL_ID` (`poll_id`),
  CONSTRAINT `FK_POLL_ANSWER_POLL_ID_POLL_POLL_ID` FOREIGN KEY (`poll_id`) REFERENCES `poll` (`poll_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Poll Answers';


CREATE TABLE `poll_store` (
  `poll_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Poll Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store id',
  PRIMARY KEY (`poll_id`,`store_id`),
  KEY `IDX_POLL_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_POLL_STORE_POLL_ID_POLL_POLL_ID` FOREIGN KEY (`poll_id`) REFERENCES `poll` (`poll_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_POLL_STORE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Poll Store';


CREATE TABLE `poll_vote` (
  `vote_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Vote Id',
  `poll_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Poll Id',
  `poll_answer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Poll answer id',
  `ip_address` varbinary(16) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL COMMENT 'Customer id',
  `vote_time` timestamp NULL DEFAULT NULL COMMENT 'Date closed',
  PRIMARY KEY (`vote_id`),
  KEY `IDX_POLL_VOTE_POLL_ANSWER_ID` (`poll_answer_id`),
  CONSTRAINT `FK_POLL_VOTE_POLL_ANSWER_ID_POLL_ANSWER_ANSWER_ID` FOREIGN KEY (`poll_answer_id`) REFERENCES `poll_answer` (`answer_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Poll Vote';


CREATE TABLE `product_alert_price` (
  `alert_price_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Product alert price id',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer id',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product id',
  `price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price amount',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website id',
  `add_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Product alert add date',
  `last_send_date` timestamp NULL DEFAULT NULL COMMENT 'Product alert last send date',
  `send_count` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Product alert send count',
  `status` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Product alert status',
  PRIMARY KEY (`alert_price_id`),
  KEY `IDX_PRODUCT_ALERT_PRICE_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_PRODUCT_ALERT_PRICE_PRODUCT_ID` (`product_id`),
  KEY `IDX_PRODUCT_ALERT_PRICE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_PRD_ALERT_PRICE_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_PRODUCT_ALERT_PRICE_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_PRODUCT_ALERT_PRICE_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Product Alert Price';


CREATE TABLE `product_alert_stock` (
  `alert_stock_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Product alert stock id',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer id',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product id',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website id',
  `add_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Product alert add date',
  `send_date` timestamp NULL DEFAULT NULL COMMENT 'Product alert send date',
  `send_count` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Send Count',
  `status` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Product alert status',
  PRIMARY KEY (`alert_stock_id`),
  KEY `IDX_PRODUCT_ALERT_STOCK_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_PRODUCT_ALERT_STOCK_PRODUCT_ID` (`product_id`),
  KEY `IDX_PRODUCT_ALERT_STOCK_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_PRD_ALERT_STOCK_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_PRODUCT_ALERT_STOCK_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_PRODUCT_ALERT_STOCK_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Product Alert Stock';


CREATE TABLE `rating` (
  `rating_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rating Id',
  `entity_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Id',
  `rating_code` varchar(64) NOT NULL COMMENT 'Rating Code',
  `position` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Position On Frontend',
  PRIMARY KEY (`rating_id`),
  UNIQUE KEY `UNQ_RATING_RATING_CODE` (`rating_code`),
  KEY `IDX_RATING_ENTITY_ID` (`entity_id`),
  CONSTRAINT `FK_RATING_ENTITY_ID_RATING_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `rating_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Ratings';

INSERT INTO `rating` (`rating_id`, `entity_id`, `rating_code`, `position`) VALUES
(1,	1,	'Quality',	0),
(2,	1,	'Value',	0),
(3,	1,	'Price',	0);

CREATE TABLE `rating_entity` (
  `entity_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `entity_code` varchar(64) NOT NULL COMMENT 'Entity Code',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_RATING_ENTITY_ENTITY_CODE` (`entity_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rating entities';

INSERT INTO `rating_entity` (`entity_id`, `entity_code`) VALUES
(1,	'product'),
(2,	'product_review'),
(3,	'review');

CREATE TABLE `rating_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rating Option Id',
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Id',
  `code` varchar(32) NOT NULL COMMENT 'Rating Option Code',
  `value` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Option Value',
  `position` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Ration option position on frontend',
  PRIMARY KEY (`option_id`),
  KEY `IDX_RATING_OPTION_RATING_ID` (`rating_id`),
  CONSTRAINT `FK_RATING_OPTION_RATING_ID_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rating options';

INSERT INTO `rating_option` (`option_id`, `rating_id`, `code`, `value`, `position`) VALUES
(1,	1,	'1',	1,	1),
(2,	1,	'2',	2,	2),
(3,	1,	'3',	3,	3),
(4,	1,	'4',	4,	4),
(5,	1,	'5',	5,	5),
(6,	2,	'1',	1,	1),
(7,	2,	'2',	2,	2),
(8,	2,	'3',	3,	3),
(9,	2,	'4',	4,	4),
(10,	2,	'5',	5,	5),
(11,	3,	'1',	1,	1),
(12,	3,	'2',	2,	2),
(13,	3,	'3',	3,	3),
(14,	3,	'4',	4,	4),
(15,	3,	'5',	5,	5);

CREATE TABLE `rating_option_vote` (
  `vote_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Vote id',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Vote option id',
  `remote_ip` varchar(50) DEFAULT NULL,
  `remote_ip_long` varbinary(16) DEFAULT NULL,
  `customer_id` int(10) unsigned DEFAULT '0' COMMENT 'Customer Id',
  `entity_pk_value` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Product id',
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating id',
  `review_id` bigint(20) unsigned DEFAULT NULL COMMENT 'Review id',
  `percent` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Percent amount',
  `value` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Vote option value',
  PRIMARY KEY (`vote_id`),
  KEY `IDX_RATING_OPTION_VOTE_OPTION_ID` (`option_id`),
  KEY `FK_RATING_OPTION_VOTE_REVIEW_ID_REVIEW_REVIEW_ID` (`review_id`),
  CONSTRAINT `FK_RATING_OPTION_VOTE_OPTION_ID_RATING_OPTION_OPTION_ID` FOREIGN KEY (`option_id`) REFERENCES `rating_option` (`option_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_RATING_OPTION_VOTE_REVIEW_ID_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rating option values';


CREATE TABLE `rating_option_vote_aggregated` (
  `primary_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Vote aggregation id',
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating id',
  `entity_pk_value` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Product id',
  `vote_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Vote dty',
  `vote_value_sum` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'General vote sum',
  `percent` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Vote percent',
  `percent_approved` smallint(6) DEFAULT '0' COMMENT 'Vote percent approved by admin',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  PRIMARY KEY (`primary_id`),
  KEY `IDX_RATING_OPTION_VOTE_AGGREGATED_RATING_ID` (`rating_id`),
  KEY `IDX_RATING_OPTION_VOTE_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `FK_RATING_OPTION_VOTE_AGGREGATED_RATING_ID_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_RATING_OPTION_VOTE_AGGREGATED_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rating vote aggregated';


CREATE TABLE `rating_store` (
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store id',
  PRIMARY KEY (`rating_id`,`store_id`),
  KEY `IDX_RATING_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_RATING_STORE_RATING_ID_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `FK_RATING_STORE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rating Store';


CREATE TABLE `rating_title` (
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `value` varchar(255) NOT NULL COMMENT 'Rating Label',
  PRIMARY KEY (`rating_id`,`store_id`),
  KEY `IDX_RATING_TITLE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_RATING_TITLE_RATING_ID_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_RATING_TITLE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rating Title';


CREATE TABLE `report_compared_product_index` (
  `index_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Index Id',
  `visitor_id` int(10) unsigned DEFAULT NULL COMMENT 'Visitor Id',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `added_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Added At',
  PRIMARY KEY (`index_id`),
  UNIQUE KEY `UNQ_REPORT_COMPARED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  UNIQUE KEY `UNQ_REPORT_COMPARED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `IDX_REPORT_COMPARED_PRODUCT_INDEX_STORE_ID` (`store_id`),
  KEY `IDX_REPORT_COMPARED_PRODUCT_INDEX_ADDED_AT` (`added_at`),
  KEY `IDX_REPORT_COMPARED_PRODUCT_INDEX_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_REPORT_CMPD_PRD_IDX_CSTR_ID_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_CMPD_PRD_IDX_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_COMPARED_PRODUCT_INDEX_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Reports Compared Product Index Table';


CREATE TABLE `report_event` (
  `event_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event Id',
  `logged_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Logged At',
  `event_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Event Type Id',
  `object_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Object Id',
  `subject_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Subject Id',
  `subtype` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Subtype',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store Id',
  PRIMARY KEY (`event_id`),
  KEY `IDX_REPORT_EVENT_EVENT_TYPE_ID` (`event_type_id`),
  KEY `IDX_REPORT_EVENT_SUBJECT_ID` (`subject_id`),
  KEY `IDX_REPORT_EVENT_OBJECT_ID` (`object_id`),
  KEY `IDX_REPORT_EVENT_SUBTYPE` (`subtype`),
  KEY `IDX_REPORT_EVENT_STORE_ID` (`store_id`),
  CONSTRAINT `FK_REPORT_EVENT_EVENT_TYPE_ID_REPORT_EVENT_TYPES_EVENT_TYPE_ID` FOREIGN KEY (`event_type_id`) REFERENCES `report_event_types` (`event_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_EVENT_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Reports Event Table';


CREATE TABLE `report_event_types` (
  `event_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event Type Id',
  `event_name` varchar(64) NOT NULL COMMENT 'Event Name',
  `customer_login` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Login',
  PRIMARY KEY (`event_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Reports Event Type Table';

INSERT INTO `report_event_types` (`event_type_id`, `event_name`, `customer_login`) VALUES
(1,	'catalog_product_view',	0),
(2,	'sendfriend_product',	0),
(3,	'catalog_product_compare_add_product',	0),
(4,	'checkout_cart_add_product',	0),
(5,	'wishlist_add_product',	0),
(6,	'wishlist_share',	0);

CREATE TABLE `report_viewed_product_aggregated_daily` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product Id',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `views_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Number of Views',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_REPORT_VIEWED_PRD_AGGRED_DAILY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_AGGREGATED_DAILY_STORE_ID` (`store_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_AGGREGATED_DAILY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_REPORT_VIEWED_PRD_AGGRED_DAILY_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_VIEWED_PRD_AGGRED_DAILY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Most Viewed Products Aggregated Daily';

INSERT INTO `report_viewed_product_aggregated_daily` (`id`, `period`, `store_id`, `product_id`, `product_name`, `product_price`, `views_num`, `rating_pos`) VALUES
(1,	'2018-01-15',	1,	2,	'Undoing FGM',	17.0000,	1,	2),
(2,	'2018-01-15',	1,	4,	'Waging Empathy',	17.0000,	1,	3),
(3,	'2018-01-15',	1,	7,	'Taboo',	17.0000,	1,	4),
(4,	'2018-01-15',	1,	9,	'In the Name of Tradition',	17.0000,	3,	1),
(5,	'2018-01-16',	1,	8,	'Stones: A Novel',	16.1100,	1,	1),
(6,	'2018-01-16',	1,	9,	'In the Name of Tradition',	17.0000,	1,	2),
(7,	'2018-01-17',	1,	4,	'Waging Empathy',	17.0000,	1,	1),
(8,	'2018-01-17',	1,	8,	'Stones: A Novel',	16.1100,	1,	2),
(9,	'2018-01-18',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	2,	5),
(10,	'2018-01-18',	1,	2,	'Undoing FGM',	17.0000,	4,	2),
(11,	'2018-01-18',	1,	4,	'Waging Empathy',	17.0000,	2,	4),
(12,	'2018-01-18',	1,	8,	'Stones: A Novel',	16.1100,	8,	1),
(13,	'2018-01-18',	1,	9,	'In the Name of Tradition',	17.0000,	3,	3),
(14,	'2018-01-19',	1,	7,	'Taboo',	17.0000,	1,	3),
(15,	'2018-01-19',	1,	8,	'Stones: A Novel',	16.1100,	9,	1),
(16,	'2018-01-19',	1,	9,	'In the Name of Tradition',	17.0000,	5,	2),
(17,	'2018-01-21',	1,	9,	'In the Name of Tradition',	17.0000,	1,	1),
(18,	'2018-01-22',	1,	4,	'Waging Empathy',	17.0000,	6,	1),
(19,	'2018-01-22',	1,	7,	'Taboo',	17.0000,	1,	2),
(20,	'2018-01-22',	1,	8,	'Stones: A Novel',	16.1100,	1,	3),
(21,	'2018-01-22',	1,	9,	'In the Name of Tradition',	17.0000,	1,	4),
(22,	'2018-01-28',	1,	4,	'Waging Empathy',	17.0000,	3,	1),
(23,	'2018-01-29',	1,	4,	'Waging Empathy',	17.0000,	3,	1),
(24,	'2018-01-30',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	3,	3),
(25,	'2018-01-30',	1,	2,	'Undoing FGM',	17.0000,	1,	6),
(26,	'2018-01-30',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	1,	7),
(27,	'2018-01-30',	1,	4,	'Waging Empathy',	17.0000,	13,	2),
(28,	'2018-01-30',	1,	5,	'Kiminta',	17.0000,	1,	8),
(29,	'2018-01-30',	1,	6,	'Rose Lore',	17.0000,	1,	9),
(30,	'2018-01-30',	1,	7,	'Taboo',	17.0000,	2,	5),
(31,	'2018-01-30',	1,	8,	'Stones: A Novel',	16.1100,	2,	4),
(32,	'2018-01-30',	1,	9,	'In the Name of Tradition',	17.0000,	15,	1),
(33,	'2018-01-31',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	8,	1),
(34,	'2018-01-31',	1,	4,	'Waging Empathy',	17.0000,	5,	3),
(35,	'2018-01-31',	1,	8,	'Stones: A Novel',	16.1100,	1,	4),
(36,	'2018-01-31',	1,	9,	'In the Name of Tradition',	17.0000,	7,	2),
(37,	'2018-02-02',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	12,	1),
(38,	'2018-02-02',	1,	4,	'Waging Empathy',	17.0000,	1,	3),
(39,	'2018-02-02',	1,	9,	'In the Name of Tradition',	17.0000,	10,	2),
(40,	'2018-02-05',	1,	4,	'Waging Empathy',	17.0000,	5,	1),
(41,	'2018-02-09',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	2,	3),
(42,	'2018-02-09',	1,	2,	'Undoing FGM',	17.0000,	1,	9),
(43,	'2018-02-09',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	5,	2),
(44,	'2018-02-09',	1,	4,	'Waging Empathy',	17.0000,	1,	4),
(45,	'2018-02-09',	1,	5,	'Kiminta',	17.0000,	1,	5),
(46,	'2018-02-09',	1,	6,	'Rose Lore',	17.0000,	1,	6),
(47,	'2018-02-09',	1,	7,	'Taboo',	17.0000,	1,	7),
(48,	'2018-02-09',	1,	8,	'Stones: A Novel',	16.1100,	1,	8),
(49,	'2018-02-09',	1,	9,	'In the Name of Tradition',	17.0000,	6,	1),
(50,	'2018-02-21',	1,	9,	'In the Name of Tradition',	17.0000,	1,	1),
(51,	'2018-02-28',	1,	6,	'Rose Lore',	17.0000,	1,	1),
(52,	'2018-03-06',	1,	9,	'In the Name of Tradition',	17.0000,	1,	1),
(53,	'2018-05-28',	1,	4,	'Waging Empathy',	17.0000,	3,	1),
(54,	'2018-05-30',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	2,	6),
(55,	'2018-05-30',	1,	2,	'Undoing FGM',	17.0000,	2,	8),
(56,	'2018-05-30',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	2,	1),
(57,	'2018-05-30',	1,	4,	'Waging Empathy',	17.0000,	2,	2),
(58,	'2018-05-30',	1,	5,	'Kiminta',	17.0000,	2,	3),
(59,	'2018-05-30',	1,	6,	'Rose Lore',	17.0000,	2,	4),
(60,	'2018-05-30',	1,	7,	'Taboo',	17.0000,	2,	5),
(61,	'2018-05-30',	1,	8,	'Stones: A Novel',	16.1100,	2,	7),
(62,	'2018-05-30',	1,	9,	'In the Name of Tradition',	17.0000,	2,	9),
(63,	'2018-06-21',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	1,	2),
(64,	'2018-06-21',	1,	4,	'Waging Empathy',	17.0000,	2,	1),
(65,	'2018-06-25',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	1,	2),
(66,	'2018-06-25',	1,	4,	'Waging Empathy',	17.0000,	1,	3),
(67,	'2018-06-25',	1,	8,	'Stones: A Novel',	16.1100,	2,	1),
(68,	'2018-06-26',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	3,	1),
(69,	'2018-06-27',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	1,	4),
(70,	'2018-06-27',	1,	2,	'Undoing FGM',	17.0000,	1,	6),
(71,	'2018-06-27',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	1,	7),
(72,	'2018-06-27',	1,	4,	'Waging Empathy',	17.0000,	3,	3),
(73,	'2018-06-27',	1,	6,	'Rose Lore',	17.0000,	5,	1),
(74,	'2018-06-27',	1,	7,	'Taboo',	17.0000,	1,	8),
(75,	'2018-06-27',	1,	8,	'Stones: A Novel',	16.1100,	4,	2),
(76,	'2018-06-27',	1,	9,	'In the Name of Tradition',	17.0000,	1,	5);

CREATE TABLE `report_viewed_product_aggregated_monthly` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product Id',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `views_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Number of Views',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_REPORT_VIEWED_PRD_AGGRED_MONTHLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_AGGREGATED_MONTHLY_STORE_ID` (`store_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_AGGREGATED_MONTHLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_REPORT_VIEWED_PRD_AGGRED_MONTHLY_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_VIEWED_PRD_AGGRED_MONTHLY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Most Viewed Products Aggregated Monthly';

INSERT INTO `report_viewed_product_aggregated_monthly` (`id`, `period`, `store_id`, `product_id`, `product_name`, `product_price`, `views_num`, `rating_pos`) VALUES
(1,	'2017-09-01',	1,	4,	'Waging Empathy',	22.0000,	51,	1),
(2,	'2017-09-01',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	19.9000,	6,	2),
(3,	'2017-09-01',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	26.9000,	2,	3),
(4,	'2017-09-01',	1,	2,	'Undoing FGM',	26.9000,	1,	4),
(5,	'2017-10-01',	1,	4,	'Waging Empathy',	22.0000,	26,	1),
(6,	'2017-10-01',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	19.9000,	17,	2),
(7,	'2017-10-01',	1,	2,	'Undoing FGM',	26.9000,	3,	3),
(8,	'2017-10-01',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	26.9000,	3,	4),
(9,	'2017-12-01',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	26.9000,	38,	1),
(10,	'2017-12-01',	1,	4,	'Waging Empathy',	22.0000,	17,	2),
(11,	'2017-12-01',	1,	2,	'Undoing FGM',	26.9000,	10,	3),
(12,	'2017-12-01',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	19.9000,	6,	4),
(13,	'2017-12-01',	1,	5,	'Kiminta',	0.0000,	3,	5),
(14,	'2018-01-01',	1,	9,	'In the Name of Tradition',	17.0000,	36,	1),
(15,	'2018-01-01',	1,	4,	'Waging Empathy',	17.0000,	34,	2),
(16,	'2018-01-01',	1,	8,	'Stones: A Novel',	16.1100,	23,	3),
(17,	'2018-01-01',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	13,	4),
(18,	'2018-01-01',	1,	2,	'Undoing FGM',	17.0000,	6,	5),
(19,	'2018-01-01',	1,	7,	'Taboo',	17.0000,	5,	6),
(20,	'2018-01-01',	1,	6,	'Rose Lore',	17.0000,	1,	8),
(21,	'2018-01-01',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	1,	9),
(22,	'2018-01-01',	1,	5,	'Kiminta',	17.0000,	1,	7),
(23,	'2018-02-01',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	14,	2),
(24,	'2018-02-01',	1,	9,	'In the Name of Tradition',	17.0000,	17,	1),
(25,	'2018-02-01',	1,	4,	'Waging Empathy',	17.0000,	7,	3),
(26,	'2018-02-01',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	5,	4),
(27,	'2018-02-01',	1,	7,	'Taboo',	17.0000,	1,	9),
(28,	'2018-02-01',	1,	5,	'Kiminta',	17.0000,	1,	6),
(29,	'2018-02-01',	1,	2,	'Undoing FGM',	17.0000,	1,	7),
(30,	'2018-02-01',	1,	8,	'Stones: A Novel',	16.1100,	1,	8),
(31,	'2018-02-01',	1,	6,	'Rose Lore',	17.0000,	2,	5),
(32,	'2018-03-01',	1,	9,	'In the Name of Tradition',	17.0000,	1,	1),
(33,	'2018-05-01',	1,	4,	'Waging Empathy',	17.0000,	5,	1),
(34,	'2018-05-01',	1,	8,	'Stones: A Novel',	16.1100,	2,	2),
(35,	'2018-05-01',	1,	6,	'Rose Lore',	17.0000,	2,	3),
(36,	'2018-05-01',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	2,	4),
(37,	'2018-05-01',	1,	9,	'In the Name of Tradition',	17.0000,	2,	5),
(38,	'2018-05-01',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	2,	6),
(39,	'2018-05-01',	1,	7,	'Taboo',	17.0000,	2,	7),
(40,	'2018-05-01',	1,	5,	'Kiminta',	17.0000,	2,	8),
(41,	'2018-05-01',	1,	2,	'Undoing FGM',	17.0000,	2,	9),
(42,	'2018-06-01',	1,	4,	'Waging Empathy',	17.0000,	6,	1),
(43,	'2018-06-01',	1,	8,	'Stones: A Novel',	16.1100,	6,	2),
(44,	'2018-06-01',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	6,	3),
(45,	'2018-06-01',	1,	6,	'Rose Lore',	17.0000,	5,	4),
(46,	'2018-06-01',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	1,	5),
(47,	'2018-06-01',	1,	7,	'Taboo',	17.0000,	1,	6),
(48,	'2018-06-01',	1,	2,	'Undoing FGM',	17.0000,	1,	7),
(49,	'2018-06-01',	1,	9,	'In the Name of Tradition',	17.0000,	1,	8);

CREATE TABLE `report_viewed_product_aggregated_yearly` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product Id',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `views_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Number of Views',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_REPORT_VIEWED_PRD_AGGRED_YEARLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_AGGREGATED_YEARLY_STORE_ID` (`store_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_AGGREGATED_YEARLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_REPORT_VIEWED_PRD_AGGRED_YEARLY_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_VIEWED_PRD_AGGRED_YEARLY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Most Viewed Products Aggregated Yearly';

INSERT INTO `report_viewed_product_aggregated_yearly` (`id`, `period`, `store_id`, `product_id`, `product_name`, `product_price`, `views_num`, `rating_pos`) VALUES
(1,	'2017-01-01',	1,	4,	'Waging Empathy',	22.0000,	94,	1),
(2,	'2017-01-01',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	26.9000,	43,	2),
(3,	'2017-01-01',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	19.9000,	29,	3),
(4,	'2017-01-01',	1,	2,	'Undoing FGM',	26.9000,	14,	4),
(5,	'2017-01-01',	1,	5,	'Kiminta',	0.0000,	3,	5),
(6,	'2018-01-01',	1,	9,	'In the Name of Tradition',	17.0000,	57,	1),
(7,	'2018-01-01',	1,	4,	'Waging Empathy',	17.0000,	52,	2),
(8,	'2018-01-01',	1,	1,	'Blood Stains. A Child of Africa Reclaims Her Human Rights',	17.0000,	30,	4),
(9,	'2018-01-01',	1,	8,	'Stones: A Novel',	16.1100,	32,	3),
(10,	'2018-01-01',	1,	2,	'Undoing FGM',	17.0000,	10,	6),
(11,	'2018-01-01',	1,	7,	'Taboo',	17.0000,	9,	8),
(12,	'2018-01-01',	1,	6,	'Rose Lore',	17.0000,	10,	7),
(13,	'2018-01-01',	1,	3,	'WAAFRIKA 123. 1992. Kenya. Two womyn fall in love',	17.0000,	14,	5),
(14,	'2018-01-01',	1,	5,	'Kiminta',	17.0000,	4,	9);

CREATE TABLE `report_viewed_product_index` (
  `index_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Index Id',
  `visitor_id` int(10) unsigned DEFAULT NULL COMMENT 'Visitor Id',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `added_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Added At',
  PRIMARY KEY (`index_id`),
  UNIQUE KEY `UNQ_REPORT_VIEWED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  UNIQUE KEY `UNQ_REPORT_VIEWED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_INDEX_STORE_ID` (`store_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_INDEX_ADDED_AT` (`added_at`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_INDEX_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_REPORT_VIEWED_PRD_IDX_CSTR_ID_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_VIEWED_PRD_IDX_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_VIEWED_PRODUCT_INDEX_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Reports Viewed Product Index Table';


CREATE TABLE `review` (
  `review_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review id',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Review create date',
  `entity_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity id',
  `entity_pk_value` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product id',
  `status_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Status code',
  PRIMARY KEY (`review_id`),
  KEY `IDX_REVIEW_ENTITY_ID` (`entity_id`),
  KEY `IDX_REVIEW_STATUS_ID` (`status_id`),
  KEY `IDX_REVIEW_ENTITY_PK_VALUE` (`entity_pk_value`),
  CONSTRAINT `FK_REVIEW_ENTITY_ID_REVIEW_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `review_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REVIEW_STATUS_ID_REVIEW_STATUS_STATUS_ID` FOREIGN KEY (`status_id`) REFERENCES `review_status` (`status_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Review base information';

INSERT INTO `review` (`review_id`, `created_at`, `entity_id`, `entity_pk_value`, `status_id`) VALUES
(1,	'2017-09-08 18:38:05',	1,	2,	1),
(2,	'2017-09-08 18:39:19',	1,	1,	1),
(3,	'2017-12-20 14:22:12',	1,	7,	1),
(4,	'2017-12-20 15:13:48',	1,	8,	1),
(5,	'2017-12-20 19:42:11',	1,	9,	1);

CREATE TABLE `review_detail` (
  `detail_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review detail id',
  `review_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Review id',
  `store_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Store id',
  `title` varchar(255) NOT NULL COMMENT 'Title',
  `detail` text NOT NULL COMMENT 'Detail description',
  `nickname` varchar(128) NOT NULL COMMENT 'User nickname',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  PRIMARY KEY (`detail_id`),
  KEY `IDX_REVIEW_DETAIL_REVIEW_ID` (`review_id`),
  KEY `IDX_REVIEW_DETAIL_STORE_ID` (`store_id`),
  KEY `IDX_REVIEW_DETAIL_CUSTOMER_ID` (`customer_id`),
  CONSTRAINT `FK_REVIEW_DETAIL_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_REVIEW_DETAIL_REVIEW_ID_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REVIEW_DETAIL_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Review detail information';

INSERT INTO `review_detail` (`detail_id`, `review_id`, `store_id`, `title`, `detail`, `nickname`, `customer_id`) VALUES
(1,	1,	0,	'Yayehyirad Kitaw, MD/MPH',	'A highly readable and tantalizing book, Foldes restores what should never have been cut. His dedication to the health and well-being of women makes clear that FGM must stop.',	'Yayehyirad Kitaw, MD/MPH',	NULL),
(2,	2,	0,	'Prof. Henry Louis Gates, Jr., Harvard University',	'What we think of as the unspeakable pain and suffering of FGM must be shouted and given voice, relentlessly. Khady\'s account is wrenching and necessary reading.',	'Prof. Henry Louis Gates, Jr., Harvard University',	NULL),
(3,	3,	0,	'Novelist Jeanie Kortum, author of Stones',	'This book is simply astonishing. The interviews with these women transcend simple storytelling, boundaries and differences, begging this one succinct question: what are we all going to do to stop this regrettable practice?',	'Novelist Jeanie Kortum, author of Stones',	NULL),
(4,	4,	0,	'Anne Lamott',	'Everything Jeanie Kortum writes (and does!) is informed by a huge heart, a gentle and tenacious intelligence, a fierce longing to tell truth stories, a passionate dedication to the betterment of humanity. She is a wonderful writer.',	'Anne Lamott',	NULL),
(5,	5,	0,	'Hilary Burrage',	'No more can it be said that genital ablation is a problem in Africa alone. Ahmady and his colleagues have uncovered data critical to stopping a harmful tradition in Iran. Enhanced with photographs, tables and charts, Ahmady’s study offers insight into the challenges faced by Iranian authorities if women and girls are to remain intact. Based on solid scholarship, this book contributes to ending FGM.',	'Hilary Burrage',	NULL);

CREATE TABLE `review_entity` (
  `entity_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review entity id',
  `entity_code` varchar(32) NOT NULL COMMENT 'Review entity code',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Review entities';

INSERT INTO `review_entity` (`entity_id`, `entity_code`) VALUES
(1,	'product'),
(2,	'customer'),
(3,	'category');

CREATE TABLE `review_entity_summary` (
  `primary_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Summary review entity id',
  `entity_pk_value` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Product id',
  `entity_type` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Entity type id',
  `reviews_count` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Qty of reviews',
  `rating_summary` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Summarized rating',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store id',
  PRIMARY KEY (`primary_id`),
  KEY `IDX_REVIEW_ENTITY_SUMMARY_STORE_ID` (`store_id`),
  CONSTRAINT `FK_REVIEW_ENTITY_SUMMARY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Review aggregates';

INSERT INTO `review_entity_summary` (`primary_id`, `entity_pk_value`, `entity_type`, `reviews_count`, `rating_summary`, `store_id`) VALUES
(1,	2,	1,	1,	0,	1),
(2,	1,	1,	1,	0,	1),
(3,	7,	1,	1,	0,	1),
(4,	8,	1,	1,	0,	1),
(5,	9,	1,	1,	0,	1);

CREATE TABLE `review_status` (
  `status_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Status id',
  `status_code` varchar(32) NOT NULL COMMENT 'Status code',
  PRIMARY KEY (`status_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Review statuses';

INSERT INTO `review_status` (`status_id`, `status_code`) VALUES
(1,	'Approved'),
(2,	'Pending'),
(3,	'Not Approved');

CREATE TABLE `review_store` (
  `review_id` bigint(20) unsigned NOT NULL COMMENT 'Review Id',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store Id',
  PRIMARY KEY (`review_id`,`store_id`),
  KEY `IDX_REVIEW_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_REVIEW_STORE_REVIEW_ID_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REVIEW_STORE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Review Store';

INSERT INTO `review_store` (`review_id`, `store_id`) VALUES
(1,	0),
(2,	0),
(3,	0),
(4,	0),
(5,	0),
(1,	1),
(2,	1),
(3,	1),
(4,	1),
(5,	1);

CREATE TABLE `salesrule` (
  `rule_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rule Id',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `description` text COMMENT 'Description',
  `from_date` date DEFAULT NULL,
  `to_date` date DEFAULT NULL,
  `uses_per_customer` int(11) NOT NULL DEFAULT '0' COMMENT 'Uses Per Customer',
  `is_active` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Is Active',
  `conditions_serialized` mediumtext COMMENT 'Conditions Serialized',
  `actions_serialized` mediumtext COMMENT 'Actions Serialized',
  `stop_rules_processing` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Stop Rules Processing',
  `is_advanced` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Is Advanced',
  `product_ids` text COMMENT 'Product Ids',
  `sort_order` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `simple_action` varchar(32) DEFAULT NULL COMMENT 'Simple Action',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `discount_qty` decimal(12,4) DEFAULT NULL COMMENT 'Discount Qty',
  `discount_step` int(10) unsigned NOT NULL COMMENT 'Discount Step',
  `simple_free_shipping` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Simple Free Shipping',
  `apply_to_shipping` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Apply To Shipping',
  `times_used` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  `is_rss` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Is Rss',
  `coupon_type` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Coupon Type',
  `use_auto_generation` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Use Auto Generation',
  `uses_per_coupon` int(11) NOT NULL DEFAULT '0' COMMENT 'Uses Per Coupon',
  PRIMARY KEY (`rule_id`),
  KEY `IDX_SALESRULE_IS_ACTIVE_SORT_ORDER_TO_DATE_FROM_DATE` (`is_active`,`sort_order`,`to_date`,`from_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Salesrule';

INSERT INTO `salesrule` (`rule_id`, `name`, `description`, `from_date`, `to_date`, `uses_per_customer`, `is_active`, `conditions_serialized`, `actions_serialized`, `stop_rules_processing`, `is_advanced`, `product_ids`, `sort_order`, `simple_action`, `discount_amount`, `discount_qty`, `discount_step`, `simple_free_shipping`, `apply_to_shipping`, `times_used`, `is_rss`, `coupon_type`, `use_auto_generation`, `uses_per_coupon`) VALUES
(1,	'25% Discount',	'25% discount for purchasing 10 or more books',	NULL,	NULL,	0,	1,	'a:7:{s:4:\"type\";s:32:\"salesrule/rule_condition_combine\";s:9:\"attribute\";N;s:8:\"operator\";N;s:5:\"value\";s:1:\"1\";s:18:\"is_value_processed\";N;s:10:\"aggregator\";s:3:\"all\";s:10:\"conditions\";a:1:{i:0;a:7:{s:4:\"type\";s:38:\"salesrule/rule_condition_product_found\";s:9:\"attribute\";N;s:8:\"operator\";N;s:5:\"value\";s:1:\"1\";s:18:\"is_value_processed\";N;s:10:\"aggregator\";s:3:\"all\";s:10:\"conditions\";a:1:{i:0;a:5:{s:4:\"type\";s:32:\"salesrule/rule_condition_product\";s:9:\"attribute\";s:14:\"quote_item_qty\";s:8:\"operator\";s:2:\">=\";s:5:\"value\";s:2:\"10\";s:18:\"is_value_processed\";b:0;}}}}}',	'a:7:{s:4:\"type\";s:40:\"salesrule/rule_condition_product_combine\";s:9:\"attribute\";N;s:8:\"operator\";N;s:5:\"value\";s:1:\"1\";s:18:\"is_value_processed\";N;s:10:\"aggregator\";s:3:\"all\";s:10:\"conditions\";a:1:{i:0;a:5:{s:4:\"type\";s:32:\"salesrule/rule_condition_product\";s:9:\"attribute\";s:14:\"quote_item_qty\";s:8:\"operator\";s:2:\">=\";s:5:\"value\";s:2:\"10\";s:18:\"is_value_processed\";b:0;}}}',	1,	1,	NULL,	0,	'by_percent',	25.0000,	NULL,	0,	0,	0,	0,	1,	1,	0,	0);

CREATE TABLE `salesrule_coupon` (
  `coupon_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Coupon Id',
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule Id',
  `code` varchar(255) DEFAULT NULL COMMENT 'Code',
  `usage_limit` int(10) unsigned DEFAULT NULL COMMENT 'Usage Limit',
  `usage_per_customer` int(10) unsigned DEFAULT NULL COMMENT 'Usage Per Customer',
  `times_used` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  `expiration_date` timestamp NULL DEFAULT NULL COMMENT 'Expiration Date',
  `is_primary` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Primary',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Coupon Code Creation Date',
  `type` smallint(6) DEFAULT '0' COMMENT 'Coupon Code Type',
  PRIMARY KEY (`coupon_id`),
  UNIQUE KEY `UNQ_SALESRULE_COUPON_CODE` (`code`),
  UNIQUE KEY `UNQ_SALESRULE_COUPON_RULE_ID_IS_PRIMARY` (`rule_id`,`is_primary`),
  KEY `IDX_SALESRULE_COUPON_RULE_ID` (`rule_id`),
  CONSTRAINT `FK_SALESRULE_COUPON_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Salesrule Coupon';


CREATE TABLE `salesrule_coupon_usage` (
  `coupon_id` int(10) unsigned NOT NULL COMMENT 'Coupon Id',
  `customer_id` int(10) unsigned NOT NULL COMMENT 'Customer Id',
  `times_used` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  PRIMARY KEY (`coupon_id`,`customer_id`),
  KEY `IDX_SALESRULE_COUPON_USAGE_COUPON_ID` (`coupon_id`),
  KEY `IDX_SALESRULE_COUPON_USAGE_CUSTOMER_ID` (`customer_id`),
  CONSTRAINT `FK_SALESRULE_COUPON_USAGE_COUPON_ID_SALESRULE_COUPON_COUPON_ID` FOREIGN KEY (`coupon_id`) REFERENCES `salesrule_coupon` (`coupon_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALESRULE_COUPON_USAGE_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Salesrule Coupon Usage';


CREATE TABLE `salesrule_customer` (
  `rule_customer_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rule Customer Id',
  `rule_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Rule Id',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Id',
  `times_used` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  PRIMARY KEY (`rule_customer_id`),
  KEY `IDX_SALESRULE_CUSTOMER_RULE_ID_CUSTOMER_ID` (`rule_id`,`customer_id`),
  KEY `IDX_SALESRULE_CUSTOMER_CUSTOMER_ID_RULE_ID` (`customer_id`,`rule_id`),
  CONSTRAINT `FK_SALESRULE_CUSTOMER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALESRULE_CUSTOMER_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Salesrule Customer';


CREATE TABLE `salesrule_customer_group` (
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule Id',
  `customer_group_id` smallint(5) unsigned NOT NULL COMMENT 'Customer Group Id',
  PRIMARY KEY (`rule_id`,`customer_group_id`),
  KEY `IDX_SALESRULE_CUSTOMER_GROUP_RULE_ID` (`rule_id`),
  KEY `IDX_SALESRULE_CUSTOMER_GROUP_CUSTOMER_GROUP_ID` (`customer_group_id`),
  CONSTRAINT `FK_SALESRULE_CSTR_GROUP_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID` FOREIGN KEY (`customer_group_id`) REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALESRULE_CUSTOMER_GROUP_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Rules To Customer Groups Relations';

INSERT INTO `salesrule_customer_group` (`rule_id`, `customer_group_id`) VALUES
(1,	0),
(1,	1),
(1,	2),
(1,	3);

CREATE TABLE `salesrule_label` (
  `label_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Label Id',
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule Id',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store Id',
  `label` varchar(255) DEFAULT NULL COMMENT 'Label',
  PRIMARY KEY (`label_id`),
  UNIQUE KEY `UNQ_SALESRULE_LABEL_RULE_ID_STORE_ID` (`rule_id`,`store_id`),
  KEY `IDX_SALESRULE_LABEL_STORE_ID` (`store_id`),
  KEY `IDX_SALESRULE_LABEL_RULE_ID` (`rule_id`),
  CONSTRAINT `FK_SALESRULE_LABEL_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALESRULE_LABEL_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Salesrule Label';

INSERT INTO `salesrule_label` (`label_id`, `rule_id`, `store_id`, `label`) VALUES
(1,	1,	0,	'25% Discount'),
(2,	1,	1,	'25% Discount');

CREATE TABLE `salesrule_product_attribute` (
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule Id',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website Id',
  `customer_group_id` smallint(5) unsigned NOT NULL COMMENT 'Customer Group Id',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute Id',
  PRIMARY KEY (`rule_id`,`website_id`,`customer_group_id`,`attribute_id`),
  KEY `IDX_SALESRULE_PRODUCT_ATTRIBUTE_WEBSITE_ID` (`website_id`),
  KEY `IDX_SALESRULE_PRODUCT_ATTRIBUTE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `IDX_SALESRULE_PRODUCT_ATTRIBUTE_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `FK_SALESRULE_PRD_ATTR_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `FK_SALESRULE_PRD_ATTR_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID` FOREIGN KEY (`customer_group_id`) REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `FK_SALESRULE_PRD_ATTR_WS_ID_CORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `FK_SALESRULE_PRODUCT_ATTRIBUTE_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Salesrule Product Attribute';


CREATE TABLE `salesrule_website` (
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule Id',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website Id',
  PRIMARY KEY (`rule_id`,`website_id`),
  KEY `IDX_SALESRULE_WEBSITE_RULE_ID` (`rule_id`),
  KEY `IDX_SALESRULE_WEBSITE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_SALESRULE_WEBSITE_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALESRULE_WEBSITE_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Rules To Websites Relations';

INSERT INTO `salesrule_website` (`rule_id`, `website_id`) VALUES
(1,	1);

CREATE TABLE `sales_bestsellers_aggregated_daily` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product Id',
  `product_type_id` varchar(32) NOT NULL DEFAULT 'simple' COMMENT 'Product Type Id',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_BESTSELLERS_AGGRED_DAILY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `IDX_SALES_BESTSELLERS_AGGREGATED_DAILY_STORE_ID` (`store_id`),
  KEY `IDX_SALES_BESTSELLERS_AGGREGATED_DAILY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_SALES_BESTSELLERS_AGGRED_DAILY_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_BESTSELLERS_AGGRED_DAILY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Bestsellers Aggregated Daily';


CREATE TABLE `sales_bestsellers_aggregated_monthly` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product Id',
  `product_type_id` varchar(32) NOT NULL DEFAULT 'simple' COMMENT 'Product Type Id',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_BESTSELLERS_AGGRED_MONTHLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `IDX_SALES_BESTSELLERS_AGGREGATED_MONTHLY_STORE_ID` (`store_id`),
  KEY `IDX_SALES_BESTSELLERS_AGGREGATED_MONTHLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_SALES_BESTSELLERS_AGGRED_MONTHLY_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_BESTSELLERS_AGGRED_MONTHLY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Bestsellers Aggregated Monthly';


CREATE TABLE `sales_bestsellers_aggregated_yearly` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product Id',
  `product_type_id` varchar(32) NOT NULL DEFAULT 'simple' COMMENT 'Product Type Id',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_BESTSELLERS_AGGRED_YEARLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `IDX_SALES_BESTSELLERS_AGGREGATED_YEARLY_STORE_ID` (`store_id`),
  KEY `IDX_SALES_BESTSELLERS_AGGREGATED_YEARLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_SALES_BESTSELLERS_AGGRED_YEARLY_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_BESTSELLERS_AGGRED_YEARLY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Bestsellers Aggregated Yearly';


CREATE TABLE `sales_billing_agreement` (
  `agreement_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Agreement Id',
  `customer_id` int(10) unsigned NOT NULL COMMENT 'Customer Id',
  `method_code` varchar(32) NOT NULL COMMENT 'Method Code',
  `reference_id` varchar(32) NOT NULL COMMENT 'Reference Id',
  `status` varchar(20) NOT NULL COMMENT 'Status',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `agreement_label` varchar(255) DEFAULT NULL COMMENT 'Agreement Label',
  PRIMARY KEY (`agreement_id`),
  KEY `IDX_SALES_BILLING_AGREEMENT_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_SALES_BILLING_AGREEMENT_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_BILLING_AGREEMENT_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_BILLING_AGREEMENT_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Billing Agreement';


CREATE TABLE `sales_billing_agreement_order` (
  `agreement_id` int(10) unsigned NOT NULL COMMENT 'Agreement Id',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  PRIMARY KEY (`agreement_id`,`order_id`),
  KEY `IDX_SALES_BILLING_AGREEMENT_ORDER_ORDER_ID` (`order_id`),
  CONSTRAINT `FK_SALES_BILLING_AGRT_ORDER_AGRT_ID_SALES_BILLING_AGRT_AGRT_ID` FOREIGN KEY (`agreement_id`) REFERENCES `sales_billing_agreement` (`agreement_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_BILLING_AGRT_ORDER_ORDER_ID_SALES_FLAT_ORDER_ENTT_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Billing Agreement Order';


CREATE TABLE `sales_flat_creditmemo` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `adjustment_positive` decimal(12,4) DEFAULT NULL COMMENT 'Adjustment Positive',
  `base_shipping_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `store_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Order Rate',
  `base_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `base_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Order Rate',
  `grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Grand Total',
  `base_adjustment_negative` decimal(12,4) DEFAULT NULL COMMENT 'Base Adjustment Negative',
  `base_subtotal_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',
  `shipping_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `subtotal_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `adjustment_negative` decimal(12,4) DEFAULT NULL COMMENT 'Adjustment Negative',
  `base_shipping_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `store_to_base_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Base Rate',
  `base_to_global_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `base_adjustment` decimal(12,4) DEFAULT NULL COMMENT 'Base Adjustment',
  `base_subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Amount',
  `subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal',
  `adjustment` decimal(12,4) DEFAULT NULL COMMENT 'Adjustment',
  `base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `base_adjustment_positive` decimal(12,4) DEFAULT NULL COMMENT 'Base Adjustment Positive',
  `base_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `shipping_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Tax Amount',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `email_sent` smallint(5) unsigned DEFAULT NULL COMMENT 'Email Sent',
  `creditmemo_status` int(11) DEFAULT NULL COMMENT 'Creditmemo Status',
  `state` int(11) DEFAULT NULL COMMENT 'State',
  `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address Id',
  `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address Id',
  `invoice_id` int(11) DEFAULT NULL COMMENT 'Invoice Id',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `transaction_id` varchar(255) DEFAULT NULL COMMENT 'Transaction Id',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
  `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
  `shipping_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Hidden Tax Amount',
  `base_shipping_hidden_tax_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Hidden Tax Amount',
  `shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_SALES_FLAT_CREDITMEMO_INCREMENT_ID` (`increment_id`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_STORE_ID` (`store_id`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_ORDER_ID` (`order_id`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_CREDITMEMO_STATUS` (`creditmemo_status`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_STATE` (`state`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_CREATED_AT` (`created_at`),
  CONSTRAINT `FK_SALES_FLAT_CREDITMEMO_ORDER_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_CREDITMEMO_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Creditmemo';


CREATE TABLE `sales_flat_creditmemo_comment` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent Id',
  `is_customer_notified` int(11) DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_COMMENT_CREATED_AT` (`created_at`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_COMMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_B0FCB0B5467075BE63D474F2CD5F7804` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_creditmemo` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Creditmemo Comment';


CREATE TABLE `sales_flat_creditmemo_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `store_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Order Rate',
  `base_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Order Rate',
  `grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Grand Total',
  `store_to_base_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Base Rate',
  `base_to_global_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `creditmemo_status` int(11) DEFAULT NULL COMMENT 'Creditmemo Status',
  `state` int(11) DEFAULT NULL COMMENT 'State',
  `invoice_id` int(11) DEFAULT NULL COMMENT 'Invoice Id',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment Id',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_SALES_FLAT_CREDITMEMO_GRID_INCREMENT_ID` (`increment_id`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_STORE_ID` (`store_id`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_ORDER_ID` (`order_id`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_CREDITMEMO_STATUS` (`creditmemo_status`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_STATE` (`state`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_CREATED_AT` (`created_at`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_GRID_BILLING_NAME` (`billing_name`),
  CONSTRAINT `FK_78C711B225167A11CC077B03D1C8E1CC` FOREIGN KEY (`entity_id`) REFERENCES `sales_flat_creditmemo` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_CREDITMEMO_GRID_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Creditmemo Grid';


CREATE TABLE `sales_flat_creditmemo_item` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent Id',
  `base_price` decimal(12,4) DEFAULT NULL COMMENT 'Base Price',
  `tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Tax Amount',
  `base_row_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Row Total',
  `discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Amount',
  `row_total` decimal(12,4) DEFAULT NULL COMMENT 'Row Total',
  `base_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `base_price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',
  `base_cost` decimal(12,4) DEFAULT NULL COMMENT 'Base Cost',
  `price` decimal(12,4) DEFAULT NULL COMMENT 'Price',
  `base_row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `product_id` int(11) DEFAULT NULL COMMENT 'Product Id',
  `order_item_id` int(11) DEFAULT NULL COMMENT 'Order Item Id',
  `additional_data` text COMMENT 'Additional Data',
  `description` text COMMENT 'Description',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
  `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
  `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',
  `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',
  `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',
  `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',
  `weee_tax_applied` text COMMENT 'Weee Tax Applied',
  `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',
  `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',
  `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',
  `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_CREDITMEMO_ITEM_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_306DAC836C699F0B5E13BE486557AC8A` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_creditmemo` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Creditmemo Item';


CREATE TABLE `sales_flat_invoice` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `shipping_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Tax Amount',
  `base_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `store_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Order Rate',
  `base_shipping_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `base_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `base_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Order Rate',
  `grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Grand Total',
  `shipping_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `subtotal_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `base_subtotal_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',
  `store_to_base_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Base Rate',
  `base_shipping_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `base_to_global_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal',
  `base_subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Amount',
  `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address Id',
  `is_used_for_refund` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Used For Refund',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `email_sent` smallint(5) unsigned DEFAULT NULL COMMENT 'Email Sent',
  `can_void_flag` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Void Flag',
  `state` int(11) DEFAULT NULL COMMENT 'State',
  `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address Id',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `transaction_id` varchar(255) DEFAULT NULL COMMENT 'Transaction Id',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
  `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
  `shipping_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Hidden Tax Amount',
  `base_shipping_hidden_tax_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Hidden Tax Amount',
  `shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `base_total_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Refunded',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_SALES_FLAT_INVOICE_INCREMENT_ID` (`increment_id`),
  KEY `IDX_SALES_FLAT_INVOICE_STORE_ID` (`store_id`),
  KEY `IDX_SALES_FLAT_INVOICE_GRAND_TOTAL` (`grand_total`),
  KEY `IDX_SALES_FLAT_INVOICE_ORDER_ID` (`order_id`),
  KEY `IDX_SALES_FLAT_INVOICE_STATE` (`state`),
  KEY `IDX_SALES_FLAT_INVOICE_CREATED_AT` (`created_at`),
  CONSTRAINT `FK_SALES_FLAT_INVOICE_ORDER_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_INVOICE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Invoice';


CREATE TABLE `sales_flat_invoice_comment` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent Id',
  `is_customer_notified` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_INVOICE_COMMENT_CREATED_AT` (`created_at`),
  KEY `IDX_SALES_FLAT_INVOICE_COMMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_5C4B36BBE5231A76AB8018B281ED50BC` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_invoice` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Invoice Comment';


CREATE TABLE `sales_flat_invoice_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Grand Total',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `state` int(11) DEFAULT NULL COMMENT 'State',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment Id',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_SALES_FLAT_INVOICE_GRID_INCREMENT_ID` (`increment_id`),
  KEY `IDX_SALES_FLAT_INVOICE_GRID_STORE_ID` (`store_id`),
  KEY `IDX_SALES_FLAT_INVOICE_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `IDX_SALES_FLAT_INVOICE_GRID_ORDER_ID` (`order_id`),
  KEY `IDX_SALES_FLAT_INVOICE_GRID_STATE` (`state`),
  KEY `IDX_SALES_FLAT_INVOICE_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `IDX_SALES_FLAT_INVOICE_GRID_CREATED_AT` (`created_at`),
  KEY `IDX_SALES_FLAT_INVOICE_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `IDX_SALES_FLAT_INVOICE_GRID_BILLING_NAME` (`billing_name`),
  CONSTRAINT `FK_SALES_FLAT_INVOICE_GRID_ENTT_ID_SALES_FLAT_INVOICE_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `sales_flat_invoice` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_INVOICE_GRID_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Invoice Grid';


CREATE TABLE `sales_flat_invoice_item` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent Id',
  `base_price` decimal(12,4) DEFAULT NULL COMMENT 'Base Price',
  `tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Tax Amount',
  `base_row_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Row Total',
  `discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Amount',
  `row_total` decimal(12,4) DEFAULT NULL COMMENT 'Row Total',
  `base_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `base_price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',
  `base_cost` decimal(12,4) DEFAULT NULL COMMENT 'Base Cost',
  `price` decimal(12,4) DEFAULT NULL COMMENT 'Price',
  `base_row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `product_id` int(11) DEFAULT NULL COMMENT 'Product Id',
  `order_item_id` int(11) DEFAULT NULL COMMENT 'Order Item Id',
  `additional_data` text COMMENT 'Additional Data',
  `description` text COMMENT 'Description',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
  `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
  `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',
  `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',
  `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',
  `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',
  `weee_tax_applied` text COMMENT 'Weee Tax Applied',
  `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',
  `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',
  `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',
  `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_INVOICE_ITEM_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_SALES_FLAT_INVOICE_ITEM_PARENT_ID_SALES_FLAT_INVOICE_ENTT_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_invoice` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Invoice Item';


CREATE TABLE `sales_flat_order` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `state` varchar(32) DEFAULT NULL COMMENT 'State',
  `status` varchar(32) DEFAULT NULL COMMENT 'Status',
  `coupon_code` varchar(255) DEFAULT NULL COMMENT 'Coupon Code',
  `protect_code` varchar(255) DEFAULT NULL COMMENT 'Protect Code',
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `is_virtual` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Virtual',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `base_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `base_discount_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Canceled',
  `base_discount_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Invoiced',
  `base_discount_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Refunded',
  `base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `base_shipping_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `base_shipping_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Canceled',
  `base_shipping_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Invoiced',
  `base_shipping_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Refunded',
  `base_shipping_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `base_shipping_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Tax Refunded',
  `base_subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `base_subtotal_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal Canceled',
  `base_subtotal_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal Invoiced',
  `base_subtotal_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal Refunded',
  `base_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `base_tax_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Canceled',
  `base_tax_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Invoiced',
  `base_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Refunded',
  `base_to_global_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `base_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Order Rate',
  `base_total_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Canceled',
  `base_total_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Invoiced',
  `base_total_invoiced_cost` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Invoiced Cost',
  `base_total_offline_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Offline Refunded',
  `base_total_online_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Online Refunded',
  `base_total_paid` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Paid',
  `base_total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Qty Ordered',
  `base_total_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Refunded',
  `discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Amount',
  `discount_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Discount Canceled',
  `discount_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Discount Invoiced',
  `discount_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Discount Refunded',
  `grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Grand Total',
  `shipping_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `shipping_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Canceled',
  `shipping_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Invoiced',
  `shipping_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Refunded',
  `shipping_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `shipping_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Tax Refunded',
  `store_to_base_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Base Rate',
  `store_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Order Rate',
  `subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal',
  `subtotal_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal Canceled',
  `subtotal_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal Invoiced',
  `subtotal_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal Refunded',
  `tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Tax Amount',
  `tax_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Tax Canceled',
  `tax_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Tax Invoiced',
  `tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Tax Refunded',
  `total_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Total Canceled',
  `total_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Total Invoiced',
  `total_offline_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Total Offline Refunded',
  `total_online_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Total Online Refunded',
  `total_paid` decimal(12,4) DEFAULT NULL COMMENT 'Total Paid',
  `total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty Ordered',
  `total_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Total Refunded',
  `can_ship_partially` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Ship Partially',
  `can_ship_partially_item` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Ship Partially Item',
  `customer_is_guest` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Is Guest',
  `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address Id',
  `customer_group_id` smallint(6) DEFAULT NULL COMMENT 'Customer Group Id',
  `edit_increment` int(11) DEFAULT NULL COMMENT 'Edit Increment',
  `email_sent` smallint(5) unsigned DEFAULT NULL COMMENT 'Email Sent',
  `forced_shipment_with_invoice` smallint(5) unsigned DEFAULT NULL COMMENT 'Forced Do Shipment With Invoice',
  `payment_auth_expiration` int(11) DEFAULT NULL COMMENT 'Payment Authorization Expiration',
  `quote_address_id` int(11) DEFAULT NULL COMMENT 'Quote Address Id',
  `quote_id` int(11) DEFAULT NULL COMMENT 'Quote Id',
  `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address Id',
  `adjustment_negative` decimal(12,4) DEFAULT NULL COMMENT 'Adjustment Negative',
  `adjustment_positive` decimal(12,4) DEFAULT NULL COMMENT 'Adjustment Positive',
  `base_adjustment_negative` decimal(12,4) DEFAULT NULL COMMENT 'Base Adjustment Negative',
  `base_adjustment_positive` decimal(12,4) DEFAULT NULL COMMENT 'Base Adjustment Positive',
  `base_shipping_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Discount Amount',
  `base_subtotal_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',
  `base_total_due` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Due',
  `payment_authorization_amount` decimal(12,4) DEFAULT NULL COMMENT 'Payment Authorization Amount',
  `shipping_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Discount Amount',
  `subtotal_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `total_due` decimal(12,4) DEFAULT NULL COMMENT 'Total Due',
  `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',
  `customer_dob` datetime DEFAULT NULL COMMENT 'Customer Dob',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `applied_rule_ids` varchar(255) DEFAULT NULL COMMENT 'Applied Rule Ids',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_firstname` varchar(255) DEFAULT NULL COMMENT 'Customer Firstname',
  `customer_lastname` varchar(255) DEFAULT NULL COMMENT 'Customer Lastname',
  `customer_middlename` varchar(255) DEFAULT NULL COMMENT 'Customer Middlename',
  `customer_prefix` varchar(255) DEFAULT NULL COMMENT 'Customer Prefix',
  `customer_suffix` varchar(255) DEFAULT NULL COMMENT 'Customer Suffix',
  `customer_taxvat` varchar(255) DEFAULT NULL COMMENT 'Customer Taxvat',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  `ext_customer_id` varchar(255) DEFAULT NULL COMMENT 'Ext Customer Id',
  `ext_order_id` varchar(255) DEFAULT NULL COMMENT 'Ext Order Id',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `hold_before_state` varchar(255) DEFAULT NULL COMMENT 'Hold Before State',
  `hold_before_status` varchar(255) DEFAULT NULL COMMENT 'Hold Before Status',
  `order_currency_code` varchar(255) DEFAULT NULL COMMENT 'Order Currency Code',
  `original_increment_id` varchar(50) DEFAULT NULL COMMENT 'Original Increment Id',
  `relation_child_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child Id',
  `relation_child_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child Real Id',
  `relation_parent_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent Id',
  `relation_parent_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent Real Id',
  `remote_ip` varchar(255) DEFAULT NULL COMMENT 'Remote Ip',
  `shipping_method` varchar(255) DEFAULT NULL COMMENT 'Shipping Method',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
  `x_forwarded_for` varchar(255) DEFAULT NULL COMMENT 'X Forwarded For',
  `customer_note` text COMMENT 'Customer Note',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `total_item_count` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Total Item Count',
  `customer_gender` int(11) DEFAULT NULL COMMENT 'Customer Gender',
  `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
  `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
  `shipping_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Hidden Tax Amount',
  `base_shipping_hidden_tax_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Hidden Tax Amount',
  `hidden_tax_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Invoiced',
  `base_hidden_tax_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Invoiced',
  `hidden_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Refunded',
  `base_hidden_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Refunded',
  `shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `coupon_rule_name` varchar(255) DEFAULT NULL COMMENT 'Coupon Sales Rule Name',
  `paypal_ipn_customer_notified` int(11) DEFAULT '0' COMMENT 'Paypal Ipn Customer Notified',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message Id',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_SALES_FLAT_ORDER_INCREMENT_ID` (`increment_id`),
  KEY `IDX_SALES_FLAT_ORDER_STATUS` (`status`),
  KEY `IDX_SALES_FLAT_ORDER_STATE` (`state`),
  KEY `IDX_SALES_FLAT_ORDER_STORE_ID` (`store_id`),
  KEY `IDX_SALES_FLAT_ORDER_CREATED_AT` (`created_at`),
  KEY `IDX_SALES_FLAT_ORDER_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_SALES_FLAT_ORDER_EXT_ORDER_ID` (`ext_order_id`),
  KEY `IDX_SALES_FLAT_ORDER_QUOTE_ID` (`quote_id`),
  KEY `IDX_SALES_FLAT_ORDER_UPDATED_AT` (`updated_at`),
  CONSTRAINT `FK_SALES_FLAT_ORDER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_ORDER_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order';


CREATE TABLE `sales_flat_order_address` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Id',
  `customer_address_id` int(11) DEFAULT NULL COMMENT 'Customer Address Id',
  `quote_address_id` int(11) DEFAULT NULL COMMENT 'Quote Address Id',
  `region_id` int(11) DEFAULT NULL COMMENT 'Region Id',
  `customer_id` int(11) DEFAULT NULL COMMENT 'Customer Id',
  `fax` varchar(255) DEFAULT NULL COMMENT 'Fax',
  `region` varchar(255) DEFAULT NULL COMMENT 'Region',
  `postcode` varchar(255) DEFAULT NULL COMMENT 'Postcode',
  `lastname` varchar(255) DEFAULT NULL COMMENT 'Lastname',
  `street` varchar(255) DEFAULT NULL COMMENT 'Street',
  `city` varchar(255) DEFAULT NULL COMMENT 'City',
  `email` varchar(255) DEFAULT NULL COMMENT 'Email',
  `telephone` varchar(255) DEFAULT NULL COMMENT 'Telephone',
  `country_id` varchar(2) DEFAULT NULL COMMENT 'Country Id',
  `firstname` varchar(255) DEFAULT NULL COMMENT 'Firstname',
  `address_type` varchar(255) DEFAULT NULL COMMENT 'Address Type',
  `prefix` varchar(255) DEFAULT NULL COMMENT 'Prefix',
  `middlename` varchar(255) DEFAULT NULL COMMENT 'Middlename',
  `suffix` varchar(255) DEFAULT NULL COMMENT 'Suffix',
  `company` varchar(255) DEFAULT NULL COMMENT 'Company',
  `vat_id` text COMMENT 'Vat Id',
  `vat_is_valid` smallint(6) DEFAULT NULL COMMENT 'Vat Is Valid',
  `vat_request_id` text COMMENT 'Vat Request Id',
  `vat_request_date` text COMMENT 'Vat Request Date',
  `vat_request_success` smallint(6) DEFAULT NULL COMMENT 'Vat Request Success',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_ORDER_ADDRESS_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_SALES_FLAT_ORDER_ADDRESS_PARENT_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Address';


CREATE TABLE `sales_flat_order_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity Id',
  `status` varchar(32) DEFAULT NULL COMMENT 'Status',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `base_total_paid` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Paid',
  `grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Grand Total',
  `total_paid` decimal(12,4) DEFAULT NULL COMMENT 'Total Paid',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `order_currency_code` varchar(255) DEFAULT NULL COMMENT 'Order Currency Code',
  `shipping_name` varchar(255) DEFAULT NULL COMMENT 'Shipping Name',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_SALES_FLAT_ORDER_GRID_INCREMENT_ID` (`increment_id`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_STATUS` (`status`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_STORE_ID` (`store_id`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_BASE_TOTAL_PAID` (`base_total_paid`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_TOTAL_PAID` (`total_paid`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_SHIPPING_NAME` (`shipping_name`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_BILLING_NAME` (`billing_name`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_CREATED_AT` (`created_at`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_SALES_FLAT_ORDER_GRID_UPDATED_AT` (`updated_at`),
  CONSTRAINT `FK_SALES_FLAT_ORDER_GRID_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_ORDER_GRID_ENTITY_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_ORDER_GRID_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Grid';


CREATE TABLE `sales_flat_order_item` (
  `item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Item Id',
  `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Order Id',
  `parent_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Item Id',
  `quote_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Quote Item Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Updated At',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product Id',
  `product_type` varchar(255) DEFAULT NULL COMMENT 'Product Type',
  `product_options` text COMMENT 'Product Options',
  `weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Weight',
  `is_virtual` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Virtual',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `description` text COMMENT 'Description',
  `applied_rule_ids` text COMMENT 'Applied Rule Ids',
  `additional_data` text COMMENT 'Additional Data',
  `free_shipping` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Free Shipping',
  `is_qty_decimal` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Qty Decimal',
  `no_discount` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'No Discount',
  `qty_backordered` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Backordered',
  `qty_canceled` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Canceled',
  `qty_invoiced` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Invoiced',
  `qty_ordered` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `qty_refunded` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Refunded',
  `qty_shipped` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Shipped',
  `base_cost` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Cost',
  `price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  `base_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Price',
  `original_price` decimal(12,4) DEFAULT NULL COMMENT 'Original Price',
  `base_original_price` decimal(12,4) DEFAULT NULL COMMENT 'Base Original Price',
  `tax_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'Tax Percent',
  `tax_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Tax Amount',
  `base_tax_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Tax Amount',
  `tax_invoiced` decimal(12,4) DEFAULT '0.0000' COMMENT 'Tax Invoiced',
  `base_tax_invoiced` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Tax Invoiced',
  `discount_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'Discount Percent',
  `discount_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Discount Amount',
  `base_discount_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Discount Amount',
  `discount_invoiced` decimal(12,4) DEFAULT '0.0000' COMMENT 'Discount Invoiced',
  `base_discount_invoiced` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Discount Invoiced',
  `amount_refunded` decimal(12,4) DEFAULT '0.0000' COMMENT 'Amount Refunded',
  `base_amount_refunded` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Amount Refunded',
  `row_total` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Total',
  `base_row_total` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Total',
  `row_invoiced` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Invoiced',
  `base_row_invoiced` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Invoiced',
  `row_weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Row Weight',
  `base_tax_before_discount` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Before Discount',
  `tax_before_discount` decimal(12,4) DEFAULT NULL COMMENT 'Tax Before Discount',
  `ext_order_item_id` varchar(255) DEFAULT NULL COMMENT 'Ext Order Item Id',
  `locked_do_invoice` smallint(5) unsigned DEFAULT NULL COMMENT 'Locked Do Invoice',
  `locked_do_ship` smallint(5) unsigned DEFAULT NULL COMMENT 'Locked Do Ship',
  `price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `base_row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
  `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
  `hidden_tax_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Invoiced',
  `base_hidden_tax_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Invoiced',
  `hidden_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Refunded',
  `base_hidden_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Refunded',
  `is_nominal` int(11) NOT NULL DEFAULT '0' COMMENT 'Is Nominal',
  `tax_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Tax Canceled',
  `hidden_tax_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Canceled',
  `tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Tax Refunded',
  `base_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Refunded',
  `discount_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Discount Refunded',
  `base_discount_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Refunded',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message Id',
  `gift_message_available` int(11) DEFAULT NULL COMMENT 'Gift Message Available',
  `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',
  `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',
  `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',
  `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',
  `weee_tax_applied` text COMMENT 'Weee Tax Applied',
  `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',
  `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',
  `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',
  `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',
  PRIMARY KEY (`item_id`),
  KEY `IDX_SALES_FLAT_ORDER_ITEM_ORDER_ID` (`order_id`),
  KEY `IDX_SALES_FLAT_ORDER_ITEM_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_FLAT_ORDER_ITEM_ORDER_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_ORDER_ITEM_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Item';


CREATE TABLE `sales_flat_order_payment` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent Id',
  `base_shipping_captured` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Captured',
  `shipping_captured` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Captured',
  `amount_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Amount Refunded',
  `base_amount_paid` decimal(12,4) DEFAULT NULL COMMENT 'Base Amount Paid',
  `amount_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Amount Canceled',
  `base_amount_authorized` decimal(12,4) DEFAULT NULL COMMENT 'Base Amount Authorized',
  `base_amount_paid_online` decimal(12,4) DEFAULT NULL COMMENT 'Base Amount Paid Online',
  `base_amount_refunded_online` decimal(12,4) DEFAULT NULL COMMENT 'Base Amount Refunded Online',
  `base_shipping_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `shipping_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `amount_paid` decimal(12,4) DEFAULT NULL COMMENT 'Amount Paid',
  `amount_authorized` decimal(12,4) DEFAULT NULL COMMENT 'Amount Authorized',
  `base_amount_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Base Amount Ordered',
  `base_shipping_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Refunded',
  `shipping_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Refunded',
  `base_amount_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Amount Refunded',
  `amount_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Amount Ordered',
  `base_amount_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Base Amount Canceled',
  `quote_payment_id` int(11) DEFAULT NULL COMMENT 'Quote Payment Id',
  `additional_data` text COMMENT 'Additional Data',
  `cc_exp_month` varchar(255) DEFAULT NULL COMMENT 'Cc Exp Month',
  `cc_ss_start_year` varchar(255) DEFAULT NULL COMMENT 'Cc Ss Start Year',
  `echeck_bank_name` varchar(255) DEFAULT NULL COMMENT 'Echeck Bank Name',
  `method` varchar(255) DEFAULT NULL COMMENT 'Method',
  `cc_debug_request_body` varchar(255) DEFAULT NULL COMMENT 'Cc Debug Request Body',
  `cc_secure_verify` varchar(255) DEFAULT NULL COMMENT 'Cc Secure Verify',
  `protection_eligibility` varchar(255) DEFAULT NULL COMMENT 'Protection Eligibility',
  `cc_approval` varchar(255) DEFAULT NULL COMMENT 'Cc Approval',
  `cc_last4` varchar(255) DEFAULT NULL COMMENT 'Cc Last4',
  `cc_status_description` varchar(255) DEFAULT NULL COMMENT 'Cc Status Description',
  `echeck_type` varchar(255) DEFAULT NULL COMMENT 'Echeck Type',
  `cc_debug_response_serialized` varchar(255) DEFAULT NULL COMMENT 'Cc Debug Response Serialized',
  `cc_ss_start_month` varchar(255) DEFAULT NULL COMMENT 'Cc Ss Start Month',
  `echeck_account_type` varchar(255) DEFAULT NULL COMMENT 'Echeck Account Type',
  `last_trans_id` varchar(255) DEFAULT NULL COMMENT 'Last Trans Id',
  `cc_cid_status` varchar(255) DEFAULT NULL COMMENT 'Cc Cid Status',
  `cc_owner` varchar(255) DEFAULT NULL COMMENT 'Cc Owner',
  `cc_type` varchar(255) DEFAULT NULL COMMENT 'Cc Type',
  `po_number` varchar(255) DEFAULT NULL COMMENT 'Po Number',
  `cc_exp_year` varchar(255) DEFAULT NULL COMMENT 'Cc Exp Year',
  `cc_status` varchar(255) DEFAULT NULL COMMENT 'Cc Status',
  `echeck_routing_number` varchar(255) DEFAULT NULL COMMENT 'Echeck Routing Number',
  `account_status` varchar(255) DEFAULT NULL COMMENT 'Account Status',
  `anet_trans_method` varchar(255) DEFAULT NULL COMMENT 'Anet Trans Method',
  `cc_debug_response_body` varchar(255) DEFAULT NULL COMMENT 'Cc Debug Response Body',
  `cc_ss_issue` varchar(255) DEFAULT NULL COMMENT 'Cc Ss Issue',
  `echeck_account_name` varchar(255) DEFAULT NULL COMMENT 'Echeck Account Name',
  `cc_avs_status` varchar(255) DEFAULT NULL COMMENT 'Cc Avs Status',
  `cc_number_enc` varchar(255) DEFAULT NULL COMMENT 'Cc Number Enc',
  `cc_trans_id` varchar(255) DEFAULT NULL COMMENT 'Cc Trans Id',
  `paybox_request_number` varchar(255) DEFAULT NULL COMMENT 'Paybox Request Number',
  `address_status` varchar(255) DEFAULT NULL COMMENT 'Address Status',
  `additional_information` text COMMENT 'Additional Information',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_ORDER_PAYMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_SALES_FLAT_ORDER_PAYMENT_PARENT_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Payment';


CREATE TABLE `sales_flat_order_status_history` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent Id',
  `is_customer_notified` int(11) DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `status` varchar(32) DEFAULT NULL COMMENT 'Status',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `entity_name` varchar(32) DEFAULT NULL COMMENT 'Shows what entity history is bind to.',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_ORDER_STATUS_HISTORY_PARENT_ID` (`parent_id`),
  KEY `IDX_SALES_FLAT_ORDER_STATUS_HISTORY_CREATED_AT` (`created_at`),
  CONSTRAINT `FK_CE7C71E74CB74DDACED337CEE6753D5E` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Status History';

CREATE TABLE `sales_flat_quote_address` (
  `address_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Address Id',
  `quote_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote Id',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Updated At',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `save_in_address_book` smallint(6) DEFAULT '0' COMMENT 'Save In Address Book',
  `customer_address_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Address Id',
  `address_type` varchar(255) DEFAULT NULL COMMENT 'Address Type',
  `email` varchar(255) DEFAULT NULL COMMENT 'Email',
  `prefix` varchar(40) DEFAULT NULL COMMENT 'Prefix',
  `firstname` varchar(255) DEFAULT NULL COMMENT 'Firstname',
  `middlename` varchar(40) DEFAULT NULL COMMENT 'Middlename',
  `lastname` varchar(255) DEFAULT NULL COMMENT 'Lastname',
  `suffix` varchar(40) DEFAULT NULL COMMENT 'Suffix',
  `company` varchar(255) DEFAULT NULL COMMENT 'Company',
  `street` varchar(255) DEFAULT NULL COMMENT 'Street',
  `city` varchar(255) DEFAULT NULL COMMENT 'City',
  `region` varchar(255) DEFAULT NULL COMMENT 'Region',
  `region_id` int(10) unsigned DEFAULT NULL COMMENT 'Region Id',
  `postcode` varchar(255) DEFAULT NULL COMMENT 'Postcode',
  `country_id` varchar(255) DEFAULT NULL COMMENT 'Country Id',
  `telephone` varchar(255) DEFAULT NULL COMMENT 'Telephone',
  `fax` varchar(255) DEFAULT NULL COMMENT 'Fax',
  `same_as_billing` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Same As Billing',
  `free_shipping` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Free Shipping',
  `collect_shipping_rates` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Collect Shipping Rates',
  `shipping_method` varchar(255) DEFAULT NULL COMMENT 'Shipping Method',
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `weight` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Weight',
  `subtotal` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal',
  `base_subtotal` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Subtotal',
  `subtotal_with_discount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal With Discount',
  `base_subtotal_with_discount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Subtotal With Discount',
  `tax_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Tax Amount',
  `base_tax_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Tax Amount',
  `shipping_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Shipping Amount',
  `base_shipping_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Shipping Amount',
  `shipping_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `base_shipping_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `base_discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Discount Amount',
  `grand_total` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Grand Total',
  `base_grand_total` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Grand Total',
  `customer_notes` text COMMENT 'Customer Notes',
  `applied_taxes` text COMMENT 'Applied Taxes',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  `shipping_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Discount Amount',
  `base_shipping_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Discount Amount',
  `subtotal_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `base_subtotal_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal Total Incl Tax',
  `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
  `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
  `shipping_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Hidden Tax Amount',
  `base_shipping_hidden_tax_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Hidden Tax Amount',
  `shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `vat_id` text COMMENT 'Vat Id',
  `vat_is_valid` smallint(6) DEFAULT NULL COMMENT 'Vat Is Valid',
  `vat_request_id` text COMMENT 'Vat Request Id',
  `vat_request_date` text COMMENT 'Vat Request Date',
  `vat_request_success` smallint(6) DEFAULT NULL COMMENT 'Vat Request Success',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message Id',
  PRIMARY KEY (`address_id`),
  KEY `IDX_SALES_FLAT_QUOTE_ADDRESS_QUOTE_ID` (`quote_id`),
  CONSTRAINT `FK_SALES_FLAT_QUOTE_ADDRESS_QUOTE_ID_SALES_FLAT_QUOTE_ENTITY_ID` FOREIGN KEY (`quote_id`) REFERENCES `sales_flat_quote` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Address';

INSERT INTO `sales_flat_quote_address` (`address_id`, `quote_id`, `created_at`, `updated_at`, `customer_id`, `save_in_address_book`, `customer_address_id`, `address_type`, `email`, `prefix`, `firstname`, `middlename`, `lastname`, `suffix`, `company`, `street`, `city`, `region`, `region_id`, `postcode`, `country_id`, `telephone`, `fax`, `same_as_billing`, `free_shipping`, `collect_shipping_rates`, `shipping_method`, `shipping_description`, `weight`, `subtotal`, `base_subtotal`, `subtotal_with_discount`, `base_subtotal_with_discount`, `tax_amount`, `base_tax_amount`, `shipping_amount`, `base_shipping_amount`, `shipping_tax_amount`, `base_shipping_tax_amount`, `discount_amount`, `base_discount_amount`, `grand_total`, `base_grand_total`, `customer_notes`, `applied_taxes`, `discount_description`, `shipping_discount_amount`, `base_shipping_discount_amount`, `subtotal_incl_tax`, `base_subtotal_total_incl_tax`, `hidden_tax_amount`, `base_hidden_tax_amount`, `shipping_hidden_tax_amount`, `base_shipping_hidden_tax_amnt`, `shipping_incl_tax`, `base_shipping_incl_tax`, `vat_id`, `vat_is_valid`, `vat_request_id`, `vat_request_date`, `vat_request_success`, `gift_message_id`) VALUES
(1,	1,	'2017-09-27 12:35:34',	'2018-01-18 15:52:55',	1,	0,	1,	'billing',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(2,	1,	'2017-09-27 12:35:34',	'2018-01-18 15:52:55',	1,	0,	1,	'shipping',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	1,	0,	0,	'flatrate_flatrate',	'Flat Rate - Fixed',	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	0.0000,	0.0000,	5.0000,	5.0000,	0.0000,	0.0000,	0.0000,	0.0000,	31.9000,	31.9000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	5.0000,	5.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(5,	3,	'2017-09-27 13:30:10',	'2017-09-27 16:29:50',	NULL,	1,	NULL,	'billing',	'asd@asd.com',	NULL,	'asd',	NULL,	'asd',	NULL,	NULL,	'asd',	'asd',	'Connecticut',	14,	'asd',	'US',	'asd',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(6,	3,	'2017-09-27 13:30:10',	'2017-09-27 16:29:50',	NULL,	1,	NULL,	'shipping',	'asd@asd.com',	NULL,	'asd',	NULL,	'asd',	NULL,	NULL,	'asd',	'asd',	'Connecticut',	14,	'asd',	'US',	'asd',	NULL,	1,	0,	0,	'flatrate_flatrate',	'Flat Rate - Fixed',	0.0000,	22.0000,	22.0000,	0.0000,	0.0000,	0.0000,	0.0000,	5.0000,	5.0000,	0.0000,	0.0000,	0.0000,	0.0000,	27.0000,	27.0000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	22.0000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	5.0000,	5.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(7,	4,	'2017-12-19 19:53:03',	'2017-12-19 19:53:47',	NULL,	0,	NULL,	'billing',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(8,	4,	'2017-12-19 19:53:03',	'2017-12-19 19:53:47',	NULL,	0,	NULL,	'shipping',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	1,	0,	1,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(13,	7,	'2018-01-18 18:33:44',	'2018-01-18 18:34:00',	1,	0,	1,	'billing',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(14,	7,	'2018-01-18 18:33:44',	'2018-01-18 18:34:00',	1,	0,	1,	'shipping',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	1,	0,	0,	'flatrate_flatrate',	'Flat Rate - Fixed',	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	0.0000,	0.0000,	5.0000,	5.0000,	0.0000,	0.0000,	0.0000,	0.0000,	31.9000,	31.9000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	5.0000,	5.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(15,	8,	'2018-01-18 18:42:27',	'2018-01-18 18:51:55',	1,	0,	1,	'billing',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(16,	8,	'2018-01-18 18:42:27',	'2018-01-18 18:51:55',	1,	0,	1,	'shipping',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	1,	0,	0,	'flatrate_flatrate',	'Flat Rate - Fixed',	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	0.0000,	0.0000,	5.0000,	5.0000,	0.0000,	0.0000,	0.0000,	0.0000,	31.9000,	31.9000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	5.0000,	5.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(17,	9,	'2018-01-18 18:55:26',	'2018-01-18 18:57:23',	1,	0,	2,	'billing',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Abbeville ( 334 )',	'Abbeville',	'Alabama',	1,	'36310',	'US',	'0740123456',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(18,	9,	'2018-01-18 18:55:26',	'2018-01-18 18:57:23',	1,	0,	2,	'shipping',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Abbeville ( 334 )',	'Abbeville',	'Alabama',	1,	'36310',	'US',	'0740123456',	NULL,	1,	0,	0,	'tablerate_bestway',	'Shipping Method - Table Rate',	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	0.0000,	0.0000,	4.0000,	4.0000,	0.0000,	0.0000,	0.0000,	0.0000,	30.9000,	30.9000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	4.0000,	4.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(19,	10,	'2018-01-18 19:08:59',	'2018-01-18 19:10:04',	1,	0,	2,	'billing',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Abbeville ( 334 )',	'Abbeville',	'Alabama',	1,	'36310',	'US',	'0740123456',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(20,	10,	'2018-01-18 19:08:59',	'2018-01-18 19:10:04',	1,	0,	2,	'shipping',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Abbeville ( 334 )',	'Abbeville',	'Alabama',	1,	'36310',	'US',	'0740123456',	NULL,	1,	0,	0,	'tablerate_bestway',	'Shipping Method - Table Rate',	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	0.0000,	0.0000,	4.0000,	4.0000,	0.0000,	0.0000,	0.0000,	0.0000,	30.9000,	30.9000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	4.0000,	4.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(21,	11,	'2018-01-18 19:11:34',	'2018-01-18 19:11:49',	1,	0,	1,	'billing',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(22,	11,	'2018-01-18 19:11:34',	'2018-01-18 19:11:49',	1,	0,	1,	'shipping',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	1,	0,	0,	'flatrate_flatrate',	'Flat Rate - Fixed',	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	0.0000,	0.0000,	5.0000,	5.0000,	0.0000,	0.0000,	0.0000,	0.0000,	31.9000,	31.9000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	5.0000,	5.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(23,	12,	'2018-01-18 20:38:15',	'2018-01-19 20:36:12',	1,	0,	1,	'billing',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(24,	12,	'2018-01-18 20:38:15',	'2018-01-19 20:36:12',	1,	0,	1,	'shipping',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	1,	0,	0,	'flatrate_flatrate',	'Flat Rate - Fixed',	0.0000,	16.9500,	16.9500,	0.0000,	0.0000,	0.0000,	0.0000,	5.0000,	5.0000,	0.0000,	0.0000,	0.0000,	0.0000,	21.9500,	21.9500,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	16.9500,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	5.0000,	5.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(25,	13,	'2018-01-19 19:45:50',	'2018-01-19 20:03:44',	NULL,	0,	NULL,	'billing',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(26,	13,	'2018-01-19 19:45:50',	'2018-01-19 20:03:44',	NULL,	0,	NULL,	'shipping',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	1,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(27,	14,	'2018-01-19 20:41:50',	'2018-05-04 13:35:20',	1,	0,	1,	'billing',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Boulevard of Broken Dreams',	'Tg-Mures',	'Mureş',	306,	'123',	'RO',	'123',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(28,	14,	'2018-01-19 20:41:50',	'2018-05-04 13:35:20',	1,	0,	2,	'shipping',	'marius@aprilred.com',	NULL,	'AR',	NULL,	'DEV',	NULL,	'AR',	'Abbeville ( 334 )',	'Abbeville',	'Alabama',	1,	'36310',	'US',	'0740123456',	NULL,	1,	0,	0,	'tablerate_bestway',	'Shipping Method - Table Rate',	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(29,	15,	'2018-01-22 15:27:42',	'2018-01-22 15:31:45',	NULL,	0,	NULL,	'billing',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(30,	15,	'2018-01-22 15:27:42',	'2018-01-22 15:31:45',	NULL,	0,	NULL,	'shipping',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	1,	0,	1,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(31,	16,	'2018-05-28 20:35:41',	'2018-05-28 20:44:13',	NULL,	1,	NULL,	'billing',	'levin@em.uni-frankfurt.de',	NULL,	'Tobe Levin',	NULL,	'von Gleichen',	NULL,	NULL,	'Martin-Luther-Str. 35',	'Frankfurt am Main',	'Hessen',	86,	'60389',	'DE',	'+491777494062',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(32,	16,	'2018-05-28 20:35:41',	'2018-05-28 20:44:13',	NULL,	1,	NULL,	'shipping',	NULL,	NULL,	'Tobe Levin',	NULL,	'von Gleichen',	NULL,	'DATAFORCE',	'Hamburger Allee 14',	'Frankfurt am Main',	'Hessen',	86,	'60486',	'DE',	'+491777494062',	NULL,	0,	0,	0,	'flatrate_flatrate',	'Flat Rate - Fixed',	0.0000,	17.0000,	17.0000,	0.0000,	0.0000,	0.0000,	0.0000,	5.0000,	5.0000,	0.0000,	0.0000,	0.0000,	0.0000,	22.0000,	22.0000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	17.0000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	5.0000,	5.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(33,	17,	'2018-05-28 20:56:50',	'2018-05-28 20:56:50',	NULL,	0,	NULL,	'billing',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(34,	17,	'2018-05-28 20:56:50',	'2018-05-28 20:56:50',	NULL,	0,	NULL,	'shipping',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	1,	0,	0,	NULL,	NULL,	0.0000,	17.0000,	17.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	17.0000,	17.0000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	17.0000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(35,	18,	'2018-05-28 21:01:47',	'2018-05-28 21:07:17',	NULL,	1,	NULL,	'billing',	'christoph.von.gleichen@dataforce.de',	NULL,	'Christoph',	NULL,	'von Gleichen',	NULL,	'Dataforce GmbH',	'Hamburger Allee 14',	'Frankfurt',	'Hessen',	86,	'60486',	'DE',	'+4969959300',	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(36,	18,	'2018-05-28 21:01:47',	'2018-05-28 21:07:17',	NULL,	0,	NULL,	'shipping',	'christoph.von.gleichen@dataforce.de',	NULL,	'Christoph',	NULL,	'von Gleichen',	NULL,	'Dataforce GmbH',	'Hamburger Allee 14',	'Frankfurt',	'Hessen',	86,	'60486',	'DE',	'+4969959300',	NULL,	0,	0,	0,	'flatrate_flatrate',	'Flat Rate - Fixed',	0.0000,	17.0000,	17.0000,	0.0000,	0.0000,	0.0000,	0.0000,	5.0000,	5.0000,	0.0000,	0.0000,	0.0000,	0.0000,	22.0000,	22.0000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	17.0000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	5.0000,	5.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(37,	19,	'2018-06-25 18:04:09',	'2018-06-25 18:05:04',	NULL,	0,	NULL,	'billing',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(38,	19,	'2018-06-25 18:04:09',	'2018-06-25 18:05:04',	NULL,	0,	NULL,	'shipping',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	1,	0,	0,	NULL,	NULL,	0.0000,	16.1100,	16.1100,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	16.1100,	16.1100,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	16.1100,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(39,	20,	'2018-06-28 16:07:00',	'2018-06-28 16:07:06',	NULL,	0,	NULL,	'billing',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	NULL,	NULL,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL),
(40,	20,	'2018-06-28 16:07:00',	'2018-06-28 16:07:06',	NULL,	0,	NULL,	'shipping',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	1,	0,	1,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	'a:0:{}',	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL);

CREATE TABLE `sales_flat_quote_address_item` (
  `address_item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Address Item Id',
  `parent_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Item Id',
  `quote_address_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote Address Id',
  `quote_item_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote Item Id',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Updated At',
  `applied_rule_ids` text COMMENT 'Applied Rule Ids',
  `additional_data` text COMMENT 'Additional Data',
  `weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Weight',
  `qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty',
  `discount_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Discount Amount',
  `tax_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Tax Amount',
  `row_total` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Total',
  `base_row_total` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Total',
  `row_total_with_discount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Row Total With Discount',
  `base_discount_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Discount Amount',
  `base_tax_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Tax Amount',
  `row_weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Row Weight',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product Id',
  `super_product_id` int(10) unsigned DEFAULT NULL COMMENT 'Super Product Id',
  `parent_product_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Product Id',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `image` varchar(255) DEFAULT NULL COMMENT 'Image',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `description` text COMMENT 'Description',
  `free_shipping` int(10) unsigned DEFAULT NULL COMMENT 'Free Shipping',
  `is_qty_decimal` int(10) unsigned DEFAULT NULL COMMENT 'Is Qty Decimal',
  `price` decimal(12,4) DEFAULT NULL COMMENT 'Price',
  `discount_percent` decimal(12,4) DEFAULT NULL COMMENT 'Discount Percent',
  `no_discount` int(10) unsigned DEFAULT NULL COMMENT 'No Discount',
  `tax_percent` decimal(12,4) DEFAULT NULL COMMENT 'Tax Percent',
  `base_price` decimal(12,4) DEFAULT NULL COMMENT 'Base Price',
  `base_cost` decimal(12,4) DEFAULT NULL COMMENT 'Base Cost',
  `price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `base_row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
  `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message Id',
  PRIMARY KEY (`address_item_id`),
  KEY `IDX_SALES_FLAT_QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS_ID` (`quote_address_id`),
  KEY `IDX_SALES_FLAT_QUOTE_ADDRESS_ITEM_PARENT_ITEM_ID` (`parent_item_id`),
  KEY `IDX_SALES_FLAT_QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID` (`quote_item_id`),
  CONSTRAINT `FK_2EF8E28181D666D94D4E30DC2B0F80BF` FOREIGN KEY (`quote_item_id`) REFERENCES `sales_flat_quote_item` (`item_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_A345FC758F20C314169CE27DCE53477F` FOREIGN KEY (`parent_item_id`) REFERENCES `sales_flat_quote_address_item` (`address_item_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_B521389746C00700D1B2B76EBBE53854` FOREIGN KEY (`quote_address_id`) REFERENCES `sales_flat_quote_address` (`address_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Address Item';


CREATE TABLE `sales_flat_quote_item` (
  `item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Item Id',
  `quote_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote Id',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Updated At',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `parent_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Item Id',
  `is_virtual` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Virtual',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `description` text COMMENT 'Description',
  `applied_rule_ids` text COMMENT 'Applied Rule Ids',
  `additional_data` text COMMENT 'Additional Data',
  `free_shipping` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Free Shipping',
  `is_qty_decimal` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Qty Decimal',
  `no_discount` smallint(5) unsigned DEFAULT '0' COMMENT 'No Discount',
  `weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Weight',
  `qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty',
  `price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  `base_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Price',
  `custom_price` decimal(12,4) DEFAULT NULL COMMENT 'Custom Price',
  `discount_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'Discount Percent',
  `discount_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Discount Amount',
  `base_discount_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Discount Amount',
  `tax_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'Tax Percent',
  `tax_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Tax Amount',
  `base_tax_amount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Tax Amount',
  `row_total` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Total',
  `base_row_total` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Total',
  `row_total_with_discount` decimal(12,4) DEFAULT '0.0000' COMMENT 'Row Total With Discount',
  `row_weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Row Weight',
  `product_type` varchar(255) DEFAULT NULL COMMENT 'Product Type',
  `base_tax_before_discount` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Before Discount',
  `tax_before_discount` decimal(12,4) DEFAULT NULL COMMENT 'Tax Before Discount',
  `original_custom_price` decimal(12,4) DEFAULT NULL COMMENT 'Original Custom Price',
  `redirect_url` varchar(255) DEFAULT NULL COMMENT 'Redirect Url',
  `base_cost` decimal(12,4) DEFAULT NULL COMMENT 'Base Cost',
  `price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `base_row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
  `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message Id',
  `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',
  `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',
  `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',
  `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',
  `weee_tax_applied` text COMMENT 'Weee Tax Applied',
  `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',
  `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',
  `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',
  `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',
  PRIMARY KEY (`item_id`),
  KEY `IDX_SALES_FLAT_QUOTE_ITEM_PARENT_ITEM_ID` (`parent_item_id`),
  KEY `IDX_SALES_FLAT_QUOTE_ITEM_PRODUCT_ID` (`product_id`),
  KEY `IDX_SALES_FLAT_QUOTE_ITEM_QUOTE_ID` (`quote_id`),
  KEY `IDX_SALES_FLAT_QUOTE_ITEM_STORE_ID` (`store_id`),
  CONSTRAINT `FK_B201DEB5DE51B791AF5C5BF87053C5A7` FOREIGN KEY (`parent_item_id`) REFERENCES `sales_flat_quote_item` (`item_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_QUOTE_ITEM_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_QUOTE_ITEM_QUOTE_ID_SALES_FLAT_QUOTE_ENTITY_ID` FOREIGN KEY (`quote_id`) REFERENCES `sales_flat_quote` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_QUOTE_ITEM_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Item';

INSERT INTO `sales_flat_quote_item` (`item_id`, `quote_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `parent_item_id`, `is_virtual`, `sku`, `name`, `description`, `applied_rule_ids`, `additional_data`, `free_shipping`, `is_qty_decimal`, `no_discount`, `weight`, `qty`, `price`, `base_price`, `custom_price`, `discount_percent`, `discount_amount`, `base_discount_amount`, `tax_percent`, `tax_amount`, `base_tax_amount`, `row_total`, `base_row_total`, `row_total_with_discount`, `row_weight`, `product_type`, `base_tax_before_discount`, `tax_before_discount`, `original_custom_price`, `redirect_url`, `base_cost`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `hidden_tax_amount`, `base_hidden_tax_amount`, `gift_message_id`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `base_weee_tax_applied_amount`, `base_weee_tax_applied_row_amnt`) VALUES
(3,	3,	'2017-09-27 13:30:10',	'2017-09-27 13:30:10',	4,	1,	NULL,	0,	'978-3-9813863-2-1',	'Waging Empathy',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	22.0000,	22.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	22.0000,	22.0000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	22.0000,	22.0000,	22.0000,	22.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(10,	1,	'2018-01-18 15:49:53',	'2018-01-18 15:50:06',	2,	1,	NULL,	0,	'978-3-9813863-1-8',	'Undoing FGM',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	26.9000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	26.9000,	26.9000,	26.9000,	26.9000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(11,	7,	'2018-01-18 18:33:44',	'2018-01-18 18:33:44',	2,	1,	NULL,	0,	'978-3-9813863-1-8',	'Undoing FGM',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	26.9000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	26.9000,	26.9000,	26.9000,	26.9000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(12,	8,	'2018-01-18 18:42:27',	'2018-01-18 18:42:27',	2,	1,	NULL,	0,	'978-3-9813863-1-8',	'Undoing FGM',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	26.9000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	26.9000,	26.9000,	26.9000,	26.9000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(13,	9,	'2018-01-18 18:55:26',	'2018-01-18 18:55:26',	2,	1,	NULL,	0,	'978-3-9813863-1-8',	'Undoing FGM',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	26.9000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	26.9000,	26.9000,	26.9000,	26.9000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(14,	10,	'2018-01-18 19:08:59',	'2018-01-18 19:08:59',	2,	1,	NULL,	0,	'978-3-9813863-1-8',	'Undoing FGM',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	26.9000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	26.9000,	26.9000,	26.9000,	26.9000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(15,	11,	'2018-01-18 19:11:34',	'2018-01-18 19:11:34',	2,	1,	NULL,	0,	'978-3-9813863-1-8',	'Undoing FGM',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	26.9000,	26.9000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	26.9000,	26.9000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	26.9000,	26.9000,	26.9000,	26.9000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(16,	12,	'2018-01-18 20:38:15',	'2018-01-19 14:25:40',	8,	1,	NULL,	0,	'978-1-63152-180-5',	'Stones: A Novel',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	16.9500,	16.9500,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	16.9500,	16.9500,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	16.9500,	16.9500,	16.9500,	16.9500,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(17,	12,	'2018-01-19 15:54:39',	'2018-01-19 15:54:39',	9,	1,	NULL,	0,	'978-3-9813863-7-0',	'In the Name of Tradition',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(18,	13,	'2018-01-19 19:45:50',	'2018-01-19 19:45:50',	9,	1,	NULL,	0,	'978-3-9813863-7-0',	'In the Name of Tradition',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(19,	16,	'2018-05-28 20:35:41',	'2018-05-28 20:35:41',	4,	1,	NULL,	0,	'978-3-9813863-3-2',	'Waging Empathy',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	17.0000,	17.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	17.0000,	17.0000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	17.0000,	17.0000,	17.0000,	17.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(20,	17,	'2018-05-28 20:56:50',	'2018-05-28 20:56:50',	4,	1,	NULL,	0,	'978-3-9813863-3-2',	'Waging Empathy',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	17.0000,	17.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	17.0000,	17.0000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	17.0000,	17.0000,	17.0000,	17.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(21,	18,	'2018-05-28 21:01:47',	'2018-05-28 21:01:47',	4,	1,	NULL,	0,	'978-3-9813863-3-2',	'Waging Empathy',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	17.0000,	17.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	17.0000,	17.0000,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	17.0000,	17.0000,	17.0000,	17.0000,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL),
(22,	19,	'2018-06-25 18:04:09',	'2018-06-25 18:04:09',	8,	1,	NULL,	0,	'978-1-6315218-0-5',	'Stones: A Novel',	NULL,	NULL,	NULL,	0,	0,	0,	NULL,	1.0000,	16.1100,	16.1100,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	0.0000,	16.1100,	16.1100,	0.0000,	0.0000,	'simple',	NULL,	NULL,	NULL,	NULL,	NULL,	16.1100,	16.1100,	16.1100,	16.1100,	0.0000,	0.0000,	NULL,	0.0000,	0.0000,	0.0000,	0.0000,	'a:0:{}',	0.0000,	0.0000,	0.0000,	NULL);

CREATE TABLE `sales_flat_quote_item_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Id',
  `item_id` int(10) unsigned NOT NULL COMMENT 'Item Id',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product Id',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `value` text COMMENT 'Value',
  PRIMARY KEY (`option_id`),
  KEY `IDX_SALES_FLAT_QUOTE_ITEM_OPTION_ITEM_ID` (`item_id`),
  CONSTRAINT `FK_5F20E478CA64B6891EA8A9D6C2735739` FOREIGN KEY (`item_id`) REFERENCES `sales_flat_quote_item` (`item_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Item Option';

INSERT INTO `sales_flat_quote_item_option` (`option_id`, `item_id`, `product_id`, `code`, `value`) VALUES
(3,	3,	4,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:64:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3dhZ2luZy1lbXBhdGh5Lmh0bWw,\";s:7:\"product\";s:1:\"4\";s:8:\"form_key\";s:16:\"s3PEoMOQ2QoTNA8E\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(10,	10,	2,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:60:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3VuZG9pbmctZmdtLmh0bWw,\";s:7:\"product\";s:1:\"2\";s:8:\"form_key\";s:16:\"JMQgNPU7AfUm8XaF\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(11,	11,	2,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:60:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3VuZG9pbmctZmdtLmh0bWw,\";s:7:\"product\";s:1:\"2\";s:8:\"form_key\";s:16:\"7XPMZZoEI5yNaLJZ\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(12,	12,	2,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:60:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3VuZG9pbmctZmdtLmh0bWw,\";s:7:\"product\";s:1:\"2\";s:8:\"form_key\";s:16:\"7XPMZZoEI5yNaLJZ\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(13,	13,	2,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:60:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3VuZG9pbmctZmdtLmh0bWw,\";s:7:\"product\";s:1:\"2\";s:8:\"form_key\";s:16:\"7XPMZZoEI5yNaLJZ\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:6:\"1.0000\";}'),
(14,	14,	2,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:60:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3VuZG9pbmctZmdtLmh0bWw,\";s:7:\"product\";s:1:\"2\";s:8:\"form_key\";s:16:\"7XPMZZoEI5yNaLJZ\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(15,	15,	2,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:60:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3VuZG9pbmctZmdtLmh0bWw,\";s:7:\"product\";s:1:\"2\";s:8:\"form_key\";s:16:\"7XPMZZoEI5yNaLJZ\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:6:\"1.0000\";}'),
(16,	16,	8,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:64:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3N0b25lcy1hLW5vdmVsLmh0bWw,\";s:7:\"product\";s:1:\"8\";s:8:\"form_key\";s:16:\"7XPMZZoEI5yNaLJZ\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(17,	17,	9,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:76:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L2luLXRoZS1uYW1lLW9mLXRyYWRpdGlvbi5odG1s\";s:7:\"product\";s:1:\"9\";s:8:\"form_key\";s:16:\"7XPMZZoEI5yNaLJZ\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(18,	18,	9,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:76:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L2luLXRoZS1uYW1lLW9mLXRyYWRpdGlvbi5odG1s\";s:7:\"product\";s:1:\"9\";s:8:\"form_key\";s:16:\"mNsyW0QHtgRfbejl\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(19,	19,	4,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:64:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3dhZ2luZy1lbXBhdGh5Lmh0bWw,\";s:7:\"product\";s:1:\"4\";s:8:\"form_key\";s:16:\"DSPVSqF8z4EZrOp1\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(20,	20,	4,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:64:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3dhZ2luZy1lbXBhdGh5Lmh0bWw,\";s:7:\"product\";s:1:\"4\";s:8:\"form_key\";s:16:\"YTLFkIALgWjL8ieC\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(21,	21,	4,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:64:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3dhZ2luZy1lbXBhdGh5Lmh0bWw,\";s:7:\"product\";s:1:\"4\";s:8:\"form_key\";s:16:\"oCkYbsN9noYMEYNs\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),
(22,	22,	8,	'info_buyRequest',	'a:5:{s:4:\"uenc\";s:64:\"aHR0cDovL3VuY3V0LnRlc3RwbGF0NG0ubmV0L3N0b25lcy1hLW5vdmVsLmh0bWw,\";s:7:\"product\";s:1:\"8\";s:8:\"form_key\";s:16:\"Bdz19XQpVT4dJZQk\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}');

CREATE TABLE `sales_flat_quote_shipping_rate` (
  `rate_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rate Id',
  `address_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Address Id',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Updated At',
  `carrier` varchar(255) DEFAULT NULL COMMENT 'Carrier',
  `carrier_title` varchar(255) DEFAULT NULL COMMENT 'Carrier Title',
  `code` varchar(255) DEFAULT NULL COMMENT 'Code',
  `method` varchar(255) DEFAULT NULL COMMENT 'Method',
  `method_description` text COMMENT 'Method Description',
  `price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  `error_message` text COMMENT 'Error Message',
  `method_title` text COMMENT 'Method Title',
  PRIMARY KEY (`rate_id`),
  KEY `IDX_SALES_FLAT_QUOTE_SHIPPING_RATE_ADDRESS_ID` (`address_id`),
  CONSTRAINT `FK_B1F177EFB73D3EDF5322BA64AC48D150` FOREIGN KEY (`address_id`) REFERENCES `sales_flat_quote_address` (`address_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Shipping Rate';

INSERT INTO `sales_flat_quote_shipping_rate` (`rate_id`, `address_id`, `created_at`, `updated_at`, `carrier`, `carrier_title`, `code`, `method`, `method_description`, `price`, `error_message`, `method_title`) VALUES
(24,	6,	'2017-09-27 16:29:50',	'2017-09-27 16:29:50',	'flatrate',	'Flat Rate',	'flatrate_flatrate',	'flatrate',	NULL,	5.0000,	NULL,	'Fixed'),
(45,	2,	'2018-01-18 15:50:50',	'2018-01-18 15:52:55',	'flatrate',	'Flat Rate',	'flatrate_flatrate',	'flatrate',	NULL,	5.0000,	NULL,	'Fixed'),
(48,	14,	'2018-01-18 18:33:57',	'2018-01-18 18:34:00',	'flatrate',	'Flat Rate',	'flatrate_flatrate',	'flatrate',	NULL,	5.0000,	NULL,	'Fixed'),
(51,	16,	'2018-01-18 18:51:53',	'2018-01-18 18:51:55',	'flatrate',	'Flat Rate',	'flatrate_flatrate',	'flatrate',	NULL,	5.0000,	NULL,	'Fixed'),
(54,	18,	'2018-01-18 18:57:20',	'2018-01-18 18:57:23',	'tablerate',	'Shipping Method',	'tablerate_bestway',	'bestway',	NULL,	4.0000,	NULL,	'Table Rate'),
(57,	20,	'2018-01-18 19:09:54',	'2018-01-18 19:10:04',	'tablerate',	'Shipping Method',	'tablerate_bestway',	'bestway',	NULL,	4.0000,	NULL,	'Table Rate'),
(60,	22,	'2018-01-18 19:11:48',	'2018-01-18 19:11:49',	'flatrate',	'Flat Rate',	'flatrate_flatrate',	'flatrate',	NULL,	5.0000,	NULL,	'Fixed'),
(106,	24,	'2018-01-19 20:36:07',	'2018-01-19 20:36:12',	'flatrate',	'Flat Rate',	'flatrate_flatrate',	'flatrate',	NULL,	5.0000,	NULL,	'Fixed'),
(124,	28,	'2018-03-07 13:36:40',	'2018-03-07 13:36:45',	'tablerate',	'Shipping Method',	'tablerate_bestway',	'bestway',	NULL,	4.0000,	NULL,	'Table Rate'),
(126,	32,	'2018-05-28 20:44:12',	'2018-05-28 20:44:13',	'flatrate',	'Flat Rate',	'flatrate_flatrate',	'flatrate',	NULL,	5.0000,	NULL,	'Fixed'),
(130,	36,	'2018-05-28 21:07:03',	'2018-05-28 21:07:17',	'flatrate',	'Flat Rate',	'flatrate_flatrate',	'flatrate',	NULL,	5.0000,	NULL,	'Fixed');

CREATE TABLE `sales_flat_shipment` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `total_weight` decimal(12,4) DEFAULT NULL COMMENT 'Total Weight',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `email_sent` smallint(5) unsigned DEFAULT NULL COMMENT 'Email Sent',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `customer_id` int(11) DEFAULT NULL COMMENT 'Customer Id',
  `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address Id',
  `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address Id',
  `shipment_status` int(11) DEFAULT NULL COMMENT 'Shipment Status',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `packages` text COMMENT 'Packed Products in Packages',
  `shipping_label` mediumblob COMMENT 'Shipping Label Content',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_SALES_FLAT_SHIPMENT_INCREMENT_ID` (`increment_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_STORE_ID` (`store_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_TOTAL_QTY` (`total_qty`),
  KEY `IDX_SALES_FLAT_SHIPMENT_ORDER_ID` (`order_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_CREATED_AT` (`created_at`),
  KEY `IDX_SALES_FLAT_SHIPMENT_UPDATED_AT` (`updated_at`),
  CONSTRAINT `FK_SALES_FLAT_SHIPMENT_ORDER_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_SHIPMENT_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment';


CREATE TABLE `sales_flat_shipment_comment` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent Id',
  `is_customer_notified` int(11) DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_COMMENT_CREATED_AT` (`created_at`),
  KEY `IDX_SALES_FLAT_SHIPMENT_COMMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_C2D69CC1FB03D2B2B794B0439F6650CF` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_shipment` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment Comment';


CREATE TABLE `sales_flat_shipment_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `shipment_status` int(11) DEFAULT NULL COMMENT 'Shipment Status',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment Id',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',
  `shipping_name` varchar(255) DEFAULT NULL COMMENT 'Shipping Name',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `UNQ_SALES_FLAT_SHIPMENT_GRID_INCREMENT_ID` (`increment_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_GRID_STORE_ID` (`store_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_GRID_TOTAL_QTY` (`total_qty`),
  KEY `IDX_SALES_FLAT_SHIPMENT_GRID_ORDER_ID` (`order_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_GRID_SHIPMENT_STATUS` (`shipment_status`),
  KEY `IDX_SALES_FLAT_SHIPMENT_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_GRID_CREATED_AT` (`created_at`),
  KEY `IDX_SALES_FLAT_SHIPMENT_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `IDX_SALES_FLAT_SHIPMENT_GRID_SHIPPING_NAME` (`shipping_name`),
  CONSTRAINT `FK_SALES_FLAT_SHIPMENT_GRID_ENTT_ID_SALES_FLAT_SHIPMENT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `sales_flat_shipment` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_SHIPMENT_GRID_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment Grid';


CREATE TABLE `sales_flat_shipment_item` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent Id',
  `row_total` decimal(12,4) DEFAULT NULL COMMENT 'Row Total',
  `price` decimal(12,4) DEFAULT NULL COMMENT 'Price',
  `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',
  `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',
  `product_id` int(11) DEFAULT NULL COMMENT 'Product Id',
  `order_item_id` int(11) DEFAULT NULL COMMENT 'Order Item Id',
  `additional_data` text COMMENT 'Additional Data',
  `description` text COMMENT 'Description',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_ITEM_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_3AECE5007D18F159231B87E8306FC02A` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_shipment` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment Item';


CREATE TABLE `sales_flat_shipment_track` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent Id',
  `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',
  `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `track_number` text COMMENT 'Number',
  `description` text COMMENT 'Description',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  `carrier_code` varchar(32) DEFAULT NULL COMMENT 'Carrier Code',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_TRACK_PARENT_ID` (`parent_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_TRACK_ORDER_ID` (`order_id`),
  KEY `IDX_SALES_FLAT_SHIPMENT_TRACK_CREATED_AT` (`created_at`),
  CONSTRAINT `FK_BCD2FA28717D29F37E10A153E6F2F841` FOREIGN KEY (`parent_id`) REFERENCES `sales_flat_shipment` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment Track';


CREATE TABLE `sales_invoiced_aggregated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `orders_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Orders Invoiced',
  `invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Invoiced',
  `invoiced_captured` decimal(12,4) DEFAULT NULL COMMENT 'Invoiced Captured',
  `invoiced_not_captured` decimal(12,4) DEFAULT NULL COMMENT 'Invoiced Not Captured',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_INVOICED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `IDX_SALES_INVOICED_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_INVOICED_AGGREGATED_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Invoiced Aggregated';


CREATE TABLE `sales_invoiced_aggregated_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) NOT NULL DEFAULT '' COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `orders_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Orders Invoiced',
  `invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Invoiced',
  `invoiced_captured` decimal(12,4) DEFAULT NULL COMMENT 'Invoiced Captured',
  `invoiced_not_captured` decimal(12,4) DEFAULT NULL COMMENT 'Invoiced Not Captured',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_INVOICED_AGGREGATED_ORDER_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `IDX_SALES_INVOICED_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_INVOICED_AGGREGATED_ORDER_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Invoiced Aggregated Order';


CREATE TABLE `sales_order_aggregated_created` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) NOT NULL DEFAULT '' COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Qty Ordered',
  `total_qty_invoiced` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Qty Invoiced',
  `total_income_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Income Amount',
  `total_revenue_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Revenue Amount',
  `total_profit_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Profit Amount',
  `total_invoiced_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Invoiced Amount',
  `total_canceled_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Canceled Amount',
  `total_paid_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Paid Amount',
  `total_refunded_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Refunded Amount',
  `total_tax_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Tax Amount',
  `total_tax_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Tax Amount Actual',
  `total_shipping_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Shipping Amount',
  `total_shipping_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Shipping Amount Actual',
  `total_discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Discount Amount',
  `total_discount_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Discount Amount Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_ORDER_AGGREGATED_CREATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `IDX_SALES_ORDER_AGGREGATED_CREATED_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_ORDER_AGGREGATED_CREATED_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Aggregated Created';


CREATE TABLE `sales_order_aggregated_updated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Qty Ordered',
  `total_qty_invoiced` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Qty Invoiced',
  `total_income_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Income Amount',
  `total_revenue_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Revenue Amount',
  `total_profit_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Profit Amount',
  `total_invoiced_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Invoiced Amount',
  `total_canceled_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Canceled Amount',
  `total_paid_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Paid Amount',
  `total_refunded_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Refunded Amount',
  `total_tax_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Tax Amount',
  `total_tax_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Tax Amount Actual',
  `total_shipping_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Shipping Amount',
  `total_shipping_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Shipping Amount Actual',
  `total_discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Discount Amount',
  `total_discount_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Discount Amount Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_ORDER_AGGREGATED_UPDATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `IDX_SALES_ORDER_AGGREGATED_UPDATED_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_ORDER_AGGREGATED_UPDATED_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Aggregated Updated';


CREATE TABLE `sales_order_status` (
  `status` varchar(32) NOT NULL COMMENT 'Status',
  `label` varchar(128) NOT NULL COMMENT 'Label',
  PRIMARY KEY (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Status Table';

INSERT INTO `sales_order_status` (`status`, `label`) VALUES
('canceled',	'Canceled'),
('closed',	'Closed'),
('complete',	'Complete'),
('exported',	'Exported'),
('fraud',	'Suspected Fraud'),
('holded',	'On Hold'),
('payment_review',	'Payment Review'),
('paypal_canceled_reversal',	'PayPal Canceled Reversal'),
('paypal_reversed',	'PayPal Reversed'),
('pending',	'Pending'),
('pending_payment',	'Pending Payment'),
('pending_paypal',	'Pending PayPal'),
('processing',	'Processing');

CREATE TABLE `sales_order_status_label` (
  `status` varchar(32) NOT NULL COMMENT 'Status',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store Id',
  `label` varchar(128) NOT NULL COMMENT 'Label',
  PRIMARY KEY (`status`,`store_id`),
  KEY `IDX_SALES_ORDER_STATUS_LABEL_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_ORDER_STATUS_LABEL_STATUS_SALES_ORDER_STATUS_STATUS` FOREIGN KEY (`status`) REFERENCES `sales_order_status` (`status`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_ORDER_STATUS_LABEL_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Status Label Table';

INSERT INTO `sales_order_status_label` (`status`, `store_id`, `label`) VALUES
('exported',	1,	'Exported');

CREATE TABLE `sales_order_status_state` (
  `status` varchar(32) NOT NULL COMMENT 'Status',
  `state` varchar(32) NOT NULL COMMENT 'Label',
  `is_default` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Default',
  PRIMARY KEY (`status`,`state`),
  CONSTRAINT `FK_SALES_ORDER_STATUS_STATE_STATUS_SALES_ORDER_STATUS_STATUS` FOREIGN KEY (`status`) REFERENCES `sales_order_status` (`status`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Status Table';

INSERT INTO `sales_order_status_state` (`status`, `state`, `is_default`) VALUES
('canceled',	'canceled',	1),
('closed',	'closed',	1),
('complete',	'complete',	1),
('fraud',	'payment_review',	0),
('holded',	'holded',	1),
('payment_review',	'payment_review',	1),
('pending',	'new',	1),
('pending_payment',	'pending_payment',	1),
('processing',	'processing',	1);

CREATE TABLE `sales_order_tax` (
  `tax_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Tax Id',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `code` varchar(255) DEFAULT NULL COMMENT 'Code',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  `percent` decimal(12,4) DEFAULT NULL COMMENT 'Percent',
  `amount` decimal(12,4) DEFAULT NULL COMMENT 'Amount',
  `priority` int(11) NOT NULL COMMENT 'Priority',
  `position` int(11) NOT NULL COMMENT 'Position',
  `base_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Amount',
  `process` smallint(6) NOT NULL COMMENT 'Process',
  `base_real_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Real Amount',
  `hidden` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Hidden',
  PRIMARY KEY (`tax_id`),
  KEY `IDX_SALES_ORDER_TAX_ORDER_ID_PRIORITY_POSITION` (`order_id`,`priority`,`position`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Tax Table';


CREATE TABLE `sales_order_tax_item` (
  `tax_item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Tax Item Id',
  `tax_id` int(10) unsigned NOT NULL COMMENT 'Tax Id',
  `item_id` int(10) unsigned NOT NULL COMMENT 'Item Id',
  `tax_percent` decimal(12,4) NOT NULL COMMENT 'Real Tax Percent For Item',
  PRIMARY KEY (`tax_item_id`),
  UNIQUE KEY `UNQ_SALES_ORDER_TAX_ITEM_TAX_ID_ITEM_ID` (`tax_id`,`item_id`),
  KEY `IDX_SALES_ORDER_TAX_ITEM_TAX_ID` (`tax_id`),
  KEY `IDX_SALES_ORDER_TAX_ITEM_ITEM_ID` (`item_id`),
  CONSTRAINT `FK_SALES_ORDER_TAX_ITEM_ITEM_ID_SALES_FLAT_ORDER_ITEM_ITEM_ID` FOREIGN KEY (`item_id`) REFERENCES `sales_flat_order_item` (`item_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_ORDER_TAX_ITEM_TAX_ID_SALES_ORDER_TAX_TAX_ID` FOREIGN KEY (`tax_id`) REFERENCES `sales_order_tax` (`tax_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Tax Item';


CREATE TABLE `sales_payment_transaction` (
  `transaction_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Transaction Id',
  `parent_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Id',
  `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Order Id',
  `payment_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Payment Id',
  `txn_id` varchar(100) DEFAULT NULL COMMENT 'Txn Id',
  `parent_txn_id` varchar(100) DEFAULT NULL COMMENT 'Parent Txn Id',
  `txn_type` varchar(15) DEFAULT NULL COMMENT 'Txn Type',
  `is_closed` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Is Closed',
  `additional_information` blob COMMENT 'Additional Information',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  PRIMARY KEY (`transaction_id`),
  UNIQUE KEY `UNQ_SALES_PAYMENT_TRANSACTION_ORDER_ID_PAYMENT_ID_TXN_ID` (`order_id`,`payment_id`,`txn_id`),
  KEY `IDX_SALES_PAYMENT_TRANSACTION_ORDER_ID` (`order_id`),
  KEY `IDX_SALES_PAYMENT_TRANSACTION_PARENT_ID` (`parent_id`),
  KEY `IDX_SALES_PAYMENT_TRANSACTION_PAYMENT_ID` (`payment_id`),
  CONSTRAINT `FK_B99FF1A06402D725EBDB0F3A7ECD47A2` FOREIGN KEY (`parent_id`) REFERENCES `sales_payment_transaction` (`transaction_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_DA51A10B2405B64A4DAEF77A64F0DAAD` FOREIGN KEY (`payment_id`) REFERENCES `sales_flat_order_payment` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_PAYMENT_TRANSACTION_ORDER_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Payment Transaction';


CREATE TABLE `sales_recurring_profile` (
  `profile_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Profile Id',
  `state` varchar(20) NOT NULL COMMENT 'State',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `method_code` varchar(32) NOT NULL COMMENT 'Method Code',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `reference_id` varchar(32) DEFAULT NULL COMMENT 'Reference Id',
  `subscriber_name` varchar(150) DEFAULT NULL COMMENT 'Subscriber Name',
  `start_datetime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Start Datetime',
  `internal_reference_id` varchar(42) NOT NULL COMMENT 'Internal Reference Id',
  `schedule_description` varchar(255) NOT NULL COMMENT 'Schedule Description',
  `suspension_threshold` smallint(5) unsigned DEFAULT NULL COMMENT 'Suspension Threshold',
  `bill_failed_later` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Bill Failed Later',
  `period_unit` varchar(20) NOT NULL COMMENT 'Period Unit',
  `period_frequency` smallint(5) unsigned DEFAULT NULL COMMENT 'Period Frequency',
  `period_max_cycles` smallint(5) unsigned DEFAULT NULL COMMENT 'Period Max Cycles',
  `billing_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Billing Amount',
  `trial_period_unit` varchar(20) DEFAULT NULL COMMENT 'Trial Period Unit',
  `trial_period_frequency` smallint(5) unsigned DEFAULT NULL COMMENT 'Trial Period Frequency',
  `trial_period_max_cycles` smallint(5) unsigned DEFAULT NULL COMMENT 'Trial Period Max Cycles',
  `trial_billing_amount` text COMMENT 'Trial Billing Amount',
  `currency_code` varchar(3) NOT NULL COMMENT 'Currency Code',
  `shipping_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Tax Amount',
  `init_amount` decimal(12,4) DEFAULT NULL COMMENT 'Init Amount',
  `init_may_fail` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Init May Fail',
  `order_info` text NOT NULL COMMENT 'Order Info',
  `order_item_info` text NOT NULL COMMENT 'Order Item Info',
  `billing_address_info` text NOT NULL COMMENT 'Billing Address Info',
  `shipping_address_info` text COMMENT 'Shipping Address Info',
  `profile_vendor_info` text COMMENT 'Profile Vendor Info',
  `additional_info` text COMMENT 'Additional Info',
  PRIMARY KEY (`profile_id`),
  UNIQUE KEY `UNQ_SALES_RECURRING_PROFILE_INTERNAL_REFERENCE_ID` (`internal_reference_id`),
  KEY `IDX_SALES_RECURRING_PROFILE_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_SALES_RECURRING_PROFILE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_RECURRING_PROFILE_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_RECURRING_PROFILE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Recurring Profile';


CREATE TABLE `sales_recurring_profile_order` (
  `link_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Link Id',
  `profile_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Profile Id',
  `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Order Id',
  PRIMARY KEY (`link_id`),
  UNIQUE KEY `UNQ_SALES_RECURRING_PROFILE_ORDER_PROFILE_ID_ORDER_ID` (`profile_id`,`order_id`),
  KEY `IDX_SALES_RECURRING_PROFILE_ORDER_ORDER_ID` (`order_id`),
  CONSTRAINT `FK_7FF85741C66DCD37A4FBE3E3255A5A01` FOREIGN KEY (`order_id`) REFERENCES `sales_flat_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_B8A7A5397B67455786E55461748C59F4` FOREIGN KEY (`profile_id`) REFERENCES `sales_recurring_profile` (`profile_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Recurring Profile Order';


CREATE TABLE `sales_refunded_aggregated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) NOT NULL DEFAULT '' COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `refunded` decimal(12,4) DEFAULT NULL COMMENT 'Refunded',
  `online_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Online Refunded',
  `offline_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Offline Refunded',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_REFUNDED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `IDX_SALES_REFUNDED_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_REFUNDED_AGGREGATED_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Refunded Aggregated';


CREATE TABLE `sales_refunded_aggregated_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `refunded` decimal(12,4) DEFAULT NULL COMMENT 'Refunded',
  `online_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Online Refunded',
  `offline_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Offline Refunded',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_REFUNDED_AGGREGATED_ORDER_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `IDX_SALES_REFUNDED_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_REFUNDED_AGGREGATED_ORDER_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Refunded Aggregated Order';


CREATE TABLE `sales_shipping_aggregated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_shipping` decimal(12,4) DEFAULT NULL COMMENT 'Total Shipping',
  `total_shipping_actual` decimal(12,4) DEFAULT NULL COMMENT 'Total Shipping Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_SALES_SHPP_AGGRED_PERIOD_STORE_ID_ORDER_STS_SHPP_DESCRIPTION` (`period`,`store_id`,`order_status`,`shipping_description`),
  KEY `IDX_SALES_SHIPPING_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_SHIPPING_AGGREGATED_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Shipping Aggregated';


CREATE TABLE `sales_shipping_aggregated_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_shipping` decimal(12,4) DEFAULT NULL COMMENT 'Total Shipping',
  `total_shipping_actual` decimal(12,4) DEFAULT NULL COMMENT 'Total Shipping Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `C05FAE47282EEA68654D0924E946761F` (`period`,`store_id`,`order_status`,`shipping_description`),
  KEY `IDX_SALES_SHIPPING_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SALES_SHIPPING_AGGREGATED_ORDER_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Shipping Aggregated Order';


CREATE TABLE `scandi_menumanager_menu` (
  `menu_id` smallint(6) NOT NULL AUTO_INCREMENT COMMENT 'Menu ID',
  `title` varchar(255) NOT NULL COMMENT 'Menu Title',
  `identifier` varchar(255) NOT NULL COMMENT 'Menu String Identifier',
  `type` varchar(255) NOT NULL DEFAULT 'none' COMMENT 'Menu Type',
  `css_class` varchar(255) DEFAULT NULL COMMENT 'Menu CSS Class',
  `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Is Menu Active',
  PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='MenuManager Menu Table';

INSERT INTO `scandi_menumanager_menu` (`menu_id`, `title`, `identifier`, `type`, `css_class`, `is_active`) VALUES
(1,	'Main Menu',	'main_menu',	'horizontal',	NULL,	1),
(2,	'Footer Menu',	'footer_menu',	'horizontal',	NULL,	1);

CREATE TABLE `scandi_menumanager_menu_item` (
  `item_id` smallint(6) NOT NULL AUTO_INCREMENT COMMENT 'Item ID',
  `menu_id` smallint(6) NOT NULL COMMENT 'Menu ID',
  `parent_id` smallint(6) NOT NULL COMMENT 'Parent ID',
  `title` varchar(255) NOT NULL COMMENT 'Item Title',
  `identifier` varchar(255) NOT NULL COMMENT 'Item String Identifier',
  `url` varchar(255) DEFAULT NULL COMMENT 'Item Url',
  `type` varchar(255) NOT NULL DEFAULT 'same_window' COMMENT 'Item Open Type',
  `css_class` varchar(255) DEFAULT NULL COMMENT 'Item CSS Class',
  `position` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Item Position',
  `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Is Item Active',
  `url_type` int(11) NOT NULL DEFAULT '1' COMMENT 'Item Url Type',
  `position_path` varchar(100) NOT NULL DEFAULT '0' COMMENT 'Position Path',
  `cms_page_identifier` varchar(255) DEFAULT NULL COMMENT 'Item CMS page identifier',
  PRIMARY KEY (`item_id`),
  KEY `IDX_SCANDI_MENUMANAGER_MENU_ITEM_IDENTIFIER` (`identifier`),
  KEY `FK_CD1B675F58A4D75DABBF47DF93D619AE` (`menu_id`),
  CONSTRAINT `FK_CD1B675F58A4D75DABBF47DF93D619AE` FOREIGN KEY (`menu_id`) REFERENCES `scandi_menumanager_menu` (`menu_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='MenuManager Menu Item Table';

INSERT INTO `scandi_menumanager_menu_item` (`item_id`, `menu_id`, `parent_id`, `title`, `identifier`, `url`, `type`, `css_class`, `position`, `is_active`, `url_type`, `position_path`, `cms_page_identifier`) VALUES
(1,	1,	0,	'Books',	'menu_1_item_2017_08_30_06_59_18',	'books/',	'same_window',	NULL,	0,	1,	1,	'00000',	NULL),
(2,	1,	0,	'About',	'menu_1_item_2017_08_30_07_01_31',	'about/',	'same_window',	NULL,	1,	1,	1,	'00001',	NULL),
(3,	1,	0,	'News',	'menu_1_item_2017_08_30_07_01_44',	'blog/cat/news/',	'same_window',	NULL,	2,	1,	1,	'00002',	NULL),
(4,	1,	0,	'Events',	'menu_1_item_2017_08_30_07_02_02',	'blog/cat/events/',	'same_window',	NULL,	3,	1,	1,	'00003',	NULL),
(5,	1,	0,	'Authors',	'menu_1_item_2017_08_30_07_02_16',	'authors/',	'same_window',	NULL,	4,	1,	1,	'00004',	NULL),
(6,	1,	0,	'Partners',	'menu_1_item_2017_08_30_07_02_33',	'partners/',	'same_window',	NULL,	5,	1,	1,	'00005',	NULL),
(7,	1,	0,	'In the media',	'menu_1_item_2017_08_30_07_02_48',	'in-the-media/',	'same_window',	NULL,	6,	0,	1,	'00006',	NULL),
(8,	1,	0,	'Interviews',	'menu_1_item_2017_08_30_07_03_04',	'interviews/',	'same_window',	NULL,	7,	1,	1,	'00007',	NULL),
(9,	1,	0,	'Contact',	'menu_1_item_2017_08_30_07_03_33',	'contacts/',	'same_window',	NULL,	8,	1,	1,	'00008',	NULL),
(10,	1,	0,	'Blog',	'menu_1_item_2017_08_30_07_03_57',	'https://uncutvoices.wordpress.com/',	'new_window',	NULL,	9,	1,	1,	'00009',	NULL),
(11,	2,	0,	'Terms & Conditions',	'menu_2_item_2017_09_06_14_13_20',	NULL,	'same_window',	NULL,	0,	1,	2,	'00000',	'terms-and-conditions'),
(12,	2,	0,	'Privacy Policy',	'menu_2_item_2017_09_06_14_13_39',	NULL,	'same_window',	NULL,	1,	1,	2,	'00001',	'privacy-policy');

CREATE TABLE `scandi_menumanager_menu_store` (
  `menu_id` smallint(6) NOT NULL COMMENT 'Menu ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`menu_id`,`store_id`),
  KEY `IDX_SCANDI_MENUMANAGER_MENU_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_03334C308C1F4C2DE619963799780C88` FOREIGN KEY (`menu_id`) REFERENCES `scandi_menumanager_menu` (`menu_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SCANDI_MENUMANAGER_MENU_STORE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='MenuManager Menu To Store Linkage Table';

INSERT INTO `scandi_menumanager_menu_store` (`menu_id`, `store_id`) VALUES
(1,	1),
(2,	1);

CREATE TABLE `sendfriend_log` (
  `log_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Log ID',
  `ip` varbinary(16) DEFAULT NULL,
  `time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Log time',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  PRIMARY KEY (`log_id`),
  KEY `IDX_SENDFRIEND_LOG_IP` (`ip`),
  KEY `IDX_SENDFRIEND_LOG_TIME` (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Send to friend function log storage table';


CREATE TABLE `shipping_tablerate` (
  `pk` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `website_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Website Id',
  `dest_country_id` varchar(4) NOT NULL DEFAULT '0' COMMENT 'Destination coutry ISO/2 or ISO/3 code',
  `dest_region_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Destination Region Id',
  `dest_zip` varchar(10) NOT NULL DEFAULT '*' COMMENT 'Destination Post Code (Zip)',
  `condition_name` varchar(20) NOT NULL COMMENT 'Rate Condition name',
  `condition_value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Rate condition value',
  `price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  `cost` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Cost',
  PRIMARY KEY (`pk`),
  UNIQUE KEY `D60821CDB2AFACEE1566CFC02D0D4CAA` (`website_id`,`dest_country_id`,`dest_region_id`,`dest_zip`,`condition_name`,`condition_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Shipping Tablerate';

INSERT INTO `shipping_tablerate` (`pk`, `website_id`, `dest_country_id`, `dest_region_id`, `dest_zip`, `condition_name`, `condition_value`, `price`, `cost`) VALUES
(1,	1,	'0',	0,	'*',	'package_qty',	29.0000,	46.0000,	0.0000),
(2,	1,	'0',	0,	'*',	'package_qty',	28.0000,	44.5000,	0.0000),
(3,	1,	'0',	0,	'*',	'package_qty',	27.0000,	43.0000,	0.0000),
(4,	1,	'0',	0,	'*',	'package_qty',	26.0000,	41.5000,	0.0000),
(5,	1,	'0',	0,	'*',	'package_qty',	25.0000,	40.0000,	0.0000),
(6,	1,	'0',	0,	'*',	'package_qty',	24.0000,	38.5000,	0.0000),
(7,	1,	'0',	0,	'*',	'package_qty',	23.0000,	37.0000,	0.0000),
(8,	1,	'0',	0,	'*',	'package_qty',	22.0000,	35.5000,	0.0000),
(9,	1,	'0',	0,	'*',	'package_qty',	21.0000,	34.0000,	0.0000),
(10,	1,	'0',	0,	'*',	'package_qty',	20.0000,	32.5000,	0.0000),
(11,	1,	'0',	0,	'*',	'package_qty',	19.0000,	31.0000,	0.0000),
(12,	1,	'0',	0,	'*',	'package_qty',	18.0000,	29.5000,	0.0000),
(13,	1,	'0',	0,	'*',	'package_qty',	50.0000,	77.5000,	0.0000),
(14,	1,	'0',	0,	'*',	'package_qty',	17.0000,	28.0000,	0.0000),
(15,	1,	'0',	0,	'*',	'package_qty',	49.0000,	76.0000,	0.0000),
(16,	1,	'0',	0,	'*',	'package_qty',	16.0000,	26.5000,	0.0000),
(17,	1,	'0',	0,	'*',	'package_qty',	48.0000,	74.5000,	0.0000),
(18,	1,	'0',	0,	'*',	'package_qty',	15.0000,	25.0000,	0.0000),
(19,	1,	'0',	0,	'*',	'package_qty',	47.0000,	73.0000,	0.0000),
(20,	1,	'0',	0,	'*',	'package_qty',	14.0000,	23.5000,	0.0000),
(21,	1,	'0',	0,	'*',	'package_qty',	46.0000,	71.5000,	0.0000),
(22,	1,	'0',	0,	'*',	'package_qty',	13.0000,	22.0000,	0.0000),
(23,	1,	'0',	0,	'*',	'package_qty',	45.0000,	70.0000,	0.0000),
(24,	1,	'0',	0,	'*',	'package_qty',	12.0000,	20.5000,	0.0000),
(25,	1,	'0',	0,	'*',	'package_qty',	44.0000,	68.5000,	0.0000),
(26,	1,	'0',	0,	'*',	'package_qty',	11.0000,	19.0000,	0.0000),
(27,	1,	'0',	0,	'*',	'package_qty',	43.0000,	67.0000,	0.0000),
(28,	1,	'0',	0,	'*',	'package_qty',	10.0000,	17.5000,	0.0000),
(29,	1,	'0',	0,	'*',	'package_qty',	42.0000,	65.5000,	0.0000),
(30,	1,	'0',	0,	'*',	'package_qty',	9.0000,	16.0000,	0.0000),
(31,	1,	'0',	0,	'*',	'package_qty',	41.0000,	64.0000,	0.0000),
(32,	1,	'0',	0,	'*',	'package_qty',	8.0000,	14.5000,	0.0000),
(33,	1,	'0',	0,	'*',	'package_qty',	40.0000,	62.5000,	0.0000),
(34,	1,	'0',	0,	'*',	'package_qty',	7.0000,	13.0000,	0.0000),
(35,	1,	'0',	0,	'*',	'package_qty',	39.0000,	61.0000,	0.0000),
(36,	1,	'0',	0,	'*',	'package_qty',	6.0000,	11.5000,	0.0000),
(37,	1,	'0',	0,	'*',	'package_qty',	38.0000,	59.5000,	0.0000),
(38,	1,	'0',	0,	'*',	'package_qty',	5.0000,	10.0000,	0.0000),
(39,	1,	'0',	0,	'*',	'package_qty',	37.0000,	58.0000,	0.0000),
(40,	1,	'0',	0,	'*',	'package_qty',	4.0000,	8.5000,	0.0000),
(41,	1,	'0',	0,	'*',	'package_qty',	36.0000,	56.5000,	0.0000),
(42,	1,	'0',	0,	'*',	'package_qty',	3.0000,	7.0000,	0.0000),
(43,	1,	'0',	0,	'*',	'package_qty',	35.0000,	55.0000,	0.0000),
(44,	1,	'0',	0,	'*',	'package_qty',	2.0000,	5.5000,	0.0000),
(45,	1,	'0',	0,	'*',	'package_qty',	34.0000,	53.5000,	0.0000),
(46,	1,	'0',	0,	'*',	'package_qty',	1.0000,	4.0000,	0.0000),
(47,	1,	'0',	0,	'*',	'package_qty',	33.0000,	52.0000,	0.0000),
(48,	1,	'0',	0,	'*',	'package_qty',	32.0000,	50.5000,	0.0000),
(49,	1,	'0',	0,	'*',	'package_qty',	31.0000,	49.0000,	0.0000),
(50,	1,	'0',	0,	'*',	'package_qty',	30.0000,	47.5000,	0.0000);

CREATE TABLE `sitemap` (
  `sitemap_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Sitemap Id',
  `sitemap_type` varchar(32) DEFAULT NULL COMMENT 'Sitemap Type',
  `sitemap_filename` varchar(32) DEFAULT NULL COMMENT 'Sitemap Filename',
  `sitemap_path` varchar(255) DEFAULT NULL COMMENT 'Sitemap Path',
  `sitemap_time` timestamp NULL DEFAULT NULL COMMENT 'Sitemap Time',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store id',
  PRIMARY KEY (`sitemap_id`),
  KEY `IDX_SITEMAP_STORE_ID` (`store_id`),
  CONSTRAINT `FK_SITEMAP_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Google Sitemap';


CREATE TABLE `tag` (
  `tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Tag Id',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `status` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Status',
  `first_customer_id` int(10) unsigned DEFAULT NULL COMMENT 'First Customer Id',
  `first_store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'First Store Id',
  PRIMARY KEY (`tag_id`),
  KEY `FK_TAG_FIRST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` (`first_customer_id`),
  KEY `FK_TAG_FIRST_STORE_ID_CORE_STORE_STORE_ID` (`first_store_id`),
  CONSTRAINT `FK_TAG_FIRST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`first_customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL ON UPDATE NO ACTION,
  CONSTRAINT `FK_TAG_FIRST_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`first_store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tag';


CREATE TABLE `tag_properties` (
  `tag_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Tag Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `base_popularity` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Base Popularity',
  PRIMARY KEY (`tag_id`,`store_id`),
  KEY `IDX_TAG_PROPERTIES_STORE_ID` (`store_id`),
  CONSTRAINT `FK_TAG_PROPERTIES_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAG_PROPERTIES_TAG_ID_TAG_TAG_ID` FOREIGN KEY (`tag_id`) REFERENCES `tag` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tag Properties';


CREATE TABLE `tag_relation` (
  `tag_relation_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Tag Relation Id',
  `tag_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Tag Id',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Store Id',
  `active` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Active',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  PRIMARY KEY (`tag_relation_id`),
  UNIQUE KEY `UNQ_TAG_RELATION_TAG_ID_CUSTOMER_ID_PRODUCT_ID_STORE_ID` (`tag_id`,`customer_id`,`product_id`,`store_id`),
  KEY `IDX_TAG_RELATION_PRODUCT_ID` (`product_id`),
  KEY `IDX_TAG_RELATION_TAG_ID` (`tag_id`),
  KEY `IDX_TAG_RELATION_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_TAG_RELATION_STORE_ID` (`store_id`),
  CONSTRAINT `FK_TAG_RELATION_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAG_RELATION_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAG_RELATION_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAG_RELATION_TAG_ID_TAG_TAG_ID` FOREIGN KEY (`tag_id`) REFERENCES `tag` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tag Relation';


CREATE TABLE `tag_summary` (
  `tag_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Tag Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `customers` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customers',
  `products` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Products',
  `uses` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Uses',
  `historical_uses` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Historical Uses',
  `popularity` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Popularity',
  `base_popularity` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Base Popularity',
  PRIMARY KEY (`tag_id`,`store_id`),
  KEY `IDX_TAG_SUMMARY_STORE_ID` (`store_id`),
  KEY `IDX_TAG_SUMMARY_TAG_ID` (`tag_id`),
  CONSTRAINT `FK_TAG_SUMMARY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAG_SUMMARY_TAG_ID_TAG_TAG_ID` FOREIGN KEY (`tag_id`) REFERENCES `tag` (`tag_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tag Summary';


CREATE TABLE `tax_calculation` (
  `tax_calculation_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Tax Calculation Id',
  `tax_calculation_rate_id` int(11) NOT NULL COMMENT 'Tax Calculation Rate Id',
  `tax_calculation_rule_id` int(11) NOT NULL COMMENT 'Tax Calculation Rule Id',
  `customer_tax_class_id` smallint(6) NOT NULL COMMENT 'Customer Tax Class Id',
  `product_tax_class_id` smallint(6) NOT NULL COMMENT 'Product Tax Class Id',
  PRIMARY KEY (`tax_calculation_id`),
  KEY `IDX_TAX_CALCULATION_TAX_CALCULATION_RULE_ID` (`tax_calculation_rule_id`),
  KEY `IDX_TAX_CALCULATION_TAX_CALCULATION_RATE_ID` (`tax_calculation_rate_id`),
  KEY `IDX_TAX_CALCULATION_CUSTOMER_TAX_CLASS_ID` (`customer_tax_class_id`),
  KEY `IDX_TAX_CALCULATION_PRODUCT_TAX_CLASS_ID` (`product_tax_class_id`),
  KEY `IDX_TAX_CALC_TAX_CALC_RATE_ID_CSTR_TAX_CLASS_ID_PRD_TAX_CLASS_ID` (`tax_calculation_rate_id`,`customer_tax_class_id`,`product_tax_class_id`),
  CONSTRAINT `FK_TAX_CALCULATION_CUSTOMER_TAX_CLASS_ID_TAX_CLASS_CLASS_ID` FOREIGN KEY (`customer_tax_class_id`) REFERENCES `tax_class` (`class_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAX_CALCULATION_PRODUCT_TAX_CLASS_ID_TAX_CLASS_CLASS_ID` FOREIGN KEY (`product_tax_class_id`) REFERENCES `tax_class` (`class_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAX_CALC_TAX_CALC_RATE_ID_TAX_CALC_RATE_TAX_CALC_RATE_ID` FOREIGN KEY (`tax_calculation_rate_id`) REFERENCES `tax_calculation_rate` (`tax_calculation_rate_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAX_CALC_TAX_CALC_RULE_ID_TAX_CALC_RULE_TAX_CALC_RULE_ID` FOREIGN KEY (`tax_calculation_rule_id`) REFERENCES `tax_calculation_rule` (`tax_calculation_rule_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tax Calculation';


CREATE TABLE `tax_calculation_rate` (
  `tax_calculation_rate_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Tax Calculation Rate Id',
  `tax_country_id` varchar(2) NOT NULL COMMENT 'Tax Country Id',
  `tax_region_id` int(11) NOT NULL COMMENT 'Tax Region Id',
  `tax_postcode` varchar(21) DEFAULT NULL COMMENT 'Tax Postcode',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `rate` decimal(12,4) NOT NULL COMMENT 'Rate',
  `zip_is_range` smallint(6) DEFAULT NULL COMMENT 'Zip Is Range',
  `zip_from` int(10) unsigned DEFAULT NULL COMMENT 'Zip From',
  `zip_to` int(10) unsigned DEFAULT NULL COMMENT 'Zip To',
  PRIMARY KEY (`tax_calculation_rate_id`),
  KEY `IDX_TAX_CALC_RATE_TAX_COUNTRY_ID_TAX_REGION_ID_TAX_POSTCODE` (`tax_country_id`,`tax_region_id`,`tax_postcode`),
  KEY `IDX_TAX_CALCULATION_RATE_CODE` (`code`),
  KEY `CA799F1E2CB843495F601E56C84A626D` (`tax_calculation_rate_id`,`tax_country_id`,`tax_region_id`,`zip_is_range`,`tax_postcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tax Calculation Rate';


CREATE TABLE `tax_calculation_rate_title` (
  `tax_calculation_rate_title_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Tax Calculation Rate Title Id',
  `tax_calculation_rate_id` int(11) NOT NULL COMMENT 'Tax Calculation Rate Id',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store Id',
  `value` varchar(255) NOT NULL COMMENT 'Value',
  PRIMARY KEY (`tax_calculation_rate_title_id`),
  KEY `IDX_TAX_CALCULATION_RATE_TITLE_TAX_CALCULATION_RATE_ID_STORE_ID` (`tax_calculation_rate_id`,`store_id`),
  KEY `IDX_TAX_CALCULATION_RATE_TITLE_TAX_CALCULATION_RATE_ID` (`tax_calculation_rate_id`),
  KEY `IDX_TAX_CALCULATION_RATE_TITLE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_37FB965F786AD5897BB3AE90470C42AB` FOREIGN KEY (`tax_calculation_rate_id`) REFERENCES `tax_calculation_rate` (`tax_calculation_rate_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAX_CALCULATION_RATE_TITLE_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tax Calculation Rate Title';


CREATE TABLE `tax_calculation_rule` (
  `tax_calculation_rule_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Tax Calculation Rule Id',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `priority` int(11) NOT NULL COMMENT 'Priority',
  `position` int(11) NOT NULL COMMENT 'Position',
  `calculate_subtotal` int(11) NOT NULL COMMENT 'Calculate off subtotal option',
  PRIMARY KEY (`tax_calculation_rule_id`),
  KEY `IDX_TAX_CALC_RULE_PRIORITY_POSITION_TAX_CALC_RULE_ID` (`priority`,`position`,`tax_calculation_rule_id`),
  KEY `IDX_TAX_CALCULATION_RULE_CODE` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tax Calculation Rule';


CREATE TABLE `tax_class` (
  `class_id` smallint(6) NOT NULL AUTO_INCREMENT COMMENT 'Class Id',
  `class_name` varchar(255) NOT NULL COMMENT 'Class Name',
  `class_type` varchar(8) NOT NULL DEFAULT 'CUSTOMER' COMMENT 'Class Type',
  PRIMARY KEY (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tax Class';

INSERT INTO `tax_class` (`class_id`, `class_name`, `class_type`) VALUES
(2,	'Taxable Goods',	'PRODUCT'),
(3,	'Retail Customer',	'CUSTOMER'),
(4,	'Shipping',	'PRODUCT');

CREATE TABLE `tax_order_aggregated_created` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `percent` float DEFAULT NULL COMMENT 'Percent',
  `orders_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `tax_base_amount_sum` float DEFAULT NULL COMMENT 'Tax Base Amount Sum',
  PRIMARY KEY (`id`),
  UNIQUE KEY `FCA5E2C02689EB2641B30580D7AACF12` (`period`,`store_id`,`code`,`percent`,`order_status`),
  KEY `IDX_TAX_ORDER_AGGREGATED_CREATED_STORE_ID` (`store_id`),
  CONSTRAINT `FK_TAX_ORDER_AGGREGATED_CREATED_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tax Order Aggregation';


CREATE TABLE `tax_order_aggregated_updated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `percent` float DEFAULT NULL COMMENT 'Percent',
  `orders_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `tax_base_amount_sum` float DEFAULT NULL COMMENT 'Tax Base Amount Sum',
  PRIMARY KEY (`id`),
  UNIQUE KEY `DB0AF14011199AA6CD31D5078B90AA8D` (`period`,`store_id`,`code`,`percent`,`order_status`),
  KEY `IDX_TAX_ORDER_AGGREGATED_UPDATED_STORE_ID` (`store_id`),
  CONSTRAINT `FK_TAX_ORDER_AGGREGATED_UPDATED_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tax Order Aggregated Updated';


CREATE TABLE `weee_discount` (
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Id',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
  `customer_group_id` smallint(5) unsigned NOT NULL COMMENT 'Customer Group Id',
  `value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Value',
  KEY `IDX_WEEE_DISCOUNT_WEBSITE_ID` (`website_id`),
  KEY `IDX_WEEE_DISCOUNT_ENTITY_ID` (`entity_id`),
  KEY `IDX_WEEE_DISCOUNT_CUSTOMER_GROUP_ID` (`customer_group_id`),
  CONSTRAINT `FK_WEEE_DISCOUNT_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID` FOREIGN KEY (`customer_group_id`) REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WEEE_DISCOUNT_ENTITY_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WEEE_DISCOUNT_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Weee Discount';


CREATE TABLE `weee_tax` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value Id',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Id',
  `country` varchar(2) DEFAULT NULL COMMENT 'Country',
  `value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Value',
  `state` varchar(255) NOT NULL DEFAULT '*' COMMENT 'State',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute Id',
  `entity_type_id` smallint(5) unsigned NOT NULL COMMENT 'Entity Type Id',
  PRIMARY KEY (`value_id`),
  KEY `IDX_WEEE_TAX_WEBSITE_ID` (`website_id`),
  KEY `IDX_WEEE_TAX_ENTITY_ID` (`entity_id`),
  KEY `IDX_WEEE_TAX_COUNTRY` (`country`),
  KEY `IDX_WEEE_TAX_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `FK_WEEE_TAX_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WEEE_TAX_COUNTRY_DIRECTORY_COUNTRY_COUNTRY_ID` FOREIGN KEY (`country`) REFERENCES `directory_country` (`country_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WEEE_TAX_ENTITY_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WEEE_TAX_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Weee Tax';


CREATE TABLE `widget` (
  `widget_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Widget Id',
  `widget_code` varchar(255) DEFAULT NULL COMMENT 'Widget code for template directive',
  `widget_type` varchar(255) DEFAULT NULL COMMENT 'Widget Type',
  `parameters` text COMMENT 'Parameters',
  PRIMARY KEY (`widget_id`),
  KEY `IDX_WIDGET_WIDGET_CODE` (`widget_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Preconfigured Widgets';


CREATE TABLE `widget_instance` (
  `instance_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Instance Id',
  `instance_type` varchar(255) DEFAULT NULL COMMENT 'Instance Type',
  `package_theme` varchar(255) DEFAULT NULL COMMENT 'Package Theme',
  `title` varchar(255) DEFAULT NULL COMMENT 'Widget Title',
  `store_ids` varchar(255) NOT NULL DEFAULT '0' COMMENT 'Store ids',
  `widget_parameters` text COMMENT 'Widget parameters',
  `sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort order',
  PRIMARY KEY (`instance_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Instances of Widget for Package Theme';


CREATE TABLE `widget_instance_page` (
  `page_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Page Id',
  `instance_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Instance Id',
  `page_group` varchar(25) DEFAULT NULL COMMENT 'Block Group Type',
  `layout_handle` varchar(255) DEFAULT NULL COMMENT 'Layout Handle',
  `block_reference` varchar(255) DEFAULT NULL COMMENT 'Block Reference',
  `page_for` varchar(25) DEFAULT NULL COMMENT 'For instance entities',
  `entities` text COMMENT 'Catalog entities (comma separated)',
  `page_template` varchar(255) DEFAULT NULL COMMENT 'Path to widget template',
  PRIMARY KEY (`page_id`),
  KEY `IDX_WIDGET_INSTANCE_PAGE_INSTANCE_ID` (`instance_id`),
  CONSTRAINT `FK_WIDGET_INSTANCE_PAGE_INSTANCE_ID_WIDGET_INSTANCE_INSTANCE_ID` FOREIGN KEY (`instance_id`) REFERENCES `widget_instance` (`instance_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Instance of Widget on Page';


CREATE TABLE `widget_instance_page_layout` (
  `page_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Page Id',
  `layout_update_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Layout Update Id',
  UNIQUE KEY `UNQ_WIDGET_INSTANCE_PAGE_LAYOUT_LAYOUT_UPDATE_ID_PAGE_ID` (`layout_update_id`,`page_id`),
  KEY `IDX_WIDGET_INSTANCE_PAGE_LAYOUT_PAGE_ID` (`page_id`),
  KEY `IDX_WIDGET_INSTANCE_PAGE_LAYOUT_LAYOUT_UPDATE_ID` (`layout_update_id`),
  CONSTRAINT `FK_0A5D06DCEC6A6845F50E5FAAC5A1C96D` FOREIGN KEY (`layout_update_id`) REFERENCES `core_layout_update` (`layout_update_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WIDGET_INSTANCE_PAGE_LYT_PAGE_ID_WIDGET_INSTANCE_PAGE_PAGE_ID` FOREIGN KEY (`page_id`) REFERENCES `widget_instance_page` (`page_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Layout updates';


CREATE TABLE `wishlist` (
  `wishlist_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Wishlist ID',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer ID',
  `shared` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Sharing flag (0 or 1)',
  `sharing_code` varchar(32) DEFAULT NULL COMMENT 'Sharing encrypted code',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Last updated date',
  PRIMARY KEY (`wishlist_id`),
  UNIQUE KEY `UNQ_WISHLIST_CUSTOMER_ID` (`customer_id`),
  KEY `IDX_WISHLIST_SHARED` (`shared`),
  CONSTRAINT `FK_WISHLIST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Wishlist main Table';

INSERT INTO `wishlist` (`wishlist_id`, `customer_id`, `shared`, `sharing_code`, `updated_at`) VALUES
(1,	1,	0,	'6e926a02b17ae6f8e1dea5586a4405ee',	'2018-01-19 14:25:03');

CREATE TABLE `wishlist_item` (
  `wishlist_item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Wishlist item ID',
  `wishlist_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Wishlist ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `added_at` timestamp NULL DEFAULT NULL COMMENT 'Add date and time',
  `description` text COMMENT 'Short description of wish list item',
  `qty` decimal(12,4) NOT NULL COMMENT 'Qty',
  PRIMARY KEY (`wishlist_item_id`),
  KEY `IDX_WISHLIST_ITEM_WISHLIST_ID` (`wishlist_id`),
  KEY `IDX_WISHLIST_ITEM_PRODUCT_ID` (`product_id`),
  KEY `IDX_WISHLIST_ITEM_STORE_ID` (`store_id`),
  CONSTRAINT `FK_WISHLIST_ITEM_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WISHLIST_ITEM_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_WISHLIST_ITEM_WISHLIST_ID_WISHLIST_WISHLIST_ID` FOREIGN KEY (`wishlist_id`) REFERENCES `wishlist` (`wishlist_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Wishlist items';


CREATE TABLE `wishlist_item_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Id',
  `wishlist_item_id` int(10) unsigned NOT NULL COMMENT 'Wishlist Item Id',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product Id',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `value` text COMMENT 'Value',
  PRIMARY KEY (`option_id`),
  KEY `FK_A014B30B04B72DD0EAB3EECD779728D6` (`wishlist_item_id`),
  CONSTRAINT `FK_A014B30B04B72DD0EAB3EECD779728D6` FOREIGN KEY (`wishlist_item_id`) REFERENCES `wishlist_item` (`wishlist_item_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Wishlist Item Option Table';


-- 2018-06-28 13:20:23
