-- Table structure for table `layout_link`
--

CREATE TABLE `layout_link` (
  `layout_link_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Link Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `theme_id` int(10) unsigned NOT NULL COMMENT 'Theme id',
  `layout_update_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Layout Update Id',
  `is_temporary` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Defines whether Layout Update is Temporary',
  PRIMARY KEY (`layout_link_id`),
  KEY `LAYOUT_LINK_LAYOUT_UPDATE_ID` (`layout_update_id`),
  KEY `LAYOUT_LINK_STORE_ID_THEME_ID_LAYOUT_UPDATE_ID_IS_TEMPORARY` (`store_id`,`theme_id`,`layout_update_id`,`is_temporary`),
  KEY `LAYOUT_LINK_THEME_ID_THEME_THEME_ID` (`theme_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Layout Link';

--
-- Table structure for table `layout_update`
--

CREATE TABLE `layout_update` (
  `layout_update_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Layout Update Id',
  `handle` varchar(255) DEFAULT NULL COMMENT 'Handle',
  `xml` text COMMENT 'Xml',
  `sort_order` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `updated_at` timestamp NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT 'Last Update Timestamp',
  PRIMARY KEY (`layout_update_id`),
  KEY `LAYOUT_UPDATE_HANDLE` (`handle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Layout Updates';

--
-- Table structure for table `mview_state`
--

CREATE TABLE `mview_state` (
  `state_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'View State Id',
  `view_id` varchar(255) DEFAULT NULL COMMENT 'View Id',
  `mode` varchar(16) DEFAULT 'disabled' COMMENT 'View Mode',
  `status` varchar(16) DEFAULT 'idle' COMMENT 'View Status',
  `updated` datetime DEFAULT NULL COMMENT 'View updated time',
  `version_id` int(10) unsigned DEFAULT NULL COMMENT 'View Version Id',
  PRIMARY KEY (`state_id`),
  KEY `MVIEW_STATE_VIEW_ID` (`view_id`),
  KEY `MVIEW_STATE_MODE` (`mode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='View State';

--
-- Table structure for table `newsletter_problem`
--

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 `NEWSLETTER_PROBLEM_SUBSCRIBER_ID` (`subscriber_id`),
  KEY `NEWSLETTER_PROBLEM_QUEUE_ID` (`queue_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Problems';

--
-- Table structure for table `newsletter_queue`
--

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 `NEWSLETTER_QUEUE_TEMPLATE_ID` (`template_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Queue';

--
-- Table structure for table `newsletter_queue_link`
--

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 `NEWSLETTER_QUEUE_LINK_SUBSCRIBER_ID` (`subscriber_id`),
  KEY `NEWSLETTER_QUEUE_LINK_QUEUE_ID_LETTER_SENT_AT` (`queue_id`,`letter_sent_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Queue Link';

--
-- Table structure for table `newsletter_queue_store_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 `NEWSLETTER_QUEUE_STORE_LINK_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Queue Store Link';

--
-- Table structure for table `newsletter_subscriber`
--

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 `NEWSLETTER_SUBSCRIBER_CUSTOMER_ID` (`customer_id`),
  KEY `NEWSLETTER_SUBSCRIBER_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Subscriber';

--
-- Table structure for table `newsletter_template`
--

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_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 `NEWSLETTER_TEMPLATE_TEMPLATE_ACTUAL` (`template_actual`),
  KEY `NEWSLETTER_TEMPLATE_ADDED_AT` (`added_at`),
  KEY `NEWSLETTER_TEMPLATE_MODIFIED_AT` (`modified_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Newsletter Template';

--
-- Table structure for table `oauth_consumer`
--

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 '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP 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` text COMMENT 'Callback URL',
  `rejected_callback_url` text NOT NULL COMMENT 'Rejected callback URL',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `OAUTH_CONSUMER_KEY` (`key`),
  UNIQUE KEY `OAUTH_CONSUMER_SECRET` (`secret`),
  KEY `OAUTH_CONSUMER_CREATED_AT` (`created_at`),
  KEY `OAUTH_CONSUMER_UPDATED_AT` (`updated_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='OAuth Consumers';

--
-- Table structure for table `oauth_nonce`
--

CREATE TABLE `oauth_nonce` (
  `nonce` varchar(32) NOT NULL COMMENT 'Nonce String',
  `timestamp` int(10) unsigned NOT NULL COMMENT 'Nonce Timestamp',
  `consumer_id` int(10) unsigned NOT NULL COMMENT 'Consumer ID',
  UNIQUE KEY `OAUTH_NONCE_NONCE_CONSUMER_ID` (`nonce`,`consumer_id`),
  KEY `OAUTH_NONCE_CONSUMER_ID_OAUTH_CONSUMER_ENTITY_ID` (`consumer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='OAuth Nonce';

--
-- Table structure for table `oauth_token`
--

CREATE TABLE `oauth_token` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `consumer_id` int(10) unsigned DEFAULT NULL COMMENT 'Oauth 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` text 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',
  `user_type` int(11) DEFAULT NULL COMMENT 'User type',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Token creation timestamp',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `OAUTH_TOKEN_TOKEN` (`token`),
  KEY `OAUTH_TOKEN_CONSUMER_ID` (`consumer_id`),
  KEY `OAUTH_TOKEN_ADMIN_ID_ADMIN_USER_USER_ID` (`admin_id`),
  KEY `OAUTH_TOKEN_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='OAuth Tokens';

--
-- Table structure for table `oauth_token_request_log`
--

CREATE TABLE `oauth_token_request_log` (
  `log_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Log Id',
  `user_name` varchar(255) NOT NULL COMMENT 'Customer email or admin login',
  `user_type` smallint(5) unsigned NOT NULL COMMENT 'User type (admin or customer)',
  `failures_count` smallint(5) unsigned DEFAULT '0' COMMENT 'Number of failed authentication attempts in a row',
  `lock_expires_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Lock expiration time',
  PRIMARY KEY (`log_id`),
  UNIQUE KEY `OAUTH_TOKEN_REQUEST_LOG_USER_NAME_USER_TYPE` (`user_name`,`user_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log of token request authentication failures.';

--
-- Table structure for table `password_reset_request_event`
--

CREATE TABLE `password_reset_request_event` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `request_type` smallint(5) unsigned NOT NULL COMMENT 'Type of the event under a security control',
  `account_reference` varchar(255) DEFAULT NULL COMMENT 'An identifier for existing account or another target',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp when the event occurs',
  `ip` varchar(15) NOT NULL COMMENT 'Remote user IP',
  PRIMARY KEY (`id`),
  KEY `PASSWORD_RESET_REQUEST_EVENT_ACCOUNT_REFERENCE` (`account_reference`),
  KEY `PASSWORD_RESET_REQUEST_EVENT_CREATED_AT` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Password Reset Request Event under a security control';

--
-- Table structure for table `paypal_billing_agreement`
--

CREATE TABLE `paypal_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 CURRENT_TIMESTAMP 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 `PAYPAL_BILLING_AGREEMENT_CUSTOMER_ID` (`customer_id`),
  KEY `PAYPAL_BILLING_AGREEMENT_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Billing Agreement';

--
-- Table structure for table `paypal_billing_agreement_order`
--

CREATE TABLE `paypal_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 `PAYPAL_BILLING_AGREEMENT_ORDER_ORDER_ID` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Billing Agreement Order';

--
-- Table structure for table `paypal_cert`
--

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 `PAYPAL_CERT_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Paypal Certificate Table';

--
-- Table structure for table `paypal_payment_transaction`
--

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 `PAYPAL_PAYMENT_TRANSACTION_TXN_ID` (`txn_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='PayPal Payflow Link Payment Transaction';

--
-- Table structure for table `paypal_settlement_report`
--

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 `PAYPAL_SETTLEMENT_REPORT_REPORT_DATE_ACCOUNT_ID` (`report_date`,`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Paypal Settlement Report Table';

--
-- Table structure for table `paypal_settlement_report_row`
--

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 NULL 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 `PAYPAL_SETTLEMENT_REPORT_ROW_REPORT_ID` (`report_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Paypal Settlement Report Row Table';

--
-- Table structure for table `persistent_session`
--

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 NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`persistent_id`),
  UNIQUE KEY `PERSISTENT_SESSION_KEY` (`key`),
  UNIQUE KEY `PERSISTENT_SESSION_CUSTOMER_ID` (`customer_id`),
  KEY `PERSISTENT_SESSION_UPDATED_AT` (`updated_at`),
  KEY `PERSISTENT_SESSION_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Persistent Session';

--
-- Table structure for table `plazathemes_blog_category`
--

CREATE TABLE `plazathemes_blog_category` (
  `category_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Category ID',
  `title` varchar(255) DEFAULT NULL COMMENT 'Category Title',
  `meta_keywords` text COMMENT 'Category Meta Keywords',
  `meta_description` text COMMENT 'Category Meta Description',
  `identifier` varchar(100) DEFAULT NULL COMMENT 'Category String Identifier',
  `content_heading` varchar(255) DEFAULT NULL COMMENT 'Category Content Heading',
  `content` mediumtext COMMENT 'Category Content',
  `path` varchar(255) DEFAULT NULL COMMENT 'Category Path',
  `position` smallint(6) NOT NULL COMMENT 'Category Position',
  `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Is Category Active',
  PRIMARY KEY (`category_id`),
  KEY `PLAZATHEMES_BLOG_CATEGORY_IDENTIFIER` (`identifier`),
  FULLTEXT KEY `FTI_0E5A42C75595B5A4A5CC4FE14800BBC2` (`title`,`meta_keywords`,`meta_description`,`identifier`,`content`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Plazathemes Blog Category Table';

--
-- Table structure for table `plazathemes_blog_category_store`
--

CREATE TABLE `plazathemes_blog_category_store` (
  `category_id` int(11) NOT NULL COMMENT 'Category ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`category_id`,`store_id`),
  KEY `PLAZATHEMES_BLOG_CATEGORY_STORE_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Plazathemes Blog Category To Store Linkage Table';

--
-- Table structure for table `plazathemes_blog_post`
--

CREATE TABLE `plazathemes_blog_post` (
  `post_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Post ID',
  `title` varchar(255) DEFAULT NULL COMMENT 'Post Title',
  `thumbnailimage` varchar(255) DEFAULT NULL COMMENT 'Thumbnail Image',
  `meta_keywords` text COMMENT 'Post Meta Keywords',
  `meta_description` text COMMENT 'Post Meta Description',
  `identifier` varchar(100) DEFAULT NULL COMMENT 'Post String Identifier',
  `content_heading` varchar(255) DEFAULT NULL COMMENT 'Post Content Heading',
  `short_content` text COMMENT 'Short Content',
  `content` mediumtext COMMENT 'Post Content',
  `creation_time` timestamp NULL DEFAULT NULL COMMENT 'Post Creation Time',
  `update_time` timestamp NULL DEFAULT NULL COMMENT 'Post Modification Time',
  `publish_time` timestamp NULL DEFAULT NULL COMMENT 'Post Publish Time',
  `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Is Post Active',
  PRIMARY KEY (`post_id`),
  KEY `PLAZATHEMES_BLOG_POST_IDENTIFIER` (`identifier`),
  FULLTEXT KEY `FTI_3A962F890DAF9E9D7B6277086623FD2B` (`title`,`meta_keywords`,`meta_description`,`identifier`,`content`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='Plazathemes Blog Post Table';

--
-- Dumping data for table `plazathemes_blog_post`
--

INSERT INTO `plazathemes_blog_post` VALUES ('1','ESTATE JEWELRY ROUND UP','Plazathemes/blog/images/b/l/blog1_home1.jpg','magento 2 blog','Magento 2 blog default post.','aaa','ESTATE JEWELRY ROUND UP','PlazaThemes Club provides web designers Professional Ecommerce Web Templates for the Magento content management system','<p>PlazaThemes Club provides web designers Professional Ecommerce Web Templates for the Magento content management system. These templates are commercially all-exclusive and are found only here on plazathemes.com. Club members can download all the available templates plus 2 new templates each month for one low price. Are you ready to download 30+ templates</p>','2016-08-29 11:08:08','2016-11-29 16:10:09','2016-08-29 00:00:00',1),('2','THE RIVIERA INSPIRES CARTIER\'S','Plazathemes/blog/images/b/l/blog2_home1.jpg',NULL,NULL,'dsad','THE RIVIERA INSPIRES CARTIER\'S','We\'re releasing 2 premium Magento templates each month. Every template is designed with different styles and targeted for each business trend','<p><span>We\'re releasing 2 premium Magento templates each month. Every template is designed with different styles and targeted for each business trend. All of our themes are the results of our hard working, passionate and talented designers. The perfect compilation of quality and art in our themes brings the most valuable magento skins to your online shop. We also bring free Magento themes to the community to express our thanks to all Magento users and our customers.</span></p>','2016-09-08 16:05:15','2016-11-29 16:11:18','2016-09-08 00:00:00',1),('3','ARPELS COMES TO NEW YORK','Plazathemes/blog/images/b/l/blog3_home1.jpg',NULL,NULL,'dfdsf','ARPELS COMES TO NEW YORK','PlazaThemes Club provides web designers Professional Ecommerce Web Templates for the Magento content management system','<p><span>Top quality, cutting edge Magento themes with superior customer support. 2 new templates every month, so that you can easily satisfy clients needs and keep your website looking fresh.Are you ready to make your professional website, unique and amazing? Join our Club NOW! Free Magento templates, free Magento extensions!</span></p>','2016-09-08 16:06:27','2016-11-29 16:19:02','2016-09-08 00:00:00',1),('4','ESTATE JEWELRY ROUND UP','Plazathemes/blog/images/b/l/blog1_home1_1.jpg',NULL,NULL,'ewrewr','ESTATE JEWELRY ROUND UP','PlazaThemes Club provides web designers Professional Ecommerce Web Templates for the Magento content management system','<p>PlazaThemes Club provides web designers Professional Ecommerce Web Templates for the Magento content management system.</p>','2016-09-08 16:07:39','2016-11-29 16:18:25','2016-09-08 00:00:00',1);

--
-- Table structure for table `plazathemes_blog_post_category`
--

CREATE TABLE `plazathemes_blog_post_category` (
  `post_id` int(11) NOT NULL COMMENT 'Post ID',
  `category_id` int(11) NOT NULL COMMENT 'Category ID',
  PRIMARY KEY (`post_id`,`category_id`),
  KEY `PLAZATHEMES_BLOG_POST_CATEGORY_CATEGORY_ID` (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Plazathemes Blog Post To Category Linkage Table';

--
-- Table structure for table `plazathemes_blog_post_relatedpost`
--

CREATE TABLE `plazathemes_blog_post_relatedpost` (
  `post_id` int(11) NOT NULL COMMENT 'Post ID',
  `related_id` int(11) NOT NULL COMMENT 'Related Post ID',
  PRIMARY KEY (`post_id`,`related_id`),
  KEY `PLAZATHEMES_BLOG_POST_RELATEDPRODUCT_RELATED_ID` (`related_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Plazathemes Blog Post To Post Linkage Table';

--
-- Table structure for table `plazathemes_blog_post_relatedproduct`
--

CREATE TABLE `plazathemes_blog_post_relatedproduct` (
  `post_id` int(11) NOT NULL COMMENT 'Post ID',
  `related_id` int(10) unsigned NOT NULL COMMENT 'Related Product ID',
  PRIMARY KEY (`post_id`,`related_id`),
  KEY `PLAZATHEMES_BLOG_POST_RELATEDPRODUCT_RELATED_ID` (`related_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Plazathemes Blog Post To Product Linkage Table';

--
-- Table structure for table `plazathemes_blog_post_store`
--

CREATE TABLE `plazathemes_blog_post_store` (
  `post_id` int(11) NOT NULL COMMENT 'Post ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`post_id`,`store_id`),
  KEY `PLAZATHEMES_BLOG_POST_STORE_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Plazathemes Blog Post To Store Linkage Table';

--
-- Dumping data for table `plazathemes_blog_post_store`
--

INSERT INTO `plazathemes_blog_post_store` VALUES ('1',1),('2',1),('3',1),('4',1);

--
-- Table structure for table `product_alert_price`
--

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 CURRENT_TIMESTAMP 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 `PRODUCT_ALERT_PRICE_CUSTOMER_ID` (`customer_id`),
  KEY `PRODUCT_ALERT_PRICE_PRODUCT_ID` (`product_id`),
  KEY `PRODUCT_ALERT_PRICE_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Product Alert Price';

--
-- Table structure for table `product_alert_stock`
--

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 CURRENT_TIMESTAMP 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 `PRODUCT_ALERT_STOCK_CUSTOMER_ID` (`customer_id`),
  KEY `PRODUCT_ALERT_STOCK_PRODUCT_ID` (`product_id`),
  KEY `PRODUCT_ALERT_STOCK_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Product Alert Stock';

--
-- Table structure for table `pt_bannerslider`
--

CREATE TABLE `pt_bannerslider` (
  `banner_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Banner ID',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Banner name',
  `store_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'Store Id',
  `status` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Banner status',
  `click_url` varchar(255) DEFAULT '' COMMENT 'Banner click url',
  `image` varchar(255) DEFAULT NULL COMMENT 'Banner image',
  `image_alt` varchar(255) DEFAULT NULL COMMENT 'Banner image alt',
  `title1` varchar(255) DEFAULT NULL COMMENT 'Title 1',
  `title2` varchar(255) DEFAULT NULL COMMENT 'Title 2',
  `description` varchar(255) DEFAULT NULL COMMENT 'Description',
  `order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Order',
  PRIMARY KEY (`banner_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='pt_bannerslider';

--
-- Dumping data for table `pt_bannerslider`
--

INSERT INTO `pt_bannerslider` VALUES ('1','custom design jewelry','1',1,'#','Plazathemes/bannerslider/images/b/a/banner1_home1.jpg',NULL,'From concepr to work of art',NULL,NULL,0),('2','Women\'s jewelry','1',1,'#','Plazathemes/bannerslider/images/b/a/banner2_home1.jpg',NULL,'Wide range of Fashion Jewelery <span> and Accessories</span>',NULL,NULL,0),('3','Run stronger','2',1,'#','Plazathemes/bannerslider/images/b/a/banner1_home2.jpg',NULL,'better &amp; healthier',NULL,'World\'s First Fully Cushioned, Foot - Shaped\r\n<span>Shoe without an Elevated Hell</span>',0),('4','Happy feet run','2',1,'#','Plazathemes/bannerslider/images/b/a/banner2_home2.jpg',NULL,'better &amp; Healthier',NULL,'Female Spectific Shoes Built Just For You',0),('5','Wicker outdoor furniture','3',1,'#','Plazathemes/bannerslider/images/b/a/banner1_home3.jpg',NULL,NULL,NULL,'Quality Outdoor Entertaining Furniture',0),('6','Furniture Living room','3',1,'#','Plazathemes/bannerslider/images/b/a/banner2_home3.jpg',NULL,'Save up to 30% Off',NULL,NULL,0),('7','Electric meat grinder','4',1,'#','Plazathemes/bannerslider/images/b/a/banner1_home4.jpg',NULL,'Easy meat grinding at home',NULL,NULL,0),('8','Kitchen appliances','4',1,'#','Plazathemes/bannerslider/images/b/a/banner2_home4.jpg',NULL,'Pressure cooker &amp; non stick cookware',NULL,NULL,0);

--
-- Table structure for table `pt_brandslider`
--

CREATE TABLE `pt_brandslider` (
  `brand_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Brand ID',
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT 'Title',
  `store_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'Store Id',
  `status` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Brand status',
  `link` varchar(255) DEFAULT '' COMMENT 'Link',
  `image` varchar(255) DEFAULT NULL COMMENT 'Brand image',
  `description` varchar(255) DEFAULT NULL COMMENT 'Description',
  `order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Order',
  PRIMARY KEY (`brand_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='pt_brandslider';

--
-- Dumping data for table `pt_brandslider`
--

INSERT INTO `pt_brandslider` VALUES ('1','','0',1,'#','Plazathemes/brandslider/images/1/_/1.png',NULL,0),('2','','0',1,'#','Plazathemes/brandslider/images/2/_/2.png',NULL,0),('3','','0',1,'#','Plazathemes/brandslider/images/3/_/3.png',NULL,0),('4','','0',1,'#','Plazathemes/brandslider/images/4/_/4.png',NULL,0),('5','','0',1,'#','Plazathemes/brandslider/images/5/_/5.png',NULL,0),('6','','0',1,'#','Plazathemes/brandslider/images/6/_/6.png',NULL,0),('7','','0',1,'#','Plazathemes/brandslider/images/1/_/1_1.png',NULL,0);

--
-- Table structure for table `pt_testimonial`
--

CREATE TABLE `pt_testimonial` (
  `testimo_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Testimonial ID',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name',
  `store_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'Store Id',
  `email` varchar(255) DEFAULT NULL COMMENT 'Email',
  `avatar` varchar(255) DEFAULT NULL COMMENT 'Avatar',
  `website` varchar(255) DEFAULT NULL COMMENT 'Website',
  `company` varchar(255) DEFAULT NULL COMMENT 'Company',
  `address` varchar(255) DEFAULT NULL COMMENT 'Address',
  `job` varchar(255) DEFAULT NULL COMMENT 'Job',
  `testimonial` varchar(255) DEFAULT NULL COMMENT 'Testimonial',
  `created_time` date DEFAULT NULL COMMENT 'Created Time',
  `update_time` date DEFAULT NULL COMMENT 'Update Time',
  `status` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Status',
  `order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Order',
  PRIMARY KEY (`testimo_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='pt_testimonial';

--
-- Dumping data for table `pt_testimonial`
--

INSERT INTO `pt_testimonial` VALUES ('1','utheya','3,1,4','admin@gmail.com','Plazathemes/testimonial/images/t/e/testiomol1.png',NULL,NULL,NULL,'Webdesigner','Code, template and others are very good. The support \r\nhas served me immediately and solved my problems\r\n when I need help. Are to be congratulated. ','2016-09-10','2016-12-10',1,0),('2','victor','3,1,4','admin@gmail.com','Plazathemes/testimonial/images/t/e/testiomol2.png',NULL,NULL,NULL,'Webdesigner','Code, template and others are very good. The support \r\nhas served me immediately and solved my problems\r\n when I need help. Are to be congratulated. ','2016-09-10','2016-12-10',1,0),('3','Aussiemines','3,1,4','admin@gmail.com','Plazathemes/testimonial/images/t/e/testiomol3.png',NULL,NULL,NULL,'Webdesigner','Code, template and others are very good. The support \r\nhas served me immediately and solved my problems\r\n when I need help. Are to be congratulated. ','2016-09-14','2016-12-10',1,0);

--
-- Table structure for table `quote`
--

CREATE TABLE `quote` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `converted_at` timestamp NULL DEFAULT NULL COMMENT 'Converted At',
  `is_active` smallint(5) unsigned DEFAULT '1' COMMENT 'Is Active',
  `is_virtual` smallint(5) unsigned DEFAULT '0' COMMENT 'Is Virtual',
  `is_multi_shipping` smallint(5) unsigned DEFAULT '0' COMMENT 'Is Multi Shipping',
  `items_count` int(10) unsigned DEFAULT '0' COMMENT 'Items Count',
  `items_qty` decimal(12,4) DEFAULT '0.0000' COMMENT 'Items Qty',
  `orig_order_id` int(10) unsigned DEFAULT '0' COMMENT 'Orig Order Id',
  `store_to_base_rate` decimal(12,4) DEFAULT '0.0000' COMMENT 'Store To Base Rate',
  `store_to_quote_rate` decimal(12,4) DEFAULT '0.0000' COMMENT 'Store To Quote Rate',
  `base_currency_code` varchar(255) DEFAULT NULL COMMENT 'Base Currency Code',
  `store_currency_code` varchar(255) DEFAULT NULL COMMENT 'Store Currency Code',
  `quote_currency_code` varchar(255) DEFAULT NULL COMMENT 'Quote Currency Code',
  `grand_total` decimal(12,4) DEFAULT '0.0000' COMMENT 'Grand Total',
  `base_grand_total` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Grand Total',
  `checkout_method` varchar(255) DEFAULT NULL COMMENT 'Checkout Method',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `customer_tax_class_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Tax Class Id',
  `customer_group_id` int(10) unsigned DEFAULT '0' COMMENT 'Customer Group Id',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_prefix` varchar(40) DEFAULT NULL COMMENT 'Customer Prefix',
  `customer_firstname` varchar(255) DEFAULT NULL COMMENT 'Customer Firstname',
  `customer_middlename` varchar(40) DEFAULT NULL COMMENT 'Customer Middlename',
  `customer_lastname` varchar(255) DEFAULT NULL COMMENT 'Customer Lastname',
  `customer_suffix` varchar(40) DEFAULT NULL COMMENT 'Customer Suffix',
  `customer_dob` datetime DEFAULT NULL COMMENT 'Customer Dob',
  `customer_note` varchar(255) DEFAULT NULL COMMENT 'Customer Note',
  `customer_note_notify` smallint(5) unsigned DEFAULT '1' COMMENT 'Customer Note Notify',
  `customer_is_guest` smallint(5) unsigned DEFAULT '0' COMMENT 'Customer Is Guest',
  `remote_ip` varchar(32) DEFAULT NULL COMMENT 'Remote Ip',
  `applied_rule_ids` varchar(255) DEFAULT NULL COMMENT 'Applied Rule Ids',
  `reserved_order_id` varchar(64) DEFAULT NULL COMMENT 'Reserved Order Id',
  `password_hash` varchar(255) DEFAULT NULL COMMENT 'Password Hash',
  `coupon_code` varchar(255) DEFAULT NULL COMMENT 'Coupon Code',
  `global_currency_code` varchar(255) DEFAULT NULL COMMENT 'Global Currency Code',
  `base_to_global_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `base_to_quote_rate` decimal(12,4) DEFAULT NULL COMMENT 'Base To Quote Rate',
  `customer_taxvat` varchar(255) DEFAULT NULL COMMENT 'Customer Taxvat',
  `customer_gender` varchar(255) DEFAULT NULL COMMENT 'Customer Gender',
  `subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal',
  `base_subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `subtotal_with_discount` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal With Discount',
  `base_subtotal_with_discount` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal With Discount',
  `is_changed` int(10) unsigned DEFAULT NULL COMMENT 'Is Changed',
  `trigger_recollect` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Trigger Recollect',
  `ext_shipping_info` text COMMENT 'Ext Shipping Info',
  `is_persistent` smallint(5) unsigned DEFAULT '0' COMMENT 'Is Quote Persistent',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message Id',
  PRIMARY KEY (`entity_id`),
  KEY `QUOTE_CUSTOMER_ID_STORE_ID_IS_ACTIVE` (`customer_id`,`store_id`,`is_active`),
  KEY `QUOTE_STORE_ID` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote';

--
-- Dumping data for table `quote`
--

INSERT INTO `quote` VALUES ('1',1,'2016-07-21 09:32:58','2016-08-29 16:19:50',NULL,1,0,0,'0','0.0000','0','0.0000','0.0000','USD','USD','USD','60.0000','60.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'60.0000','60.0000','60.0000','60.0000','1',0,NULL,0,NULL),('2',1,'2016-08-29 15:42:32','2016-08-29 16:19:49',NULL,1,0,0,'0','0.0000','0','0.0000','0.0000','USD','USD','USD','178.0000','178.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'178.0000','178.0000','178.0000','178.0000','1',0,NULL,0,NULL),('3',1,'2016-08-30 08:11:48','2016-08-30 08:19:59',NULL,1,0,0,'2','2.0000','0','0.0000','0.0000','USD','USD','USD','78.0000','78.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'78.0000','78.0000','78.0000','78.0000','1',0,NULL,0,NULL),('4',1,'2016-08-30 14:33:27','0000-00-00 00:00:00',NULL,1,0,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','30.0000','30.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'30.0000','30.0000','30.0000','30.0000','1',0,NULL,0,NULL),('5',1,'2016-09-01 09:59:30','0000-00-00 00:00:00',NULL,1,0,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','45.0000','45.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'45.0000','45.0000','45.0000','45.0000','1',0,NULL,0,NULL),('6',1,'2016-09-06 08:14:25','0000-00-00 00:00:00',NULL,1,0,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','8.0000','8.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'8.0000','8.0000','8.0000','8.0000','1',0,NULL,0,NULL),('7',1,'2016-09-06 10:20:59','0000-00-00 00:00:00',NULL,1,0,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','34.0000','34.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'34.0000','34.0000','34.0000','34.0000','1',0,NULL,0,NULL),('8',1,'2016-09-06 10:48:51','2016-09-06 10:50:38',NULL,1,0,0,'2','2.0000','0','0.0000','0.0000','USD','USD','USD','66.0000','66.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'66.0000','66.0000','66.0000','66.0000','1',0,NULL,0,NULL),('9',1,'2016-09-06 16:30:22','2016-09-06 16:31:00',NULL,1,0,0,'3','4.0000','0','0.0000','0.0000','USD','USD','USD','99.0000','99.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'99.0000','99.0000','99.0000','99.0000','1',0,NULL,0,NULL),('10',1,'2016-09-07 08:17:39','0000-00-00 00:00:00',NULL,1,0,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','45.0000','45.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'45.0000','45.0000','45.0000','45.0000','1',0,NULL,0,NULL),('11',1,'2016-09-07 10:08:55','2016-09-07 10:10:31',NULL,0,0,0,'4','4.0000','0','0.0000','0.0000','USD','USD','USD','125.0000','125.0000','guest',NULL,'3','0','demo@plazathemes.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,'127.0.0.1',NULL,'000000001',NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'110.0000','110.0000','110.0000','110.0000','1',0,NULL,0,NULL),('12',1,'2016-09-14 14:50:51','0000-00-00 00:00:00',NULL,1,0,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','45.0000','45.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'45.0000','45.0000','45.0000','45.0000','1',0,NULL,0,NULL),('13',1,'2016-09-15 09:23:45','2016-09-15 09:33:53',NULL,1,0,0,'3','3.0000','0','0.0000','0.0000','USD','USD','USD','117.0000','117.0000',NULL,'1','3','1','demo1@plazathemes.com',NULL,'admin',NULL,'admin',NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'117.0000','117.0000','117.0000','117.0000','1',0,NULL,0,NULL),('14',2,'2016-09-19 13:22:08','0000-00-00 00:00:00',NULL,1,0,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','45.0000','45.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'45.0000','45.0000','45.0000','45.0000','1',0,NULL,0,NULL),('15',1,'2016-12-15 14:36:39','0000-00-00 00:00:00',NULL,1,1,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','52.0000','52.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'127.0.0.1',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'52.0000','52.0000','52.0000','52.0000','1',0,NULL,0,NULL),('16',3,'2016-12-21 09:08:30','2016-12-21 09:48:01',NULL,1,0,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','55.0000','55.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'192.168.1.2',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'55.0000','55.0000','55.0000','55.0000','1',0,NULL,0,NULL),('17',1,'2016-12-21 09:09:37','2016-12-21 09:57:48',NULL,1,0,0,'5','6.0000','0','0.0000','0.0000','USD','USD','USD','202.0000','202.0000',NULL,NULL,'3','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'192.168.1.92',NULL,NULL,NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'202.0000','202.0000','202.0000','202.0000','1',0,NULL,0,NULL),('18',4,'2016-12-22 09:07:59','2016-12-22 09:11:18',NULL,0,0,0,'1','1.0000','0','0.0000','0.0000','USD','USD','USD','72.0000','72.0000','guest',NULL,'3','0','demo@plazathemes.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,'192.168.1.92',NULL,'4000000001',NULL,NULL,'USD','1.0000','1.0000',NULL,NULL,'67.0000','67.0000','67.0000','67.0000','1',0,NULL,0,NULL);

--
-- Table structure for table `quote_address`
--

CREATE TABLE `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 CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP 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(10) DEFAULT NULL COMMENT 'Address Type',
  `email` varchar(255) DEFAULT NULL COMMENT 'Email',
  `prefix` varchar(40) DEFAULT NULL COMMENT 'Prefix',
  `firstname` varchar(20) DEFAULT NULL COMMENT 'Firstname',
  `middlename` varchar(20) DEFAULT NULL COMMENT 'Middlename',
  `lastname` varchar(20) 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(40) DEFAULT NULL COMMENT 'City',
  `region` varchar(40) DEFAULT NULL COMMENT 'Region',
  `region_id` int(10) unsigned DEFAULT NULL COMMENT 'Region Id',
  `postcode` varchar(20) DEFAULT NULL COMMENT 'Postcode',
  `country_id` varchar(30) DEFAULT NULL COMMENT 'Country Id',
  `telephone` varchar(20) DEFAULT NULL COMMENT 'Phone Number',
  `fax` varchar(20) DEFAULT NULL COMMENT 'Fax',
  `same_as_billing` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Same As Billing',
  `collect_shipping_rates` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Collect Shipping Rates',
  `shipping_method` varchar(40) 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',
  `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation 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',
  `free_shipping` smallint(6) DEFAULT NULL,
  `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 `QUOTE_ADDRESS_QUOTE_ID` (`quote_id`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Address';

--
-- Dumping data for table `quote_address`
--

INSERT INTO `quote_address` VALUES ('1','1','2016-07-21 09:32:58','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('2','1','2016-07-21 09:32:58','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'0.0000','60.0000','60.0000','60.0000','60.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','60.0000','60.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','60.0000','60.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('3','2','2016-08-29 15:42:32','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('4','2','2016-08-29 15:42:32','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,'0.0000','178.0000','178.0000','178.0000','178.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','178.0000','178.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','178.0000','178.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('5','3','2016-08-30 08:11:48','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('6','3','2016-08-30 08:11:48','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,'0.0000','78.0000','78.0000','78.0000','78.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','78.0000','78.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','78.0000','78.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('7','4','2016-08-30 14:33:27','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('8','4','2016-08-30 14:33:27','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'0.0000','30.0000','30.0000','30.0000','30.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','30.0000','30.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','30.0000','30.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('9','5','2016-09-01 09:59:30','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('10','5','2016-09-01 09:59:30','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'0.0000','45.0000','45.0000','45.0000','45.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('11','6','2016-09-06 08:14:25','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('12','6','2016-09-06 08:14:25','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'0.0000','8.0000','8.0000','8.0000','8.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','8.0000','8.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','8.0000','8.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('13','7','2016-09-06 10:20:59','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('14','7','2016-09-06 10:20:59','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'0.0000','34.0000','34.0000','34.0000','34.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','34.0000','34.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','34.0000','34.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('15','8','2016-09-06 10:48:51','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('16','8','2016-09-06 10:48:51','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,'0.0000','66.0000','66.0000','66.0000','66.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','66.0000','66.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','66.0000','66.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('17','9','2016-09-06 16:30:22','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('18','9','2016-09-06 16:30:22','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,'0.0000','99.0000','99.0000','99.0000','99.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','99.0000','99.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','99.0000','99.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('19','10','2016-09-07 08:17:39','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('20','10','2016-09-07 08:17:39','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'0.0000','45.0000','45.0000','45.0000','45.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('22','11','2016-09-07 10:08:55','2016-09-07 10:10:22',NULL,0,NULL,'shipping','demo@plazathemes.com',NULL,'DO',NULL,'VAN TOAN',NULL,NULL,'DOI LANH-DONG SON-YEN THE-BAC GIANG\nBAC GIANG','BAC GIANG',NULL,NULL,'220000','VN','979656070',NULL,0,0,'flatrate_flatrate','Flat Rate - Fixed','0.0000','110.0000','110.0000','110.0000','110.0000','0.0000','0.0000','15.0000','15.0000','0.0000','0.0000','0.0000','0.0000','125.0000','125.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','110.0000','110.0000','0.0000','0.0000','0.0000',NULL,'15.0000','15.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('23','11','2016-09-07 10:10:23','0000-00-00 00:00:00',NULL,0,NULL,'billing','demo@plazathemes.com',NULL,'DO',NULL,'VAN TOAN',NULL,NULL,'DOI LANH-DONG SON-YEN THE-BAC GIANG\nBAC GIANG','BAC GIANG',NULL,NULL,'220000','VN','979656070',NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('24','12','2016-09-14 14:50:51','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('25','12','2016-09-14 14:50:51','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'0.0000','45.0000','45.0000','45.0000','45.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('26','13','2016-09-15 09:23:45','0000-00-00 00:00:00','1',0,NULL,'billing','demo1@plazathemes.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('27','13','2016-09-15 09:23:45','0000-00-00 00:00:00','1',0,NULL,'shipping','demo1@plazathemes.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,'0.0000','117.0000','117.0000','117.0000','117.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','117.0000','117.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','117.0000','117.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('28','14','2016-09-19 13:22:08','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('29','14','2016-09-19 13:22:08','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'0.0000','45.0000','45.0000','45.0000','45.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('30','15','2016-12-15 14:36:39','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','52.0000','52.0000','52.0000','52.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','52.0000','52.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','52.0000','52.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('31','15','2016-12-15 14:36:39','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('32','16','2016-12-21 09:08:30','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('33','16','2016-12-21 09:08:30','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,'34.0000','55.0000','55.0000','55.0000','55.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','55.0000','55.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','55.0000','55.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('34','17','2016-12-21 09:09:37','0000-00-00 00:00:00',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('35','17','2016-12-21 09:09:37','0000-00-00 00:00:00',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,'0.0000','202.0000','202.0000','202.0000','202.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','202.0000','202.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','202.0000','202.0000','0.0000','0.0000','0.0000',NULL,'0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('37','18','2016-12-22 09:07:59','2016-12-22 09:11:07',NULL,0,NULL,'shipping','demo@plazathemes.com',NULL,'plaza',NULL,'themes',NULL,'plazathemes','demo@plazathemes.com\ndemo@plazathemes.com','themes','Arkansas','5','plaza','US','123456789',NULL,0,0,'flatrate_flatrate','Flat Rate - Fixed','47.0000','67.0000','67.0000','67.0000','67.0000','0.0000','0.0000','5.0000','5.0000','0.0000','0.0000','0.0000','0.0000','72.0000','72.0000',NULL,'a:0:{}',NULL,'0.0000','0.0000','67.0000','67.0000','0.0000','0.0000','0.0000',NULL,'5.0000','5.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('38','18','2016-12-22 09:11:07','0000-00-00 00:00:00',NULL,0,NULL,'billing','demo@plazathemes.com',NULL,'plaza',NULL,'themes',NULL,'plazathemes','demo@plazathemes.com\ndemo@plazathemes.com','themes','Arkansas','5','plaza','US','123456789',NULL,0,0,NULL,NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','0.0000',NULL,NULL,'0.0000','0.0000','0.0000','0.0000',NULL,'N;',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `quote_address_item`
--

CREATE TABLE `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 CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP 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',
  `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',
  `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `free_shipping` int(11) DEFAULT NULL,
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message Id',
  PRIMARY KEY (`address_item_id`),
  KEY `QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS_ID` (`quote_address_id`),
  KEY `QUOTE_ADDRESS_ITEM_PARENT_ITEM_ID` (`parent_item_id`),
  KEY `QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID` (`quote_item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Address Item';

--
-- Table structure for table `quote_id_mask`
--

CREATE TABLE `quote_id_mask` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `quote_id` int(10) unsigned NOT NULL COMMENT 'Quote ID',
  `masked_id` varchar(32) DEFAULT NULL COMMENT 'Masked ID',
  PRIMARY KEY (`entity_id`,`quote_id`),
  KEY `QUOTE_ID_MASK_QUOTE_ID` (`quote_id`),
  KEY `QUOTE_ID_MASK_MASKED_ID` (`masked_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='Quote ID and masked ID mapping';

--
-- Dumping data for table `quote_id_mask`
--

INSERT INTO `quote_id_mask` VALUES ('1','1','0bfa816ebc9a85af8638c854eb936466'),('5','5','1b7517f739d707e2c5059386de7caa28'),('14','16','1dc95bd80c4071e0d017d27169b60aa0'),('2','2','30e408348c4e28fa04080d90090faa66'),('10','12','4622380a0b813245aaa2190d44a563fc'),('9','11','5d9f83745e6d4cd4548932dccc8c1a35'),('4','4','66f68ed72fa37936f5b7f1347af239bf'),('7','9','91dd9e7897008cba7b0078670a5cb532'),('15','17','977acb9218ccdf40d4277267725a07f7'),('13','15','9efc1cb14d4a472f580602ffd3de82c8'),('16','18','a66dcfde165a76ebb91f08f1a892efe6'),('8','10','a89ab12ec355e69762eef41aaf20c76d'),('11','13','ccd5a990a8911e8fde42eb74ea52e764'),('6','8','f25d7bdfd8a8fb71aded56a0a483e972'),('3','3','f4075e9c95455c91d1423ae7b9b40319'),('12','14','f9bc7a6e718aebd862e072ebb87e9c4f');

--
-- Table structure for table `quote_item`
--

CREATE TABLE `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 CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP 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',
  `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',
  `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `free_shipping` smallint(6) DEFAULT NULL,
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message Id',
  `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',
  `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_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',
  `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 `QUOTE_ITEM_PARENT_ITEM_ID` (`parent_item_id`),
  KEY `QUOTE_ITEM_PRODUCT_ID` (`product_id`),
  KEY `QUOTE_ITEM_QUOTE_ID` (`quote_id`),
  KEY `QUOTE_ITEM_STORE_ID` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Item';

--
-- Dumping data for table `quote_item`
--

INSERT INTO `quote_item` VALUES ('1','3','2016-08-30 08:11:48','0000-00-00 00:00:00','24',1,NULL,0,'24-UB02','Impulse Duffle',NULL,NULL,NULL,0,0,NULL,'1.0000','70.0000','70.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','70.0000','70.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'70.0000','70.0000','70.0000','70.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('2','3','2016-08-30 08:19:59','0000-00-00 00:00:00','36',1,NULL,0,'25-UG07','Dual Handle Cardio Ball',NULL,NULL,NULL,0,0,NULL,'1.0000','8.0000','8.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','8.0000','8.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'8.0000','8.0000','8.0000','8.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('3','4','2016-08-30 14:33:27','0000-00-00 00:00:00','25',1,NULL,0,'24-WB01','Voyage Yoga Bag',NULL,NULL,NULL,0,0,NULL,'1.0000','30.0000','30.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','30.0000','30.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'30.0000','30.0000','30.0000','30.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('4','5','2016-09-01 09:59:30','0000-00-00 00:00:00','21',1,NULL,0,'24-MB06','Rival Field Messenger',NULL,NULL,NULL,0,0,NULL,'1.0000','45.0000','45.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'45.0000','45.0000','45.0000','45.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('5','6','2016-09-06 08:14:25','0000-00-00 00:00:00','36',1,NULL,0,'25-UG07','Dual Handle Cardio Ball',NULL,NULL,NULL,0,0,NULL,'1.0000','8.0000','8.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','8.0000','8.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'8.0000','8.0000','8.0000','8.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('6','7','2016-09-06 10:20:59','0000-00-00 00:00:00','10',1,NULL,0,'24-WG080-24-MB01','Sprite Yoga Companion Kit',NULL,NULL,NULL,0,0,'0.0000','1.0000','34.0000','34.0000',NULL,'0.0000','0.0000','0.0000',NULL,'0.0000','0.0000','34.0000','34.0000','0.0000','0.0000','bundle',NULL,NULL,NULL,NULL,NULL,'34.0000','34.0000','34.0000','34.0000',NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('7','7','2016-09-06 10:20:59','0000-00-00 00:00:00','1',1,'6',0,'24-MB01','Joust Duffle Bag',NULL,NULL,NULL,0,0,NULL,'1.0000','34.0000','34.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','34.0000','34.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'34.0000','34.0000','34.0000','34.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('10','8','2016-09-06 10:50:32','0000-00-00 00:00:00','29',1,NULL,0,'24-WB03','Driven Backpack',NULL,NULL,NULL,0,0,NULL,'1.0000','36.0000','36.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','36.0000','36.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'36.0000','36.0000','36.0000','36.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('11','8','2016-09-06 10:50:38','0000-00-00 00:00:00','28',1,NULL,0,'24-WB06','Endeavor Daytrip Backpack',NULL,NULL,NULL,0,0,NULL,'1.0000','30.0000','30.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','30.0000','30.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'30.0000','30.0000','30.0000','30.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('12','9','2016-09-06 16:30:22','2016-09-06 16:31:00','37',1,NULL,0,'25-UG04','Zing Jump Rope',NULL,NULL,NULL,0,0,NULL,'2.0000','12.0000','12.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','24.0000','24.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'12.0000','12.0000','24.0000','24.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('13','9','2016-09-06 16:30:33','0000-00-00 00:00:00','25',1,NULL,0,'24-WB01','Voyage Yoga Bag',NULL,NULL,NULL,0,0,NULL,'1.0000','30.0000','30.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','30.0000','30.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'30.0000','30.0000','30.0000','30.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('14','9','2016-09-06 16:30:47','0000-00-00 00:00:00','21',1,NULL,0,'24-MB06','Rival Field Messenger',NULL,NULL,NULL,0,0,NULL,'1.0000','45.0000','45.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'45.0000','45.0000','45.0000','45.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('15','10','2016-09-07 08:17:39','0000-00-00 00:00:00','21',1,NULL,0,'24-MB06','Rival Field Messenger',NULL,NULL,NULL,0,0,NULL,'1.0000','45.0000','45.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'45.0000','45.0000','45.0000','45.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('16','11','2016-09-07 10:08:56','0000-00-00 00:00:00','19',1,NULL,0,'24-MB03','Crown Summit Backpack',NULL,NULL,NULL,0,0,NULL,'1.0000','38.0000','38.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','38.0000','38.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,'40.0000','38.0000','38.0000','38.0000','38.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('17','11','2016-09-07 10:09:05','0000-00-00 00:00:00','7',1,NULL,1,'MH01-Black','MH01-Black',NULL,NULL,NULL,0,0,NULL,'1.0000','52.0000','52.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','52.0000','52.0000','0.0000','0.0000','virtual',NULL,NULL,NULL,NULL,NULL,'52.0000','52.0000','52.0000','52.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('18','11','2016-09-07 10:09:15','0000-00-00 00:00:00','37',1,NULL,0,'25-UG04','Zing Jump Rope',NULL,NULL,NULL,0,0,NULL,'1.0000','12.0000','12.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','12.0000','12.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'12.0000','12.0000','12.0000','12.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('19','11','2016-09-07 10:09:28','0000-00-00 00:00:00','36',1,NULL,0,'25-UG07','Dual Handle Cardio Ball',NULL,NULL,NULL,0,0,NULL,'1.0000','8.0000','8.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','8.0000','8.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'8.0000','8.0000','8.0000','8.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('20','12','2016-09-14 14:50:51','0000-00-00 00:00:00','21',1,NULL,0,'24-MB06','Rival Field Messenger',NULL,NULL,NULL,0,0,NULL,'1.0000','45.0000','45.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'45.0000','45.0000','45.0000','45.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('21','13','2016-09-15 09:23:45','0000-00-00 00:00:00','21',1,NULL,0,'24-MB06','Rival Field Messenger',NULL,NULL,NULL,0,0,NULL,'1.0000','45.0000','45.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'45.0000','45.0000','45.0000','45.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('22','13','2016-09-15 09:24:02','0000-00-00 00:00:00','18',1,NULL,0,'24-MB04','Strive Shoulder Pack',NULL,NULL,NULL,0,0,NULL,'1.0000','32.0000','32.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','32.0000','32.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,'34.0000','32.0000','32.0000','32.0000','32.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('23','13','2016-09-15 09:24:18','0000-00-00 00:00:00','20',1,NULL,0,'24-MB05','Wayfarer Messenger Bag',NULL,NULL,NULL,0,0,NULL,'1.0000','40.0000','40.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','40.0000','40.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,'45.0000','40.0000','40.0000','40.0000','40.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('24','14','2016-09-19 13:22:08','0000-00-00 00:00:00','21',2,NULL,0,'24-MB06','Rival Field Messenger',NULL,NULL,NULL,0,0,NULL,'1.0000','45.0000','45.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','45.0000','45.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'45.0000','45.0000','45.0000','45.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('25','15','2016-12-15 14:36:40','0000-00-00 00:00:00','7',1,NULL,1,'MH01-Black','MH01-Black',NULL,NULL,NULL,0,0,NULL,'1.0000','52.0000','52.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','52.0000','52.0000','0.0000','0.0000','virtual',NULL,NULL,NULL,NULL,NULL,'52.0000','52.0000','52.0000','52.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('27','17','2016-12-21 09:09:37','2016-12-21 09:57:48','25',2,NULL,0,'24-WB01','Voyage Yoga Bag',NULL,NULL,NULL,0,0,NULL,'2.0000','30.0000','30.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','60.0000','60.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'30.0000','30.0000','60.0000','60.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('28','17','2016-12-21 09:42:20','2016-12-21 09:57:48','1',2,NULL,0,'24-MB01','Joust Duffle Bag',NULL,NULL,NULL,0,0,NULL,'1.0000','34.0000','34.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','34.0000','34.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'34.0000','34.0000','34.0000','34.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('29','17','2016-12-21 09:47:33','2016-12-21 09:57:48','28',2,NULL,0,'24-WB06','Endeavor Daytrip Backpack',NULL,NULL,NULL,0,0,NULL,'1.0000','30.0000','30.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','30.0000','30.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'30.0000','30.0000','30.0000','30.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('30','16','2016-12-21 09:48:01','0000-00-00 00:00:00','55',3,NULL,0,' Summer Frame ',' Summer Frame ',NULL,NULL,NULL,0,0,'34.0000','1.0000','55.0000','55.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','55.0000','55.0000','0.0000','34.0000','simple',NULL,NULL,NULL,NULL,NULL,'55.0000','55.0000','55.0000','55.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('31','17','2016-12-21 09:52:10','0000-00-00 00:00:00','35',2,NULL,0,'25-UG06','Affirm Water Bottle ',NULL,NULL,NULL,0,0,NULL,'1.0000','8.0000','8.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','8.0000','8.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'8.0000','8.0000','8.0000','8.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('32','17','2016-12-21 09:57:48','0000-00-00 00:00:00','24',1,NULL,0,'24-UB02','Impulse Duffle',NULL,NULL,NULL,0,0,NULL,'1.0000','70.0000','70.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','70.0000','70.0000','0.0000','0.0000','simple',NULL,NULL,NULL,NULL,NULL,'70.0000','70.0000','70.0000','70.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('33','18','2016-12-22 09:08:00','0000-00-00 00:00:00','65',4,NULL,0,'5pc Knife Block Set','5pc Knife Block Set',NULL,NULL,NULL,0,0,'47.0000','1.0000','67.0000','67.0000',NULL,'0.0000','0.0000','0.0000','0.0000','0.0000','0.0000','67.0000','67.0000','0.0000','47.0000','simple',NULL,NULL,NULL,NULL,NULL,'67.0000','67.0000','67.0000','67.0000','0.0000','0.0000',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `quote_item_option`
--

CREATE TABLE `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 `QUOTE_ITEM_OPTION_ITEM_ID` (`item_id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Item Option';

--
-- Dumping data for table `quote_item_option`
--

INSERT INTO `quote_item_option` VALUES ('1','1','24','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"24\";s:3:\"qty\";d:1;}'),('2','2','36','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"36\";s:3:\"qty\";d:1;}'),('3','3','25','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"25\";s:3:\"qty\";d:1;}'),('4','4','21','info_buyRequest','a:3:{s:4:\"uenc\";s:56:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL2NvbXB1dGVyLmh0bWw,\";s:7:\"product\";s:2:\"21\";s:3:\"qty\";d:1;}'),('5','5','36','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"36\";s:3:\"qty\";d:1;}'),('6','6','10','info_buyRequest','a:7:{s:4:\"uenc\";s:80:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL3Nwcml0ZS15b2dhLWNvbXBhbmlvbi1raXQuaHRtbA,,\";s:7:\"product\";s:2:\"10\";s:28:\"selected_configurable_option\";s:0:\"\";s:15:\"related_product\";s:0:\"\";s:13:\"bundle_option\";a:1:{i:9;s:2:\"21\";}s:17:\"bundle_option_qty\";a:1:{i:9;s:1:\"1\";}s:3:\"qty\";s:1:\"1\";}'),('7','6','1','selection_qty_21','1'),('8','6','1','product_qty_1','1'),('9','6','10','bundle_identity','10_21_1'),('10','6','10','bundle_option_ids','a:1:{i:0;i:9;}'),('11','6','10','bundle_selection_ids','a:1:{i:0;s:2:\"21\";}'),('12','7','1','selection_id','21'),('13','7','1','info_buyRequest','a:7:{s:4:\"uenc\";s:80:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL3Nwcml0ZS15b2dhLWNvbXBhbmlvbi1raXQuaHRtbA,,\";s:7:\"product\";s:2:\"10\";s:28:\"selected_configurable_option\";s:0:\"\";s:15:\"related_product\";s:0:\"\";s:13:\"bundle_option\";a:1:{i:9;s:2:\"21\";}s:17:\"bundle_option_qty\";a:1:{i:9;s:1:\"1\";}s:3:\"qty\";s:1:\"1\";}'),('14','7','1','bundle_option_ids','a:1:{i:0;i:9;}'),('15','7','1','bundle_selection_attributes','a:4:{s:5:\"price\";d:34;s:3:\"qty\";d:1;s:12:\"option_label\";s:18:\"Sprite Stasis Ball\";s:9:\"option_id\";s:1:\"9\";}'),('16','7','1','bundle_identity','10_21_1'),('19','10','29','info_buyRequest','a:3:{s:4:\"uenc\";s:56:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL2NvbXB1dGVyLmh0bWw,\";s:7:\"product\";s:2:\"29\";s:3:\"qty\";d:1;}'),('20','11','28','info_buyRequest','a:3:{s:4:\"uenc\";s:56:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL2NvbXB1dGVyLmh0bWw,\";s:7:\"product\";s:2:\"28\";s:3:\"qty\";d:1;}'),('21','12','37','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"37\";s:3:\"qty\";d:1;}'),('22','13','25','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"25\";s:3:\"qty\";d:1;}'),('23','14','21','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"21\";s:3:\"qty\";d:1;}'),('24','15','21','info_buyRequest','a:5:{s:4:\"uenc\";s:72:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL3JpdmFsLWZpZWxkLW1lc3Nlbmdlci5odG1s\";s:7:\"product\";s:2:\"21\";s:28:\"selected_configurable_option\";s:0:\"\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),('25','16','19','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"19\";s:3:\"qty\";d:1;}'),('26','17','7','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:1:\"7\";s:3:\"qty\";d:1;}'),('27','18','37','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"37\";s:3:\"qty\";d:1;}'),('28','19','36','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"36\";s:3:\"qty\";d:1;}'),('29','20','21','info_buyRequest','a:5:{s:4:\"uenc\";s:72:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL3JpdmFsLWZpZWxkLW1lc3Nlbmdlci5odG1s\";s:7:\"product\";s:2:\"21\";s:28:\"selected_configurable_option\";s:0:\"\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),('30','21','21','info_buyRequest','a:5:{s:4:\"uenc\";s:72:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL3JpdmFsLWZpZWxkLW1lc3Nlbmdlci5odG1s\";s:7:\"product\";s:2:\"21\";s:28:\"selected_configurable_option\";s:0:\"\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),('31','22','18','info_buyRequest','a:3:{s:4:\"uenc\";s:72:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL3JpdmFsLWZpZWxkLW1lc3Nlbmdlci5odG1s\";s:7:\"product\";s:2:\"18\";s:3:\"qty\";d:1;}'),('32','23','20','info_buyRequest','a:3:{s:4:\"uenc\";s:72:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuL3JpdmFsLWZpZWxkLW1lc3Nlbmdlci5odG1s\";s:7:\"product\";s:2:\"20\";s:3:\"qty\";d:1;}'),('33','24','21','info_buyRequest','a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"21\";s:3:\"qty\";d:1;}'),('34','25','7','info_buyRequest','a:3:{s:4:\"uenc\";s:52:\"aHR0cDovLzEyNy4wLjAuMS9tYV90aGViZWxsL2VuZ2xpc2gxLw,,\";s:7:\"product\";s:1:\"7\";s:3:\"qty\";d:1;}'),('36','27','25','info_buyRequest','a:3:{s:4:\"uenc\";s:44:\"aHR0cDovLzE5Mi4xNjguMS45Mi9tYV90aGViZWxsLw,,\";s:7:\"product\";s:2:\"25\";s:3:\"qty\";d:1;}'),('37','28','1','info_buyRequest','a:5:{s:4:\"uenc\";s:84:\"aHR0cDovLzE5Mi4xNjguMS45Mi9tYV90aGViZWxsL2VuZ2xpc2gxL2pvdXN0LWR1ZmZsZS1iYWcuaHRtbA,,\";s:7:\"product\";s:1:\"1\";s:28:\"selected_configurable_option\";s:0:\"\";s:15:\"related_product\";s:0:\"\";s:3:\"qty\";s:1:\"1\";}'),('38','29','28','info_buyRequest','a:3:{s:4:\"uenc\";s:44:\"aHR0cDovLzE5Mi4xNjguMS45Mi9tYV90aGViZWxsLw,,\";s:7:\"product\";s:2:\"28\";s:3:\"qty\";d:1;}'),('39','30','55','info_buyRequest','a:3:{s:4:\"uenc\";s:56:\"aHR0cDovLzE5Mi4xNjguMS45Mi9tYV90aGViZWxsL2VuZ2xpc2gzLw,,\";s:7:\"product\";s:2:\"55\";s:3:\"qty\";d:1;}'),('40','31','35','info_buyRequest','a:3:{s:4:\"uenc\";s:56:\"aHR0cDovLzE5Mi4xNjguMS45Mi9tYV90aGViZWxsL2VuZ2xpc2gyLw,,\";s:7:\"product\";s:2:\"35\";s:3:\"qty\";d:1;}'),('41','32','24','info_buyRequest','a:3:{s:4:\"uenc\";s:56:\"aHR0cDovLzE5Mi4xNjguMS45Mi9tYV90aGViZWxsL2VuZ2xpc2gxLw,,\";s:7:\"product\";s:2:\"24\";s:3:\"qty\";d:1;}'),('42','33','65','info_buyRequest','a:3:{s:4:\"uenc\";s:56:\"aHR0cDovLzE5Mi4xNjguMS45Mi9tYV90aGViZWxsL2VuZ2xpc2g0Lw,,\";s:7:\"product\";s:2:\"65\";s:3:\"qty\";d:1;}');

--
-- Table structure for table `quote_payment`
--

CREATE TABLE `quote_payment` (
  `payment_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Payment Id',
  `quote_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote Id',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `method` varchar(255) DEFAULT NULL COMMENT 'Method',
  `cc_type` varchar(255) DEFAULT NULL COMMENT 'Cc Type',
  `cc_number_enc` varchar(255) DEFAULT NULL COMMENT 'Cc Number Enc',
  `cc_last_4` varchar(255) DEFAULT NULL COMMENT 'Cc Last 4',
  `cc_cid_enc` varchar(255) DEFAULT NULL COMMENT 'Cc Cid Enc',
  `cc_owner` varchar(255) DEFAULT NULL COMMENT 'Cc Owner',
  `cc_exp_month` varchar(255) DEFAULT NULL COMMENT 'Cc Exp Month',
  `cc_exp_year` smallint(5) unsigned DEFAULT '0' COMMENT 'Cc Exp Year',
  `cc_ss_owner` varchar(255) DEFAULT NULL COMMENT 'Cc Ss Owner',
  `cc_ss_start_month` smallint(5) unsigned DEFAULT '0' COMMENT 'Cc Ss Start Month',
  `cc_ss_start_year` smallint(5) unsigned DEFAULT '0' COMMENT 'Cc Ss Start Year',
  `po_number` varchar(255) DEFAULT NULL COMMENT 'Po Number',
  `additional_data` text COMMENT 'Additional Data',
  `cc_ss_issue` varchar(255) DEFAULT NULL COMMENT 'Cc Ss Issue',
  `additional_information` text COMMENT 'Additional Information',
  `paypal_payer_id` varchar(255) DEFAULT NULL COMMENT 'Paypal Payer Id',
  `paypal_payer_status` varchar(255) DEFAULT NULL COMMENT 'Paypal Payer Status',
  `paypal_correlation_id` varchar(255) DEFAULT NULL COMMENT 'Paypal Correlation Id',
  PRIMARY KEY (`payment_id`),
  KEY `QUOTE_PAYMENT_QUOTE_ID` (`quote_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Payment';

--
-- Dumping data for table `quote_payment`
--

INSERT INTO `quote_payment` VALUES ('1','11','2016-09-07 10:10:23','0000-00-00 00:00:00','checkmo',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,'N;',NULL,NULL,NULL),('2','18','2016-12-22 09:11:07','0000-00-00 00:00:00','checkmo',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,'N;',NULL,NULL,NULL);

--
-- Table structure for table `quote_shipping_rate`
--

CREATE TABLE `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 CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP 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 `QUOTE_SHIPPING_RATE_ADDRESS_ID` (`address_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Quote Shipping Rate';

--
-- Dumping data for table `quote_shipping_rate`
--

INSERT INTO `quote_shipping_rate` VALUES ('3','22','2016-09-07 10:10:23','0000-00-00 00:00:00','flatrate','Flat Rate','flatrate_flatrate','flatrate',NULL,'15.0000',NULL,'Fixed'),('6','37','2016-12-22 09:11:07','0000-00-00 00:00:00','flatrate','Flat Rate','flatrate_flatrate','flatrate',NULL,'5.0000',NULL,'Fixed');

--
-- Table structure for table `rating`
--

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 Storefront',
  `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Rating is active.',
  PRIMARY KEY (`rating_id`),
  UNIQUE KEY `RATING_RATING_CODE` (`rating_code`),
  KEY `RATING_ENTITY_ID` (`entity_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Ratings';

--
-- Dumping data for table `rating`
--

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

--
-- Table structure for table `rating_entity`
--

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 `RATING_ENTITY_ENTITY_CODE` (`entity_code`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Rating entities';

--
-- Dumping data for table `rating_entity`
--

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

--
-- Table structure for table `rating_option`
--

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 Storefront',
  PRIMARY KEY (`option_id`),
  KEY `RATING_OPTION_RATING_ID` (`rating_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='Rating options';

--
-- Dumping data for table `rating_option`
--

INSERT INTO `rating_option` 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);

--
-- Table structure for table `rating_option_vote`
--

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(16) NOT NULL COMMENT 'Customer IP',
  `remote_ip_long` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Customer IP converted to long integer format',
  `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 `RATING_OPTION_VOTE_OPTION_ID` (`option_id`),
  KEY `RATING_OPTION_VOTE_REVIEW_ID_REVIEW_REVIEW_ID` (`review_id`)
) ENGINE=InnoDB AUTO_INCREMENT=142 DEFAULT CHARSET=utf8 COMMENT='Rating option values';

--
-- Dumping data for table `rating_option_vote`
--

INSERT INTO `rating_option_vote` VALUES (16,'3','127.0.0.1',2130706433,NULL,50,1,6,60,3),(17,'13','127.0.0.1',2130706433,NULL,50,3,6,60,3),(18,'10','127.0.0.1',2130706433,NULL,50,2,6,100,5),(52,'2','127.0.0.1',2130706433,NULL,24,1,18,40,2),(53,'13','127.0.0.1',2130706433,NULL,24,3,18,60,3),(54,'8','127.0.0.1',2130706433,NULL,24,2,18,60,3),(55,'4','127.0.0.1',2130706433,NULL,23,1,19,80,4),(56,'13','127.0.0.1',2130706433,NULL,23,3,19,60,3),(57,'8','127.0.0.1',2130706433,NULL,23,2,19,60,3),(58,'5','127.0.0.1',2130706433,NULL,21,1,20,100,5),(59,'15','127.0.0.1',2130706433,NULL,21,3,20,100,5),(60,'7','127.0.0.1',2130706433,NULL,21,2,20,40,2),(61,'3','127.0.0.1',2130706433,NULL,20,1,21,60,3),(62,'13','127.0.0.1',2130706433,NULL,20,3,21,60,3),(63,'10','127.0.0.1',2130706433,NULL,20,2,21,100,5),(64,'1','127.0.0.1',2130706433,NULL,19,1,22,20,1),(65,'12','127.0.0.1',2130706433,NULL,19,3,22,40,2),(66,'9','127.0.0.1',2130706433,NULL,19,2,22,80,4),(67,'3','127.0.0.1',2130706433,NULL,18,1,23,60,3),(68,'13','127.0.0.1',2130706433,NULL,18,3,23,60,3),(69,'9','127.0.0.1',2130706433,NULL,18,2,23,80,4),(70,'4','127.0.0.1',2130706433,NULL,17,1,24,80,4),(71,'12','127.0.0.1',2130706433,NULL,17,3,24,40,2),(72,'8','127.0.0.1',2130706433,NULL,17,2,24,60,3),(73,'4','127.0.0.1',2130706433,NULL,10,1,25,80,4),(74,'14','127.0.0.1',2130706433,NULL,10,3,25,80,4),(75,'9','127.0.0.1',2130706433,NULL,10,2,25,80,4),(76,'3','127.0.0.1',2130706433,NULL,9,1,26,60,3),(77,'13','127.0.0.1',2130706433,NULL,9,3,26,60,3),(78,'9','127.0.0.1',2130706433,NULL,9,2,26,80,4),(79,'4','127.0.0.1',2130706433,NULL,2,1,27,80,4),(80,'14','127.0.0.1',2130706433,NULL,2,3,27,80,4),(81,'7','127.0.0.1',2130706433,NULL,2,2,27,40,2),(82,'2','127.0.0.1',2130706433,NULL,25,1,28,40,2),(83,'12','127.0.0.1',2130706433,NULL,25,3,28,40,2),(84,'8','127.0.0.1',2130706433,NULL,25,2,28,60,3),(85,'2','127.0.0.1',2130706433,NULL,26,1,29,40,2),(86,'14','127.0.0.1',2130706433,NULL,26,3,29,80,4),(87,'7','127.0.0.1',2130706433,NULL,26,2,29,40,2),(91,'3','127.0.0.1',2130706433,NULL,37,1,31,60,3),(92,'14','127.0.0.1',2130706433,NULL,37,3,31,80,4),(93,'8','127.0.0.1',2130706433,NULL,37,2,31,60,3),(94,'4','127.0.0.1',2130706433,NULL,36,1,32,80,4),(95,'13','127.0.0.1',2130706433,NULL,36,3,32,60,3),(96,'7','127.0.0.1',2130706433,NULL,36,2,32,40,2),(97,'4','127.0.0.1',2130706433,NULL,35,1,33,80,4),(98,'12','127.0.0.1',2130706433,NULL,35,3,33,40,2),(99,'6','127.0.0.1',2130706433,NULL,35,2,33,20,1),(100,'2','127.0.0.1',2130706433,NULL,34,1,34,40,2),(101,'13','127.0.0.1',2130706433,NULL,34,3,34,60,3),(102,'8','127.0.0.1',2130706433,NULL,34,2,34,60,3),(103,'7','127.0.0.1',2130706433,NULL,33,2,35,40,2),(104,'4','127.0.0.1',2130706433,NULL,33,1,35,80,4),(105,'14','127.0.0.1',2130706433,NULL,33,3,35,80,4),(106,'6','127.0.0.1',2130706433,NULL,32,2,36,20,1),(107,'3','127.0.0.1',2130706433,NULL,32,1,36,60,3),(108,'14','127.0.0.1',2130706433,NULL,32,3,36,80,4),(109,'8','127.0.0.1',2130706433,NULL,29,2,37,60,3),(110,'3','127.0.0.1',2130706433,NULL,29,1,37,60,3),(111,'13','127.0.0.1',2130706433,NULL,29,3,37,60,3),(112,'2','127.0.0.1',2130706433,NULL,28,1,38,40,2),(113,'14','127.0.0.1',2130706433,NULL,28,3,38,80,4),(114,'9','127.0.0.1',2130706433,NULL,28,2,38,80,4),(115,'3','127.0.0.1',2130706433,NULL,27,1,39,60,3),(116,'14','127.0.0.1',2130706433,NULL,27,3,39,80,4),(117,'8','127.0.0.1',2130706433,NULL,27,2,39,60,3),(118,'3','127.0.0.1',2130706433,NULL,1,1,40,60,3),(119,'14','127.0.0.1',2130706433,NULL,1,3,40,80,4),(120,'8','127.0.0.1',2130706433,NULL,1,2,40,60,3),(121,'14','127.0.0.1',2130706433,NULL,22,3,41,80,4),(122,'8','127.0.0.1',2130706433,NULL,22,2,41,60,3),(123,'3','127.0.0.1',2130706433,NULL,22,1,41,60,3),(124,'4','127.0.0.1',2130706433,NULL,30,1,42,80,4),(125,'14','127.0.0.1',2130706433,NULL,30,3,42,80,4),(126,'8','127.0.0.1',2130706433,NULL,30,2,42,60,3),(127,'4','127.0.0.1',2130706433,NULL,30,1,43,80,4),(128,'14','127.0.0.1',2130706433,NULL,30,3,43,80,4),(129,'10','127.0.0.1',2130706433,NULL,30,2,43,100,5),(130,'4','127.0.0.1',2130706433,NULL,31,1,44,80,4),(131,'14','127.0.0.1',2130706433,NULL,31,3,44,80,4),(132,'9','127.0.0.1',2130706433,NULL,31,2,44,80,4),(133,'4','127.0.0.1',2130706433,NULL,48,1,45,80,4),(134,'14','127.0.0.1',2130706433,NULL,48,3,45,80,4),(135,'10','127.0.0.1',2130706433,NULL,48,2,45,100,5),(136,'4','127.0.0.1',2130706433,NULL,49,1,46,80,4),(137,'14','127.0.0.1',2130706433,NULL,49,3,46,80,4),(138,'9','127.0.0.1',2130706433,NULL,49,2,46,80,4),(139,'15','127.0.0.1',2130706433,NULL,7,3,47,100,5),(140,'10','127.0.0.1',2130706433,NULL,7,2,47,100,5),(141,'5','127.0.0.1',2130706433,NULL,7,1,47,100,5);

--
-- Table structure for table `rating_option_vote_aggregated`
--

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 `RATING_OPTION_VOTE_AGGREGATED_RATING_ID` (`rating_id`),
  KEY `RATING_OPTION_VOTE_AGGREGATED_STORE_ID` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1818 DEFAULT CHARSET=utf8 COMMENT='Rating vote aggregated';

--
-- Dumping data for table `rating_option_vote_aggregated`
--

INSERT INTO `rating_option_vote_aggregated` VALUES ('31',1,50,'1','3',60,60,0),('32',1,50,'1','3',60,60,1),('33',3,50,'1','3',60,60,0),('34',3,50,'1','3',60,60,1),('35',2,50,'1','5',100,100,0),('36',2,50,'1','5',100,100,1),('103',1,24,'1','2',40,40,0),('104',1,24,'1','2',40,40,1),('105',3,24,'1','3',60,60,0),('106',3,24,'1','3',60,60,1),('107',2,24,'1','3',60,60,0),('108',2,24,'1','3',60,60,1),('109',1,23,'1','4',80,80,0),('110',1,23,'1','4',80,80,1),('111',3,23,'1','3',60,60,0),('112',3,23,'1','3',60,60,1),('113',2,23,'1','3',60,60,0),('114',2,23,'1','3',60,60,1),('115',1,21,'1','5',100,100,0),('116',1,21,'1','5',100,100,1),('117',3,21,'1','5',100,100,0),('118',3,21,'1','5',100,100,1),('119',2,21,'1','2',40,40,0),('120',2,21,'1','2',40,40,1),('121',1,20,'1','3',60,60,0),('122',1,20,'1','3',60,60,1),('123',3,20,'1','3',60,60,0),('124',3,20,'1','3',60,60,1),('125',2,20,'1','5',100,100,0),('126',2,20,'1','5',100,100,1),('127',1,19,'1','1',20,20,0),('128',1,19,'1','1',20,20,1),('129',3,19,'1','2',40,40,0),('130',3,19,'1','2',40,40,1),('131',2,19,'1','4',80,80,0),('132',2,19,'1','4',80,80,1),('133',1,18,'1','3',60,60,0),('134',1,18,'1','3',60,60,1),('135',3,18,'1','3',60,60,0),('136',3,18,'1','3',60,60,1),('137',2,18,'1','4',80,80,0),('138',2,18,'1','4',80,80,1),('139',1,17,'1','4',80,80,0),('140',1,17,'1','4',80,80,1),('141',3,17,'1','2',40,40,0),('142',3,17,'1','2',40,40,1),('143',2,17,'1','3',60,60,0),('144',2,17,'1','3',60,60,1),('145',1,10,'1','4',80,80,0),('146',1,10,'1','4',80,80,1),('147',3,10,'1','4',80,80,0),('148',3,10,'1','4',80,80,1),('149',2,10,'1','4',80,80,0),('150',2,10,'1','4',80,80,1),('151',1,9,'1','3',60,60,0),('152',1,9,'1','3',60,60,1),('153',3,9,'1','3',60,60,0),('154',3,9,'1','3',60,60,1),('155',2,9,'1','4',80,80,0),('156',2,9,'1','4',80,80,1),('157',1,2,'1','4',80,80,0),('158',1,2,'1','4',80,80,1),('159',3,2,'1','4',80,80,0),('160',3,2,'1','4',80,80,1),('161',2,2,'1','2',40,40,0),('162',2,2,'1','2',40,40,1),('163',1,25,'1','2',40,40,0),('164',1,25,'1','2',40,40,1),('165',3,25,'1','2',40,40,0),('166',3,25,'1','2',40,40,1),('167',2,25,'1','3',60,60,0),('168',2,25,'1','3',60,60,1),('169',1,26,'1','2',40,40,0),('170',1,26,'1','2',40,40,1),('171',3,26,'1','4',80,80,0),('172',3,26,'1','4',80,80,1),('173',2,26,'1','2',40,40,0),('174',2,26,'1','2',40,40,1),('181',1,37,'1','3',60,60,0),('182',1,37,'1','3',60,60,1),('183',3,37,'1','4',80,80,0),('184',3,37,'1','4',80,80,1),('185',2,37,'1','3',60,60,0),('186',2,37,'1','3',60,60,1),('187',1,36,'1','4',80,80,0),('188',1,36,'1','4',80,80,1),('189',3,36,'1','3',60,60,0),('190',3,36,'1','3',60,60,1),('191',2,36,'1','2',40,40,0),('192',2,36,'1','2',40,40,1),('193',1,35,'1','4',80,80,0),('194',1,35,'1','4',80,80,1),('195',3,35,'1','2',40,40,0),('196',3,35,'1','2',40,40,1),('197',2,35,'1','1',20,20,0),('198',2,35,'1','1',20,20,1),('199',1,34,'1','2',40,40,0),('200',1,34,'1','2',40,40,1),('201',3,34,'1','3',60,60,0),('202',3,34,'1','3',60,60,1),('203',2,34,'1','3',60,60,0),('204',2,34,'1','3',60,60,1),('205',2,33,'1','2',40,40,0),('206',2,33,'1','2',40,40,1),('207',1,33,'1','4',80,80,0),('208',1,33,'1','4',80,80,1),('209',3,33,'1','4',80,80,0),('210',3,33,'1','4',80,80,1),('211',2,32,'1','1',20,20,0),('212',2,32,'1','1',20,20,1),('213',1,32,'1','3',60,60,0),('214',1,32,'1','3',60,60,1),('215',3,32,'1','4',80,80,0),('216',3,32,'1','4',80,80,1),('217',2,29,'1','3',60,60,0),('218',2,29,'1','3',60,60,1),('219',1,29,'1','3',60,60,0),('220',1,29,'1','3',60,60,1),('221',3,29,'1','3',60,60,0),('222',3,29,'1','3',60,60,1),('223',1,28,'1','2',40,40,0),('224',1,28,'1','2',40,40,1),('225',3,28,'1','4',80,80,0),('226',3,28,'1','4',80,80,1),('227',2,28,'1','4',80,80,0),('228',2,28,'1','4',80,80,1),('229',1,27,'1','3',60,60,0),('230',1,27,'1','3',60,60,1),('231',3,27,'1','4',80,80,0),('232',3,27,'1','4',80,80,1),('233',2,27,'1','3',60,60,0),('234',2,27,'1','3',60,60,1),('235',1,1,'1','3',60,60,0),('236',1,1,'1','3',60,60,1),('237',3,1,'1','4',80,80,0),('238',3,1,'1','4',80,80,1),('239',2,1,'1','3',60,60,0),('240',2,1,'1','3',60,60,1),('241',1,1,'1','3',60,60,2),('242',1,1,'1','3',60,60,3),('243',1,1,'1','3',60,60,4),('252',2,1,'1','3',60,60,2),('253',2,1,'1','3',60,60,3),('254',2,1,'1','3',60,60,4),('263',3,1,'1','4',80,80,2),('264',3,1,'1','4',80,80,3),('265',3,1,'1','4',80,80,4),('274',1,27,'1','3',60,60,2),('275',1,27,'1','3',60,60,3),('276',1,27,'1','3',60,60,4),('289',2,27,'1','3',60,60,2),('290',2,27,'1','3',60,60,3),('291',2,27,'1','3',60,60,4),('304',3,27,'1','4',80,80,2),('305',3,27,'1','4',80,80,3),('306',3,27,'1','4',80,80,4),('319',1,28,'1','2',40,40,2),('320',1,28,'1','2',40,40,3),('321',1,28,'1','2',40,40,4),('330',2,28,'1','4',80,80,2),('331',2,28,'1','4',80,80,3),('332',2,28,'1','4',80,80,4),('341',3,28,'1','4',80,80,2),('342',3,28,'1','4',80,80,3),('343',3,28,'1','4',80,80,4),('352',1,29,'1','3',60,60,2),('353',1,29,'1','3',60,60,3),('354',1,29,'1','3',60,60,4),('367',2,29,'1','3',60,60,2),('368',2,29,'1','3',60,60,3),('369',2,29,'1','3',60,60,4),('382',3,29,'1','3',60,60,2),('383',3,29,'1','3',60,60,3),('384',3,29,'1','3',60,60,4),('397',1,32,'1','3',60,60,2),('398',1,32,'1','3',60,60,3),('399',1,32,'1','3',60,60,4),('412',2,32,'1','1',20,20,2),('413',2,32,'1','1',20,20,3),('414',2,32,'1','1',20,20,4),('427',3,32,'1','4',80,80,2),('428',3,32,'1','4',80,80,3),('429',3,32,'1','4',80,80,4),('442',1,33,'1','4',80,80,2),('443',1,33,'1','4',80,80,3),('444',1,33,'1','4',80,80,4),('457',2,33,'1','2',40,40,2),('458',2,33,'1','2',40,40,3),('459',2,33,'1','2',40,40,4),('472',3,33,'1','4',80,80,2),('473',3,33,'1','4',80,80,3),('474',3,33,'1','4',80,80,4),('487',1,34,'1','2',40,40,2),('488',1,34,'1','2',40,40,3),('489',1,34,'1','2',40,40,4),('502',2,34,'1','3',60,60,2),('503',2,34,'1','3',60,60,3),('504',2,34,'1','3',60,60,4),('517',3,34,'1','3',60,60,2),('518',3,34,'1','3',60,60,3),('519',3,34,'1','3',60,60,4),('532',1,35,'1','4',80,80,2),('533',1,35,'1','4',80,80,3),('534',1,35,'1','4',80,80,4),('547',2,35,'1','1',20,20,2),('548',2,35,'1','1',20,20,3),('549',2,35,'1','1',20,20,4),('562',3,35,'1','2',40,40,2),('563',3,35,'1','2',40,40,3),('564',3,35,'1','2',40,40,4),('577',1,36,'1','4',80,80,2),('578',1,36,'1','4',80,80,3),('579',1,36,'1','4',80,80,4),('592',2,36,'1','2',40,40,2),('593',2,36,'1','2',40,40,3),('594',2,36,'1','2',40,40,4),('607',3,36,'1','3',60,60,2),('608',3,36,'1','3',60,60,3),('609',3,36,'1','3',60,60,4),('667',1,37,'1','3',60,60,2),('668',1,37,'1','3',60,60,3),('669',1,37,'1','3',60,60,4),('682',2,37,'1','3',60,60,2),('683',2,37,'1','3',60,60,3),('684',2,37,'1','3',60,60,4),('697',3,37,'1','4',80,80,2),('698',3,37,'1','4',80,80,3),('699',3,37,'1','4',80,80,4),('712',1,26,'1','2',40,40,2),('713',1,26,'1','2',40,40,3),('714',1,26,'1','2',40,40,4),('727',2,26,'1','2',40,40,2),('728',2,26,'1','2',40,40,3),('729',2,26,'1','2',40,40,4),('742',3,26,'1','4',80,80,2),('743',3,26,'1','4',80,80,3),('744',3,26,'1','4',80,80,4),('757',1,25,'1','2',40,40,2),('758',1,25,'1','2',40,40,3),('759',1,25,'1','2',40,40,4),('772',2,25,'1','3',60,60,2),('773',2,25,'1','3',60,60,3),('774',2,25,'1','3',60,60,4),('787',3,25,'1','2',40,40,2),('788',3,25,'1','2',40,40,3),('789',3,25,'1','2',40,40,4),('802',1,2,'1','4',80,80,2),('803',1,2,'1','4',80,80,3),('804',1,2,'1','4',80,80,4),('817',2,2,'1','2',40,40,2),('818',2,2,'1','2',40,40,3),('819',2,2,'1','2',40,40,4),('832',3,2,'1','4',80,80,2),('833',3,2,'1','4',80,80,3),('834',3,2,'1','4',80,80,4),('847',1,9,'1','3',60,60,2),('848',1,9,'1','3',60,60,3),('849',1,9,'1','3',60,60,4),('862',2,9,'1','4',80,80,2),('863',2,9,'1','4',80,80,3),('864',2,9,'1','4',80,80,4),('877',3,9,'1','3',60,60,2),('878',3,9,'1','3',60,60,3),('879',3,9,'1','3',60,60,4),('892',1,10,'1','4',80,80,2),('893',1,10,'1','4',80,80,3),('894',1,10,'1','4',80,80,4),('907',2,10,'1','4',80,80,2),('908',2,10,'1','4',80,80,3),('909',2,10,'1','4',80,80,4),('922',3,10,'1','4',80,80,2),('923',3,10,'1','4',80,80,3),('924',3,10,'1','4',80,80,4),('937',1,17,'1','4',80,80,2),('938',1,17,'1','4',80,80,3),('939',1,17,'1','4',80,80,4),('952',2,17,'1','3',60,60,2),('953',2,17,'1','3',60,60,3),('954',2,17,'1','3',60,60,4),('967',3,17,'1','2',40,40,2),('968',3,17,'1','2',40,40,3),('969',3,17,'1','2',40,40,4),('982',1,18,'1','3',60,60,2),('983',1,18,'1','3',60,60,3),('984',1,18,'1','3',60,60,4),('997',2,18,'1','4',80,80,2),('998',2,18,'1','4',80,80,3),('999',2,18,'1','4',80,80,4),('1012',3,18,'1','3',60,60,2),('1013',3,18,'1','3',60,60,3),('1014',3,18,'1','3',60,60,4),('1027',1,19,'1','1',20,20,2),('1028',1,19,'1','1',20,20,3),('1029',1,19,'1','1',20,20,4),('1042',2,19,'1','4',80,80,2),('1043',2,19,'1','4',80,80,3),('1044',2,19,'1','4',80,80,4),('1057',3,19,'1','2',40,40,2),('1058',3,19,'1','2',40,40,3),('1059',3,19,'1','2',40,40,4),('1072',1,20,'1','3',60,60,2),('1073',1,20,'1','3',60,60,3),('1074',1,20,'1','3',60,60,4),('1087',2,20,'1','5',100,100,2),('1088',2,20,'1','5',100,100,3),('1089',2,20,'1','5',100,100,4),('1102',3,20,'1','3',60,60,2),('1103',3,20,'1','3',60,60,3),('1104',3,20,'1','3',60,60,4),('1117',1,21,'1','5',100,100,2),('1118',1,21,'1','5',100,100,3),('1119',1,21,'1','5',100,100,4),('1132',2,21,'1','2',40,40,2),('1133',2,21,'1','2',40,40,3),('1134',2,21,'1','2',40,40,4),('1147',3,21,'1','5',100,100,2),('1148',3,21,'1','5',100,100,3),('1149',3,21,'1','5',100,100,4),('1162',1,23,'1','4',80,80,2),('1163',1,23,'1','4',80,80,3),('1164',1,23,'1','4',80,80,4),('1177',2,23,'1','3',60,60,2),('1178',2,23,'1','3',60,60,3),('1179',2,23,'1','3',60,60,4),('1192',3,23,'1','3',60,60,2),('1193',3,23,'1','3',60,60,3),('1194',3,23,'1','3',60,60,4),('1207',1,24,'1','2',40,40,2),('1208',1,24,'1','2',40,40,3),('1209',1,24,'1','2',40,40,4),('1222',2,24,'1','3',60,60,2),('1223',2,24,'1','3',60,60,3),('1224',2,24,'1','3',60,60,4),('1237',3,24,'1','3',60,60,2),('1238',3,24,'1','3',60,60,3),('1239',3,24,'1','3',60,60,4),('1747',1,50,'1','3',60,60,2),('1748',1,50,'1','3',60,60,3),('1749',1,50,'1','3',60,60,4),('1762',2,50,'1','5',100,100,2),('1763',2,50,'1','5',100,100,3),('1764',2,50,'1','5',100,100,4),('1777',3,50,'1','3',60,60,2),('1778',3,50,'1','3',60,60,3),('1779',3,50,'1','3',60,60,4),('1782',3,22,'1','4',80,80,0),('1783',3,22,'1','4',80,80,1),('1784',2,22,'1','3',60,60,0),('1785',2,22,'1','3',60,60,1),('1786',1,22,'1','3',60,60,0),('1787',1,22,'1','3',60,60,1),('1788',1,30,'2','8',80,80,0),('1789',1,30,'2','8',80,80,1),('1790',3,30,'2','8',80,80,0),('1791',3,30,'2','8',80,80,1),('1792',2,30,'2','8',80,80,0),('1793',2,30,'2','8',80,80,1),('1794',1,31,'1','4',80,80,0),('1795',1,31,'1','4',80,80,1),('1796',3,31,'1','4',80,80,0),('1797',3,31,'1','4',80,80,1),('1798',2,31,'1','4',80,80,0),('1799',2,31,'1','4',80,80,1),('1800',1,48,'1','4',80,80,0),('1801',1,48,'1','4',80,80,1),('1802',3,48,'1','4',80,80,0),('1803',3,48,'1','4',80,80,1),('1804',2,48,'1','5',100,100,0),('1805',2,48,'1','5',100,100,1),('1806',1,49,'1','4',80,80,0),('1807',1,49,'1','4',80,80,1),('1808',3,49,'1','4',80,80,0),('1809',3,49,'1','4',80,80,1),('1810',2,49,'1','4',80,80,0),('1811',2,49,'1','4',80,80,1),('1812',3,7,'1','5',100,100,0),('1813',3,7,'1','5',100,100,1),('1814',2,7,'1','5',100,100,0),('1815',2,7,'1','5',100,100,1),('1816',1,7,'1','5',100,100,0),('1817',1,7,'1','5',100,100,1);

--
-- Table structure for table `rating_store`
--

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 `RATING_STORE_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rating Store';

--
-- Dumping data for table `rating_store`
--

INSERT INTO `rating_store` VALUES (1,0),(1,1),(1,2),(1,3),(1,4),(2,0),(2,1),(2,2),(2,3),(2,4),(3,0),(3,1),(3,2),(3,3),(3,4);

--
-- Table structure for table `rating_title`
--

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 `RATING_TITLE_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rating Title';

--
-- Table structure for table `report_compared_product_index`
--

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 CURRENT_TIMESTAMP COMMENT 'Added At',
  PRIMARY KEY (`index_id`),
  UNIQUE KEY `REPORT_COMPARED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  UNIQUE KEY `REPORT_COMPARED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `REPORT_COMPARED_PRODUCT_INDEX_STORE_ID` (`store_id`),
  KEY `REPORT_COMPARED_PRODUCT_INDEX_ADDED_AT` (`added_at`),
  KEY `REPORT_COMPARED_PRODUCT_INDEX_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Reports Compared Product Index Table';

--
-- Dumping data for table `report_compared_product_index`
--

INSERT INTO `report_compared_product_index` VALUES (1,'82',NULL,'21',NULL,'2016-09-06 16:24:09'),(2,'82',NULL,'33',NULL,'2016-09-06 16:24:43');

--
-- Table structure for table `report_event`
--

CREATE TABLE `report_event` (
  `event_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event Id',
  `logged_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 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 `REPORT_EVENT_EVENT_TYPE_ID` (`event_type_id`),
  KEY `REPORT_EVENT_SUBJECT_ID` (`subject_id`),
  KEY `REPORT_EVENT_OBJECT_ID` (`object_id`),
  KEY `REPORT_EVENT_SUBTYPE` (`subtype`),
  KEY `REPORT_EVENT_STORE_ID` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=275 DEFAULT CHARSET=utf8 COMMENT='Reports Event Table';

--
-- Dumping data for table `report_event`
--

INSERT INTO `report_event` VALUES (1,'2016-07-21 01:32:09',1,'10','18',1,1),(2,'2016-07-21 01:32:12',1,'9','18',1,1),(3,'2016-07-21 01:32:19',1,'17','18',1,1),(4,'2016-07-21 01:33:04',1,'17','18',1,1),(5,'2016-07-21 01:34:45',1,'2','18',1,1),(6,'2016-07-21 01:34:48',1,'20','18',1,1),(7,'2016-07-21 01:34:51',1,'18','18',1,1),(8,'2016-07-21 01:34:54',1,'7','18',1,1),(9,'2016-07-21 01:34:59',1,'21','18',1,1),(10,'2016-07-21 01:35:47',1,'8','18',1,1),(11,'2016-07-21 01:36:01',1,'21','18',1,1),(12,'2016-07-21 03:30:03',1,'2','21',1,1),(13,'2016-07-21 08:27:15',1,'52','23',1,1),(14,'2016-07-21 08:27:17',1,'66','23',1,1),(15,'2016-07-21 08:27:25',1,'46','23',1,1),(16,'2016-07-21 08:27:27',1,'44','23',1,1),(17,'2016-07-21 08:27:29',1,'52','23',1,1),(18,'2016-07-21 08:27:46',1,'66','23',1,1),(19,'2016-07-21 08:28:13',1,'52','23',1,1),(20,'2016-07-21 08:28:19',1,'41','23',1,1),(21,'2016-07-21 09:13:32',1,'66','23',1,1),(22,'2016-07-21 09:13:54',1,'66','23',1,1),(23,'2016-07-21 09:15:58',1,'50','23',1,1),(24,'2016-07-21 09:16:58',1,'44','23',1,1),(25,'2016-07-21 09:17:01',1,'66','23',1,1),(26,'2016-07-21 09:17:10',1,'52','23',1,1),(27,'2016-07-21 09:17:13',1,'51','23',1,1),(28,'2016-07-21 09:17:19',1,'50','23',1,1),(29,'2016-07-21 09:17:23',1,'47','23',1,1),(30,'2016-07-21 09:17:28',1,'46','23',1,1),(31,'2016-07-21 09:18:00',1,'42','23',1,1),(32,'2016-07-21 09:18:05',1,'41','23',1,1),(33,'2016-07-21 09:18:50',1,'42','23',1,1),(34,'2016-07-21 09:20:01',1,'41','23',1,1),(35,'2016-07-21 09:20:23',1,'66','23',1,1),(36,'2016-07-21 09:20:33',1,'52','23',1,1),(37,'2016-07-21 09:20:47',1,'51','23',1,1),(38,'2016-07-21 09:20:55',1,'50','23',1,1),(39,'2016-07-21 09:21:26',1,'44','23',1,1),(40,'2016-07-21 09:23:12',1,'47','23',1,1),(41,'2016-07-21 09:23:37',1,'53','23',1,1),(42,'2016-07-21 09:23:40',1,'54','23',1,1),(43,'2016-07-21 09:23:44',1,'65','23',1,1),(44,'2016-07-21 09:23:49',1,'64','23',1,1),(45,'2016-07-21 09:23:52',1,'63','23',1,1),(46,'2016-07-21 09:24:36',1,'64','23',1,1),(47,'2016-07-21 09:24:44',1,'62','23',1,1),(48,'2016-07-21 09:24:47',1,'62','23',1,1),(49,'2016-07-21 09:24:50',1,'63','23',1,1),(50,'2016-07-21 09:24:55',1,'54','23',1,1),(51,'2016-07-21 09:25:15',1,'61','23',1,1),(52,'2016-07-21 09:25:29',1,'60','23',1,1),(53,'2016-07-21 09:25:52',1,'59','23',1,1),(54,'2016-07-21 09:25:56',1,'60','23',1,1),(55,'2016-07-21 09:26:35',1,'58','23',1,1),(56,'2016-07-21 09:26:40',1,'57','23',1,1),(57,'2016-07-21 09:27:13',1,'58','25',1,1),(58,'2016-07-21 09:27:29',1,'58','25',1,1),(59,'2016-07-21 09:27:46',1,'57','25',1,1),(60,'2016-07-21 09:27:54',1,'55','25',1,1),(61,'2016-07-21 09:28:12',1,'55','25',1,1),(62,'2016-07-21 09:28:20',1,'40','25',1,1),(63,'2016-07-21 09:28:41',1,'40','25',1,1),(64,'2016-07-21 09:28:49',1,'39','25',1,1),(65,'2016-07-21 09:29:11',1,'24','25',1,1),(66,'2016-07-21 09:29:14',1,'39','25',1,1),(67,'2016-07-21 09:29:29',1,'23','25',1,1),(68,'2016-07-21 09:29:33',1,'24','25',1,1),(69,'2016-07-21 09:29:47',1,'21','25',1,1),(70,'2016-07-21 09:29:50',1,'23','25',1,1),(71,'2016-07-21 09:30:00',1,'20','25',1,1),(72,'2016-07-21 09:30:07',1,'21','25',1,1),(73,'2016-07-21 09:30:20',1,'20','25',1,1),(74,'2016-07-21 09:30:44',1,'19','25',1,1),(75,'2016-07-21 09:30:47',1,'18','25',1,1),(76,'2016-07-21 09:30:50',1,'17','25',1,1),(77,'2016-07-21 09:30:53',1,'10','25',1,1),(78,'2016-07-21 09:30:56',1,'9','25',1,1),(79,'2016-07-21 09:30:59',1,'2','25',1,1),(80,'2016-07-21 09:31:02',1,'25','25',1,1),(81,'2016-07-21 09:31:32',1,'19','25',1,1),(82,'2016-07-21 09:31:48',1,'19','25',1,1),(83,'2016-07-21 09:32:07',1,'18','25',1,1),(84,'2016-07-21 09:32:25',1,'17','25',1,1),(85,'2016-07-21 09:32:43',1,'10','25',1,1),(86,'2016-07-21 09:32:58',4,'1','25',1,1),(87,'2016-07-21 09:32:59',4,'7','25',1,1),(88,'2016-07-21 09:33:01',1,'9','25',1,1),(89,'2016-07-21 09:34:01',1,'9','25',1,1),(90,'2016-07-21 09:34:20',1,'2','25',1,1),(91,'2016-07-21 09:34:39',1,'25','25',1,1),(92,'2016-07-21 09:34:50',1,'26','25',1,1),(93,'2016-07-21 09:35:11',1,'26','25',1,1),(94,'2016-07-21 09:35:20',1,'38','25',1,1),(95,'2016-07-21 09:35:38',1,'38','25',1,1),(96,'2016-07-21 09:36:08',1,'37','25',1,1),(97,'2016-07-21 09:36:34',1,'36','25',1,1),(98,'2016-07-21 09:36:47',1,'37','25',1,1),(99,'2016-07-21 09:37:06',1,'36','25',1,1),(100,'2016-07-21 09:37:16',1,'35','25',1,1),(101,'2016-07-21 09:37:41',1,'35','25',1,1),(102,'2016-07-21 09:37:48',1,'34','25',1,1),(103,'2016-07-21 09:38:24',1,'34','25',1,1),(104,'2016-07-21 09:38:32',1,'33','25',1,1),(105,'2016-07-21 09:38:48',1,'33','25',1,1),(106,'2016-07-21 09:39:03',1,'32','25',1,1),(107,'2016-07-21 09:39:07',1,'29','25',1,1),(108,'2016-07-21 09:39:28',1,'32','25',1,1),(109,'2016-07-21 09:39:48',1,'29','25',1,1),(110,'2016-07-21 09:39:59',1,'28','25',1,1),(111,'2016-07-21 09:40:18',1,'28','25',1,1),(112,'2016-07-21 09:40:29',1,'27','25',1,1),(113,'2016-07-21 09:40:52',1,'27','25',1,1),(114,'2016-07-21 09:41:18',1,'1','25',1,1),(115,'2016-07-21 09:41:39',1,'1','25',1,1),(116,'2016-07-21 10:03:06',1,'46','25',1,1),(117,'2016-07-21 10:03:24',1,'62','25',1,1),(118,'2016-07-21 10:03:28',1,'65','25',1,1),(119,'2016-07-21 10:03:31',1,'53','25',1,1),(120,'2016-07-21 10:03:35',1,'61','25',1,1),(121,'2016-07-21 10:03:39',1,'59','25',1,1),(122,'2016-07-21 10:04:58',1,'46','25',1,1),(123,'2016-07-21 10:05:13',1,'53','25',1,1),(124,'2016-07-21 10:05:30',1,'65','25',1,1),(125,'2016-07-21 10:05:48',1,'62','25',1,1),(126,'2016-07-21 10:06:08',1,'59','25',1,1),(127,'2016-07-21 10:06:12',1,'61','25',1,1),(128,'2016-07-21 10:06:32',1,'59','25',1,1),(129,'2016-07-21 10:11:19',4,'66','25',1,1),(130,'2016-08-29 15:42:33',4,'64','35',1,1),(131,'2016-08-29 15:43:41',4,'51','35',1,1),(132,'2016-08-29 15:46:25',4,'44','35',1,1),(133,'2016-08-29 15:49:15',4,'41','35',1,1),(134,'2016-08-29 16:05:15',4,'59','35',1,1),(135,'2016-08-30 08:11:48',4,'24','40',1,1),(136,'2016-08-30 08:19:59',4,'36','40',1,1),(137,'2016-08-30 14:33:27',4,'25','44',1,1),(138,'2016-09-01 09:59:30',4,'21','56',1,1),(139,'2016-09-05 10:29:36',1,'21','67',1,1),(140,'2016-09-05 10:36:13',1,'21','67',1,1),(141,'2016-09-05 10:36:43',1,'21','67',1,1),(142,'2016-09-05 10:37:37',1,'17','67',1,1),(143,'2016-09-05 10:38:11',1,'17','67',1,1),(144,'2016-09-05 13:33:15',1,'21','68',1,1),(145,'2016-09-05 13:38:03',1,'21','68',1,1),(146,'2016-09-05 13:38:33',1,'21','68',1,1),(147,'2016-09-05 13:40:51',1,'17','68',1,1),(148,'2016-09-05 13:41:49',1,'17','68',1,1),(149,'2016-09-05 13:46:28',1,'21','68',1,1),(150,'2016-09-05 15:08:58',1,'21','69',1,1),(151,'2016-09-05 15:23:51',1,'21','69',1,1),(152,'2016-09-05 16:31:32',1,'21','71',1,1),(153,'2016-09-05 17:03:15',1,'21','71',1,1),(154,'2016-09-05 17:04:35',1,'10','71',1,1),(155,'2016-09-05 17:10:33',1,'10','71',1,1),(156,'2016-09-06 08:14:25',4,'36','72',1,1),(157,'2016-09-06 08:16:05',1,'35','72',1,1),(158,'2016-09-06 08:16:13',1,'36','72',1,1),(159,'2016-09-06 08:16:19',1,'24','72',1,1),(160,'2016-09-06 08:17:11',1,'21','72',1,1),(161,'2016-09-06 08:35:28',1,'21','72',1,1),(162,'2016-09-06 08:36:09',1,'21','72',1,1),(163,'2016-09-06 08:38:26',1,'21','72',1,1),(164,'2016-09-06 08:39:39',1,'21','72',1,1),(165,'2016-09-06 08:40:59',1,'21','72',1,1),(166,'2016-09-06 08:42:53',1,'21','72',1,1),(167,'2016-09-06 08:44:43',1,'21','72',1,1),(168,'2016-09-06 08:46:43',1,'21','72',1,1),(169,'2016-09-06 08:50:19',1,'21','72',1,1),(170,'2016-09-06 08:52:26',1,'21','72',1,1),(171,'2016-09-06 08:53:50',1,'21','72',1,1),(172,'2016-09-06 08:58:37',1,'21','72',1,1),(173,'2016-09-06 09:00:08',1,'21','72',1,1),(174,'2016-09-06 09:42:13',1,'10','73',1,1),(175,'2016-09-06 09:57:28',1,'10','73',1,1),(176,'2016-09-06 10:20:59',4,'10','73',1,1),(177,'2016-09-06 10:21:05',1,'10','73',1,1),(178,'2016-09-06 10:48:19',1,'10','74',1,1),(179,'2016-09-06 10:48:51',4,'28','77',1,1),(180,'2016-09-06 10:49:24',4,'21','77',1,1),(181,'2016-09-06 10:50:32',4,'29','77',1,1),(182,'2016-09-06 10:50:38',4,'28','77',1,1),(183,'2016-09-06 10:51:55',1,'21','77',1,1),(184,'2016-09-06 11:05:18',1,'1','77',1,1),(185,'2016-09-06 15:04:08',1,'30','80',1,1),(186,'2016-09-06 15:04:09',1,'22','80',1,1),(187,'2016-09-06 15:05:37',1,'22','80',1,1),(188,'2016-09-06 15:05:52',1,'30','80',1,1),(189,'2016-09-06 15:06:23',1,'30','80',1,1),(190,'2016-09-06 15:07:56',1,'31','80',1,1),(191,'2016-09-06 15:08:18',1,'31','80',1,1),(192,'2016-09-06 15:08:50',1,'31','80',1,1),(193,'2016-09-06 15:09:21',1,'48','80',1,1),(194,'2016-09-06 15:09:24',1,'49','80',1,1),(195,'2016-09-06 15:09:44',1,'48','80',1,1),(196,'2016-09-06 15:09:59',1,'49','80',1,1),(197,'2016-09-06 16:24:09',3,'21','82',1,1),(198,'2016-09-06 16:24:43',3,'33','82',1,1),(199,'2016-09-06 16:30:22',4,'37','82',1,1),(200,'2016-09-06 16:30:33',4,'25','82',1,1),(201,'2016-09-06 16:30:47',4,'21','82',1,1),(202,'2016-09-07 08:17:00',1,'21','83',1,1),(203,'2016-09-07 08:17:39',4,'21','83',1,1),(204,'2016-09-07 10:08:55',4,'19','84',1,1),(205,'2016-09-07 10:09:05',4,'7','84',1,1),(206,'2016-09-07 10:09:15',4,'37','84',1,1),(207,'2016-09-07 10:09:28',4,'36','84',1,1),(208,'2016-09-07 14:44:59',1,'36','86',1,1),(209,'2016-09-07 15:55:29',1,'25','88',1,1),(210,'2016-09-07 15:55:35',1,'28','88',1,1),(211,'2016-09-07 16:31:43',1,'7','88',1,1),(212,'2016-09-07 16:32:08',1,'7','88',1,1),(213,'2016-09-07 16:33:24',1,'35','88',1,1),(214,'2016-09-07 16:52:49',1,'31','88',1,1),(215,'2016-09-07 17:01:01',1,'35','89',1,1),(216,'2016-09-12 14:16:51',1,'23','104',1,1),(217,'2016-09-14 14:50:08',1,'21','113',1,1),(218,'2016-09-14 14:50:51',4,'21','113',1,1),(219,'2016-09-14 14:50:58',1,'21','113',1,1),(220,'2016-09-15 09:22:51',1,'21','116',1,1),(221,'2016-09-15 09:23:45',4,'21','116',1,1),(222,'2016-09-15 09:24:02',4,'18','116',1,1),(223,'2016-09-15 09:24:18',4,'20','116',1,1),(224,'2016-09-15 09:24:25',1,'17','116',1,1),(225,'2016-09-15 09:24:39',1,'2','116',1,1),(226,'2016-09-19 13:22:08',4,'21','130',1,2),(227,'2016-11-27 09:23:16',1,'29','154',1,1),(228,'2016-11-30 09:06:13',1,'25','170',1,1),(229,'2016-12-01 03:17:52',1,'1','173',1,1),(230,'2016-12-01 03:54:43',1,'1','174',1,1),(231,'2016-12-01 03:56:25',1,'1','175',1,1),(232,'2016-12-01 03:56:54',1,'28','177',1,1),(233,'2016-12-01 03:57:04',1,'28','178',1,1),(234,'2016-12-01 03:59:06',1,'7','176',1,1),(235,'2016-12-01 03:59:09',1,'28','176',1,1),(236,'2016-12-01 04:00:53',1,'1','176',1,1),(237,'2016-12-01 04:12:23',1,'2','176',1,1),(238,'2016-12-01 04:12:34',1,'28','176',1,1),(239,'2016-12-01 04:13:08',1,'17','176',1,1),(240,'2016-12-01 04:13:13',1,'1','176',1,1),(241,'2016-12-01 04:17:01',1,'17','176',1,1),(242,'2016-12-01 04:19:57',1,'2','176',1,1),(243,'2016-12-01 04:25:17',1,'25','176',1,1),(244,'2016-12-02 15:50:22',1,'29','196',1,2),(245,'2016-12-06 16:21:17',1,'51','211',1,3),(246,'2016-12-06 16:21:19',1,'51','211',1,3),(247,'2016-12-06 16:43:18',1,'62','211',1,1),(248,'2016-12-06 17:17:51',1,'51','211',1,3),(249,'2016-12-07 17:05:57',1,'37','216',1,4),(250,'2016-12-11 10:13:42',1,'28','242',1,1),(251,'2016-12-11 15:27:09',1,'1','246',1,1),(252,'2016-12-12 16:46:09',1,'1','254',1,1),(253,'2016-12-12 16:47:38',1,'9','254',1,1),(254,'2016-12-12 16:47:41',1,'9','254',1,1),(255,'2016-12-12 16:52:41',1,'29','254',1,2),(256,'2016-12-14 03:27:13',1,'51','259',1,3),(257,'2016-12-14 03:27:22',1,'49','259',1,2),(258,'2016-12-14 08:53:16',1,'63','263',1,4),(259,'2016-12-14 08:58:33',1,'29','263',1,2),(260,'2016-12-14 09:57:16',1,'18','268',1,1),(261,'2016-12-15 14:36:40',4,'7','275',1,1),(262,'2016-12-15 16:17:33',1,'29','276',1,2),(263,'2016-12-20 03:41:22',1,'28','282',1,1),(264,'2016-12-21 01:32:39',1,'25','292',1,1),(265,'2016-12-21 03:08:53',1,'68','295',1,4),(266,'2016-12-21 09:08:30',4,'24','301',1,1),(267,'2016-12-21 09:09:37',4,'25','303',1,1),(268,'2016-12-21 09:40:29',1,'1','303',1,1),(269,'2016-12-21 09:42:20',4,'1','303',1,1),(270,'2016-12-21 09:47:33',4,'28','303',1,1),(271,'2016-12-21 09:48:01',4,'55','301',1,3),(272,'2016-12-21 09:52:10',4,'35','303',1,2),(273,'2016-12-21 09:57:48',4,'24','303',1,1),(274,'2016-12-22 09:07:59',4,'65','315',1,4);

--
-- Table structure for table `report_event_types`
--

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 AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='Reports Event Type Table';

--
-- Dumping data for table `report_event_types`
--

INSERT INTO `report_event_types` 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);

--
-- Table structure for table `report_viewed_product_aggregated_daily`
--

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 `REPORT_VIEWED_PRD_AGGRED_DAILY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_DAILY_STORE_ID` (`store_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_DAILY_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Most Viewed Products Aggregated Daily';

--
-- Table structure for table `report_viewed_product_aggregated_monthly`
--

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 `REPORT_VIEWED_PRD_AGGRED_MONTHLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_MONTHLY_STORE_ID` (`store_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_MONTHLY_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Most Viewed Products Aggregated Monthly';

--
-- Table structure for table `report_viewed_product_aggregated_yearly`
--

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 `REPORT_VIEWED_PRD_AGGRED_YEARLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_YEARLY_STORE_ID` (`store_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_YEARLY_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Most Viewed Products Aggregated Yearly';

--
-- Table structure for table `report_viewed_product_index`
--

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 CURRENT_TIMESTAMP COMMENT 'Added At',
  PRIMARY KEY (`index_id`),
  UNIQUE KEY `REPORT_VIEWED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  UNIQUE KEY `REPORT_VIEWED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `REPORT_VIEWED_PRODUCT_INDEX_STORE_ID` (`store_id`),
  KEY `REPORT_VIEWED_PRODUCT_INDEX_ADDED_AT` (`added_at`),
  KEY `REPORT_VIEWED_PRODUCT_INDEX_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8 COMMENT='Reports Viewed Product Index Table';

--
-- Dumping data for table `report_viewed_product_index`
--

INSERT INTO `report_viewed_product_index` VALUES (1,'18',NULL,'10',1,'2016-07-21 01:32:09'),(2,'18',NULL,'9',1,'2016-07-21 01:32:12'),(3,'18',NULL,'17',1,'2016-07-21 01:32:19'),(5,'18',NULL,'2',1,'2016-07-21 01:34:45'),(6,'18',NULL,'20',1,'2016-07-21 01:34:48'),(7,'18',NULL,'18',1,'2016-07-21 01:34:51'),(8,'18',NULL,'7',1,'2016-07-21 01:34:54'),(9,'18',NULL,'21',1,'2016-07-21 01:34:58'),(12,'21',NULL,'2',1,'2016-07-21 03:30:03'),(23,'23',NULL,'50',1,'2016-07-21 09:15:58'),(65,'25',NULL,'24',1,'2016-07-21 09:29:11'),(67,'25',NULL,'23',1,'2016-07-21 09:29:29'),(69,'25',NULL,'21',1,'2016-07-21 09:29:47'),(71,'25',NULL,'20',1,'2016-07-21 09:30:00'),(74,'25',NULL,'19',1,'2016-07-21 09:30:44'),(75,'25',NULL,'18',1,'2016-07-21 09:30:47'),(76,'25',NULL,'17',1,'2016-07-21 09:30:50'),(77,'25',NULL,'10',1,'2016-07-21 09:30:53'),(78,'25',NULL,'9',1,'2016-07-21 09:30:56'),(79,'25',NULL,'2',1,'2016-07-21 09:30:59'),(80,'25',NULL,'25',1,'2016-07-21 09:31:02'),(90,'25',NULL,'26',1,'2016-07-21 09:34:50'),(94,'25',NULL,'37',1,'2016-07-21 09:36:08'),(95,'25',NULL,'36',1,'2016-07-21 09:36:34'),(98,'25',NULL,'35',1,'2016-07-21 09:37:16'),(100,'25',NULL,'34',1,'2016-07-21 09:37:48'),(102,'25',NULL,'33',1,'2016-07-21 09:38:32'),(104,'25',NULL,'32',1,'2016-07-21 09:39:03'),(105,'25',NULL,'29',1,'2016-07-21 09:39:07'),(108,'25',NULL,'28',1,'2016-07-21 09:39:59'),(110,'25',NULL,'27',1,'2016-07-21 09:40:29'),(112,'25',NULL,'1',1,'2016-07-21 09:41:18'),(113,'67',NULL,'21',1,'2016-09-05 10:29:36'),(116,'67',NULL,'17',1,'2016-09-05 10:37:37'),(117,'68',NULL,'21',1,'2016-09-05 13:33:15'),(120,'68',NULL,'17',1,'2016-09-05 13:40:51'),(123,'69',NULL,'21',1,'2016-09-05 15:08:58'),(125,'71',NULL,'21',1,'2016-09-05 16:31:32'),(127,'71',NULL,'10',1,'2016-09-05 17:04:35'),(128,'72',NULL,'35',1,'2016-09-06 08:16:05'),(129,'72',NULL,'36',1,'2016-09-06 08:16:13'),(130,'72',NULL,'24',1,'2016-09-06 08:16:19'),(131,'72',NULL,'21',1,'2016-09-06 08:17:11'),(145,'73',NULL,'10',1,'2016-09-06 09:42:13'),(148,'74',NULL,'10',1,'2016-09-06 10:48:19'),(149,'77',NULL,'21',1,'2016-09-06 10:51:55'),(150,'77',NULL,'1',1,'2016-09-06 11:05:18'),(151,'80',NULL,'30',1,'2016-09-06 15:04:07'),(152,'80',NULL,'22',1,'2016-09-06 15:04:09'),(156,'80',NULL,'31',1,'2016-09-06 15:07:56'),(159,'80',NULL,'48',1,'2016-09-06 15:09:21'),(160,'80',NULL,'49',1,'2016-09-06 15:09:24'),(161,'83',NULL,'21',1,'2016-09-07 08:17:00'),(162,'86',NULL,'36',1,'2016-09-07 14:44:59'),(163,'88',NULL,'25',1,'2016-09-07 15:55:29'),(164,'88',NULL,'28',1,'2016-09-07 15:55:35'),(165,'88',NULL,'7',1,'2016-09-07 16:31:43'),(167,'88',NULL,'35',1,'2016-09-07 16:33:24'),(168,'88',NULL,'31',1,'2016-09-07 16:52:49'),(169,'89',NULL,'35',1,'2016-09-07 17:01:00'),(170,'104',NULL,'23',1,'2016-09-12 14:16:51'),(171,'113',NULL,'21',1,'2016-09-14 14:50:08'),(172,'116','1','21',1,'2016-09-15 09:22:51'),(173,'116','1','17',1,'2016-09-15 09:24:25'),(174,'116','1','2',1,'2016-09-15 09:24:39'),(175,'154',NULL,'29',1,'2016-11-27 09:23:16'),(176,'170',NULL,'25',1,'2016-11-30 09:06:13'),(177,'173',NULL,'1',1,'2016-12-01 03:17:51'),(178,'174',NULL,'1',1,'2016-12-01 03:54:43'),(179,'175',NULL,'1',1,'2016-12-01 03:56:25'),(180,'177',NULL,'28',1,'2016-12-01 03:56:54'),(181,'178',NULL,'28',1,'2016-12-01 03:57:03'),(182,'176',NULL,'7',1,'2016-12-01 03:59:06'),(183,'176',NULL,'28',1,'2016-12-01 03:59:09'),(184,'176',NULL,'1',1,'2016-12-01 04:00:53'),(185,'176',NULL,'2',1,'2016-12-01 04:12:23'),(187,'176',NULL,'17',1,'2016-12-01 04:13:08'),(191,'176',NULL,'25',1,'2016-12-01 04:25:17'),(192,'196',NULL,'29',2,'2016-12-02 15:50:22'),(193,'211',NULL,'51',3,'2016-12-06 16:21:17'),(195,'211',NULL,'62',1,'2016-12-06 16:43:18'),(196,'216',NULL,'37',4,'2016-12-07 17:05:56'),(197,'242',NULL,'28',1,'2016-12-11 10:13:42'),(198,'246',NULL,'1',1,'2016-12-11 15:27:09'),(199,'254',NULL,'1',1,'2016-12-12 16:46:09'),(200,'254',NULL,'9',1,'2016-12-12 16:47:38'),(202,'254',NULL,'29',2,'2016-12-12 16:52:41'),(203,'259',NULL,'51',3,'2016-12-14 03:27:13'),(204,'259',NULL,'49',2,'2016-12-14 03:27:22'),(205,'263',NULL,'63',4,'2016-12-14 08:53:15'),(206,'263',NULL,'29',2,'2016-12-14 08:58:33'),(207,'268',NULL,'18',1,'2016-12-14 09:57:15'),(208,'276',NULL,'29',2,'2016-12-15 16:17:33'),(209,'282',NULL,'28',1,'2016-12-20 03:41:22'),(210,'292',NULL,'25',1,'2016-12-21 01:32:39'),(211,'295',NULL,'68',4,'2016-12-21 03:08:53'),(212,'303',NULL,'1',1,'2016-12-21 09:40:28');

--
-- Table structure for table `reporting_counts`
--

CREATE TABLE `reporting_counts` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `type` varchar(255) DEFAULT NULL COMMENT 'Item Reported',
  `count` int(10) unsigned DEFAULT NULL COMMENT 'Count Value',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Reporting for all count related events generated via the cron job';

--
-- Table structure for table `reporting_module_status`
--

CREATE TABLE `reporting_module_status` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Module Id',
  `name` varchar(255) DEFAULT NULL COMMENT 'Module Name',
  `active` varchar(255) DEFAULT NULL COMMENT 'Module Active Status',
  `setup_version` varchar(255) DEFAULT NULL COMMENT 'Module Version',
  `state` varchar(255) DEFAULT NULL COMMENT 'Module State',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Module Status Table';

--
-- Table structure for table `reporting_orders`
--

CREATE TABLE `reporting_orders` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `total` decimal(20,2) DEFAULT NULL COMMENT 'Total From Store',
  `total_base` decimal(20,2) DEFAULT NULL COMMENT 'Total From Base Currency',
  `item_count` int(10) unsigned NOT NULL COMMENT 'Line Item Count',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Reporting for all orders';

--
-- Table structure for table `reporting_system_updates`
--

CREATE TABLE `reporting_system_updates` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `type` varchar(255) DEFAULT NULL COMMENT 'Update Type',
  `action` varchar(255) DEFAULT NULL COMMENT 'Action Performed',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Reporting for system updates';

--
-- Table structure for table `reporting_users`
--

CREATE TABLE `reporting_users` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
  `type` varchar(255) DEFAULT NULL COMMENT 'User Type',
  `action` varchar(255) DEFAULT NULL COMMENT 'Action Performed',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Reporting for user actions';

--
-- Table structure for table `review`
--

CREATE TABLE `review` (
  `review_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review id',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 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 `REVIEW_ENTITY_ID` (`entity_id`),
  KEY `REVIEW_STATUS_ID` (`status_id`),
  KEY `REVIEW_ENTITY_PK_VALUE` (`entity_pk_value`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COMMENT='Review base information';

--
-- Dumping data for table `review`
--

INSERT INTO `review` VALUES (6,'2016-07-21 09:20:43',1,'50',1),(18,'2016-07-21 09:29:25',1,'24',1),(19,'2016-07-21 09:29:43',1,'23',1),(20,'2016-07-21 09:29:57',1,'21',1),(21,'2016-07-21 09:30:18',1,'20',1),(22,'2016-07-21 09:31:44',1,'19',1),(23,'2016-07-21 09:32:03',1,'18',1),(24,'2016-07-21 09:32:21',1,'17',1),(25,'2016-07-21 09:32:40',1,'10',1),(26,'2016-07-21 09:33:55',1,'9',1),(27,'2016-07-21 09:34:16',1,'2',1),(28,'2016-07-21 09:34:35',1,'25',1),(29,'2016-07-21 09:35:07',1,'26',1),(31,'2016-07-21 09:36:31',1,'37',1),(32,'2016-07-21 09:37:02',1,'36',1),(33,'2016-07-21 09:37:37',1,'35',1),(34,'2016-07-21 09:38:20',1,'34',1),(35,'2016-07-21 09:38:43',1,'33',1),(36,'2016-07-21 09:39:24',1,'32',1),(37,'2016-07-21 09:39:44',1,'29',1),(38,'2016-07-21 09:40:15',1,'28',1),(39,'2016-07-21 09:40:48',1,'27',1),(40,'2016-07-21 09:41:35',1,'1',1),(41,'2016-09-06 15:05:35',1,'22',1),(42,'2016-09-06 15:05:51',1,'30',1),(43,'2016-09-06 15:06:22',1,'30',1),(44,'2016-09-06 15:08:16',1,'31',1),(45,'2016-09-06 15:09:43',1,'48',1),(46,'2016-09-06 15:09:52',1,'49',1),(47,'2016-09-07 16:32:07',1,'7',1);

--
-- Table structure for table `review_detail`
--

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 `REVIEW_DETAIL_REVIEW_ID` (`review_id`),
  KEY `REVIEW_DETAIL_STORE_ID` (`store_id`),
  KEY `REVIEW_DETAIL_CUSTOMER_ID` (`customer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COMMENT='Review detail information';

--
-- Dumping data for table `review_detail`
--

INSERT INTO `review_detail` VALUES (6,6,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(18,18,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(19,19,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(20,20,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(21,21,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(22,22,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(23,23,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(24,24,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(25,25,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(26,26,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(27,27,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(28,28,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(29,29,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(31,31,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(32,32,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(33,33,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(34,34,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(35,35,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(36,36,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(37,37,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(38,38,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(39,39,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(40,40,1,'Plazathemes','Plazathemes','Plazathemes',NULL),(41,41,1,'plaza','good','plaza',NULL),(42,42,1,'plaza','good','plaza',NULL),(43,43,1,'plaza','good','plaza',NULL),(44,44,1,'plaza','good','plaza',NULL),(45,45,1,'plaza','good','plaza',NULL),(46,46,1,'plaza','good','plaza',NULL),(47,47,1,'plaza','good','plaza',NULL);

--
-- Table structure for table `review_entity`
--

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 AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Review entities';

--
-- Dumping data for table `review_entity`
--

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

--
-- Table structure for table `review_entity_summary`
--

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 `REVIEW_ENTITY_SUMMARY_STORE_ID` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=721 DEFAULT CHARSET=utf8 COMMENT='Review aggregates';

--
-- Dumping data for table `review_entity_summary`
--

INSERT INTO `review_entity_summary` VALUES (81,50,1,1,73,1),(89,50,1,1,73,2),(90,50,1,1,73,3),(91,50,1,1,73,4),(273,24,1,1,53,1),(281,24,1,1,53,2),(282,24,1,1,53,3),(283,24,1,1,53,4),(289,23,1,1,67,1),(297,23,1,1,67,2),(298,23,1,1,67,3),(299,23,1,1,67,4),(305,21,1,1,80,1),(313,21,1,1,80,2),(314,21,1,1,80,3),(315,21,1,1,80,4),(321,20,1,1,73,1),(329,20,1,1,73,2),(330,20,1,1,73,3),(331,20,1,1,73,4),(337,19,1,1,47,1),(345,19,1,1,47,2),(346,19,1,1,47,3),(347,19,1,1,47,4),(353,18,1,1,67,1),(361,18,1,1,67,2),(362,18,1,1,67,3),(363,18,1,1,67,4),(369,17,1,1,60,1),(377,17,1,1,60,2),(378,17,1,1,60,3),(379,17,1,1,60,4),(385,10,1,1,80,1),(393,10,1,1,80,2),(394,10,1,1,80,3),(395,10,1,1,80,4),(401,9,1,1,67,1),(409,9,1,1,67,2),(410,9,1,1,67,3),(411,9,1,1,67,4),(417,2,1,1,67,1),(425,2,1,1,67,2),(426,2,1,1,67,3),(427,2,1,1,67,4),(433,25,1,1,47,1),(441,25,1,1,47,2),(442,25,1,1,47,3),(443,25,1,1,47,4),(449,26,1,1,53,1),(457,26,1,1,53,2),(458,26,1,1,53,3),(459,26,1,1,53,4),(481,37,1,1,67,1),(489,37,1,1,67,2),(490,37,1,1,67,3),(491,37,1,1,67,4),(497,36,1,1,60,1),(505,36,1,1,60,2),(506,36,1,1,60,3),(507,36,1,1,60,4),(513,35,1,1,47,1),(521,35,1,1,47,2),(522,35,1,1,47,3),(523,35,1,1,47,4),(529,34,1,1,53,1),(537,34,1,1,53,2),(538,34,1,1,53,3),(539,34,1,1,53,4),(545,33,1,1,67,1),(553,33,1,1,67,2),(554,33,1,1,67,3),(555,33,1,1,67,4),(561,32,1,1,53,1),(569,32,1,1,53,2),(570,32,1,1,53,3),(571,32,1,1,53,4),(577,29,1,1,60,1),(585,29,1,1,60,2),(586,29,1,1,60,3),(587,29,1,1,60,4),(593,28,1,1,67,1),(601,28,1,1,67,2),(602,28,1,1,67,3),(603,28,1,1,67,4),(609,27,1,1,67,1),(617,27,1,1,67,2),(618,27,1,1,67,3),(619,27,1,1,67,4),(625,1,1,1,67,1),(633,1,1,1,67,2),(634,1,1,1,67,3),(635,1,1,1,67,4),(641,1,1,1,67,0),(642,27,1,1,67,0),(643,28,1,1,67,0),(644,29,1,1,60,0),(645,32,1,1,53,0),(646,34,1,1,53,0),(647,35,1,1,47,0),(648,36,1,1,60,0),(650,26,1,1,53,0),(651,25,1,1,47,0),(652,2,1,1,67,0),(653,9,1,1,67,0),(654,10,1,1,80,0),(655,17,1,1,60,0),(656,19,1,1,47,0),(657,20,1,1,73,0),(658,21,1,1,80,0),(659,23,1,1,67,0),(660,24,1,1,53,0),(670,50,1,1,73,0),(676,33,1,1,67,0),(677,37,1,1,67,0),(678,18,1,1,67,0),(679,22,1,1,67,1),(680,22,1,0,0,2),(681,22,1,0,0,3),(682,22,1,0,0,4),(685,30,1,2,80,1),(686,30,1,0,0,2),(687,30,1,0,0,3),(688,30,1,0,0,4),(691,22,1,1,67,0),(692,30,1,2,80,0),(693,31,1,1,80,1),(694,31,1,0,0,2),(695,31,1,0,0,3),(696,31,1,0,0,4),(699,31,1,1,80,0),(700,48,1,1,87,1),(701,48,1,0,0,2),(702,48,1,0,0,3),(703,48,1,0,0,4),(706,49,1,1,80,1),(707,49,1,0,0,2),(708,49,1,0,0,3),(709,49,1,0,0,4),(712,48,1,1,87,0),(713,49,1,1,80,0),(714,7,1,1,100,1),(715,7,1,0,0,2),(716,7,1,0,0,3),(717,7,1,0,0,4),(720,7,1,1,100,0);

--
-- Table structure for table `review_status`
--

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 AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Review statuses';

--
-- Dumping data for table `review_status`
--

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

--
-- Table structure for table `review_store`
--

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 `REVIEW_STORE_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Review Store';

--
-- Dumping data for table `review_store`
--

INSERT INTO `review_store` VALUES (6,0),(6,1),(6,2),(6,3),(6,4),(18,0),(18,1),(18,2),(18,3),(18,4),(19,0),(19,1),(19,2),(19,3),(19,4),(20,0),(20,1),(20,2),(20,3),(20,4),(21,0),(21,1),(21,2),(21,3),(21,4),(22,0),(22,1),(22,2),(22,3),(22,4),(23,0),(23,1),(23,2),(23,3),(23,4),(24,0),(24,1),(24,2),(24,3),(24,4),(25,0),(25,1),(25,2),(25,3),(25,4),(26,0),(26,1),(26,2),(26,3),(26,4),(27,0),(27,1),(27,2),(27,3),(27,4),(28,0),(28,1),(28,2),(28,3),(28,4),(29,0),(29,1),(29,2),(29,3),(29,4),(31,0),(31,1),(31,2),(31,3),(31,4),(32,0),(32,1),(32,2),(32,3),(32,4),(33,0),(33,1),(33,2),(33,3),(33,4),(34,0),(34,1),(34,2),(34,3),(34,4),(35,0),(35,1),(35,2),(35,3),(35,4),(36,0),(36,1),(36,2),(36,3),(36,4),(37,0),(37,1),(37,2),(37,3),(37,4),(38,0),(38,1),(38,2),(38,3),(38,4),(39,0),(39,1),(39,2),(39,3),(39,4),(40,0),(40,1),(40,2),(40,3),(40,4),(41,0),(41,1),(42,0),(42,1),(43,0),(43,1),(44,0),(44,1),(45,0),(45,1),(46,0),(46,1),(47,0),(47,1);

--
-- Table structure for table `sales_bestsellers_aggregated_daily`
--

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_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 `SALES_BESTSELLERS_AGGREGATED_DAILY_PERIOD_STORE_ID_PRODUCT_ID` (`period`,`store_id`,`product_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_DAILY_STORE_ID` (`store_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_DAILY_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Bestsellers Aggregated Daily';

--
-- Table structure for table `sales_bestsellers_aggregated_monthly`
--

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_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 `SALES_BESTSELLERS_AGGREGATED_MONTHLY_PERIOD_STORE_ID_PRODUCT_ID` (`period`,`store_id`,`product_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_MONTHLY_STORE_ID` (`store_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_MONTHLY_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Bestsellers Aggregated Monthly';

--
-- Table structure for table `sales_bestsellers_aggregated_yearly`
--

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_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 `SALES_BESTSELLERS_AGGREGATED_YEARLY_PERIOD_STORE_ID_PRODUCT_ID` (`period`,`store_id`,`product_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_YEARLY_STORE_ID` (`store_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_YEARLY_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Bestsellers Aggregated Yearly';

--
-- Table structure for table `sales_creditmemo`
--

CREATE TABLE `sales_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',
  `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',
  `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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation 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',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_CREDITMEMO_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_CREDITMEMO_STORE_ID` (`store_id`),
  KEY `SALES_CREDITMEMO_ORDER_ID` (`order_id`),
  KEY `SALES_CREDITMEMO_CREDITMEMO_STATUS` (`creditmemo_status`),
  KEY `SALES_CREDITMEMO_STATE` (`state`),
  KEY `SALES_CREDITMEMO_CREATED_AT` (`created_at`),
  KEY `SALES_CREDITMEMO_UPDATED_AT` (`updated_at`),
  KEY `SALES_CREDITMEMO_SEND_EMAIL` (`send_email`),
  KEY `SALES_CREDITMEMO_EMAIL_SENT` (`email_sent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Creditmemo';

--
-- Table structure for table `sales_creditmemo_comment`
--

CREATE TABLE `sales_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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_CREDITMEMO_COMMENT_CREATED_AT` (`created_at`),
  KEY `SALES_CREDITMEMO_COMMENT_PARENT_ID` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Creditmemo Comment';

--
-- Table structure for table `sales_creditmemo_grid`
--

CREATE TABLE `sales_creditmemo_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity 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',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment Id',
  `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `state` int(11) DEFAULT NULL COMMENT 'Status',
  `base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `order_status` varchar(32) DEFAULT NULL COMMENT 'Order Status',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `customer_name` varchar(128) NOT NULL COMMENT 'Customer Name',
  `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group_id` smallint(6) DEFAULT NULL COMMENT 'Customer Group Id',
  `payment_method` varchar(32) DEFAULT NULL COMMENT 'Payment Method',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(12,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `adjustment_positive` decimal(12,4) DEFAULT NULL COMMENT 'Adjustment Positive',
  `adjustment_negative` decimal(12,4) DEFAULT NULL COMMENT 'Adjustment Negative',
  `order_base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Order Grand Total',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_CREDITMEMO_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `SALES_CREDITMEMO_GRID_CREATED_AT` (`created_at`),
  KEY `SALES_CREDITMEMO_GRID_UPDATED_AT` (`updated_at`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `SALES_CREDITMEMO_GRID_STATE` (`state`),
  KEY `SALES_CREDITMEMO_GRID_BILLING_NAME` (`billing_name`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_STATUS` (`order_status`),
  KEY `SALES_CREDITMEMO_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `SALES_CREDITMEMO_GRID_STORE_ID` (`store_id`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_BASE_GRAND_TOTAL` (`order_base_grand_total`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_ID` (`order_id`),
  FULLTEXT KEY `FTI_32B7BA885941A8254EE84AE650ABDC86` (`increment_id`,`order_increment_id`,`billing_name`,`billing_address`,`shipping_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Creditmemo Grid';

--
-- Table structure for table `sales_creditmemo_item`
--

CREATE TABLE `sales_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',
  `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `tax_ratio` text COMMENT 'Ratio of tax in the creditmemo item over tax of the order item',
  `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',
  `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_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',
  `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 `SALES_CREDITMEMO_ITEM_PARENT_ID` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Creditmemo Item';

--
-- Table structure for table `sales_invoice`
--

CREATE TABLE `sales_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',
  `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',
  `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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation 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',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_INVOICE_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_INVOICE_STORE_ID` (`store_id`),
  KEY `SALES_INVOICE_GRAND_TOTAL` (`grand_total`),
  KEY `SALES_INVOICE_ORDER_ID` (`order_id`),
  KEY `SALES_INVOICE_STATE` (`state`),
  KEY `SALES_INVOICE_CREATED_AT` (`created_at`),
  KEY `SALES_INVOICE_UPDATED_AT` (`updated_at`),
  KEY `SALES_INVOICE_SEND_EMAIL` (`send_email`),
  KEY `SALES_INVOICE_EMAIL_SENT` (`email_sent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Invoice';

--
-- Table structure for table `sales_invoice_comment`
--

CREATE TABLE `sales_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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_INVOICE_COMMENT_CREATED_AT` (`created_at`),
  KEY `SALES_INVOICE_COMMENT_PARENT_ID` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Invoice Comment';

--
-- Table structure for table `sales_invoice_grid`
--

CREATE TABLE `sales_invoice_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity Id',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `state` int(11) DEFAULT NULL COMMENT 'State',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment Id',
  `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',
  `customer_name` varchar(255) DEFAULT NULL COMMENT 'Customer Name',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group_id` smallint(6) DEFAULT NULL COMMENT 'Customer Group Id',
  `payment_method` varchar(128) DEFAULT NULL COMMENT 'Payment Method',
  `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',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(12,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Grand Total',
  `base_grand_total` decimal(12,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_INVOICE_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_INVOICE_GRID_STORE_ID` (`store_id`),
  KEY `SALES_INVOICE_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `SALES_INVOICE_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `SALES_INVOICE_GRID_ORDER_ID` (`order_id`),
  KEY `SALES_INVOICE_GRID_STATE` (`state`),
  KEY `SALES_INVOICE_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `SALES_INVOICE_GRID_CREATED_AT` (`created_at`),
  KEY `SALES_INVOICE_GRID_UPDATED_AT` (`updated_at`),
  KEY `SALES_INVOICE_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `SALES_INVOICE_GRID_BILLING_NAME` (`billing_name`),
  FULLTEXT KEY `FTI_95D9C924DD6A8734EB8B5D01D60F90DE` (`increment_id`,`order_increment_id`,`billing_name`,`billing_address`,`shipping_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Invoice Grid';

--
-- Table structure for table `sales_invoice_item`
--

CREATE TABLE `sales_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',
  `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `tax_ratio` text COMMENT 'Ratio of tax invoiced over tax of the order item',
  `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',
  `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_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',
  `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 `SALES_INVOICE_ITEM_PARENT_ID` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Invoice Item';

--
-- Table structure for table `sales_invoiced_aggregated`
--

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 `SALES_INVOICED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_INVOICED_AGGREGATED_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Invoiced Aggregated';

--
-- Table structure for table `sales_invoiced_aggregated_order`
--

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 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 `SALES_INVOICED_AGGREGATED_ORDER_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_INVOICED_AGGREGATED_ORDER_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Invoiced Aggregated Order';

--
-- Table structure for table `sales_order`
--

CREATE TABLE `sales_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',
  `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',
  `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(32) DEFAULT NULL COMMENT 'Increment Id',
  `applied_rule_ids` varchar(128) DEFAULT NULL COMMENT 'Applied Rule Ids',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',
  `customer_firstname` varchar(128) DEFAULT NULL COMMENT 'Customer Firstname',
  `customer_lastname` varchar(128) DEFAULT NULL COMMENT 'Customer Lastname',
  `customer_middlename` varchar(128) DEFAULT NULL COMMENT 'Customer Middlename',
  `customer_prefix` varchar(32) DEFAULT NULL COMMENT 'Customer Prefix',
  `customer_suffix` varchar(32) DEFAULT NULL COMMENT 'Customer Suffix',
  `customer_taxvat` varchar(32) DEFAULT NULL COMMENT 'Customer Taxvat',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  `ext_customer_id` varchar(32) DEFAULT NULL COMMENT 'Ext Customer Id',
  `ext_order_id` varchar(32) DEFAULT NULL COMMENT 'Ext Order Id',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `hold_before_state` varchar(32) DEFAULT NULL COMMENT 'Hold Before State',
  `hold_before_status` varchar(32) DEFAULT NULL COMMENT 'Hold Before Status',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `original_increment_id` varchar(32) 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(32) DEFAULT NULL COMMENT 'Remote Ip',
  `shipping_method` varchar(32) DEFAULT NULL COMMENT 'Shipping Method',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `store_name` varchar(32) DEFAULT NULL COMMENT 'Store Name',
  `x_forwarded_for` varchar(32) DEFAULT NULL COMMENT 'X Forwarded For',
  `customer_note` text COMMENT 'Customer Note',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP 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',
  `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',
  `discount_tax_compensation_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Invoiced',
  `base_discount_tax_compensation_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Invoiced',
  `discount_tax_compensation_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Refunded',
  `base_discount_tax_compensation_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation 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 `SALES_ORDER_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_ORDER_STATUS` (`status`),
  KEY `SALES_ORDER_STATE` (`state`),
  KEY `SALES_ORDER_STORE_ID` (`store_id`),
  KEY `SALES_ORDER_CREATED_AT` (`created_at`),
  KEY `SALES_ORDER_CUSTOMER_ID` (`customer_id`),
  KEY `SALES_ORDER_EXT_ORDER_ID` (`ext_order_id`),
  KEY `SALES_ORDER_QUOTE_ID` (`quote_id`),
  KEY `SALES_ORDER_UPDATED_AT` (`updated_at`),
  KEY `SALES_ORDER_SEND_EMAIL` (`send_email`),
  KEY `SALES_ORDER_EMAIL_SENT` (`email_sent`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order';

--
-- Dumping data for table `sales_order`
--

INSERT INTO `sales_order` VALUES ('1','new','pending',NULL,'c9eda5','Flat Rate - Fixed',0,1,NULL,'0.0000',NULL,NULL,NULL,'125.0000','15.0000',NULL,NULL,NULL,'0.0000',NULL,'110.0000',NULL,NULL,NULL,'0.0000',NULL,NULL,NULL,'1.0000','1.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0.0000',NULL,NULL,NULL,'125.0000','15.0000',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','110.0000',NULL,NULL,NULL,'0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4.0000',NULL,NULL,NULL,1,1,'2',0,NULL,1,1,NULL,NULL,NULL,'11','1',NULL,NULL,NULL,NULL,'0.0000','110.0000','125.0000',NULL,'0.0000','110.0000','125.0000','0.0000',NULL,'000000001',NULL,'USD','demo@plazathemes.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',NULL,NULL,'USD',NULL,NULL,NULL,NULL,NULL,'127.0.0.1','flatrate_flatrate','USD','Main Website\r\nDigital Store\r\nEng',NULL,NULL,'2016-09-07 10:10:24','2016-09-07 10:10:31',4,NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,'15.0000','15.0000',NULL,'0',NULL),('2','new','pending',NULL,'bb4d96','Flat Rate - Fixed',0,4,NULL,'0.0000',NULL,NULL,NULL,'72.0000','5.0000',NULL,NULL,NULL,'0.0000',NULL,'67.0000',NULL,NULL,NULL,'0.0000',NULL,NULL,NULL,'1.0000','1.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0.0000',NULL,NULL,NULL,'72.0000','5.0000',NULL,NULL,NULL,'0.0000',NULL,'0.0000','0.0000','67.0000',NULL,NULL,NULL,'0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1.0000',NULL,NULL,NULL,1,1,'4',0,NULL,1,1,NULL,NULL,NULL,'18','3',NULL,NULL,NULL,NULL,'0.0000','67.0000','72.0000',NULL,'0.0000','67.0000','72.0000','47.0000',NULL,'4000000001',NULL,'USD','demo@plazathemes.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',NULL,NULL,'USD',NULL,NULL,NULL,NULL,NULL,'192.168.1.92','flatrate_flatrate','USD','Main Website\r\nkitchenware Catego',NULL,NULL,'2016-12-22 09:11:10','2016-12-22 09:11:18',1,NULL,'0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,'5.0000','5.0000',NULL,'0',NULL);

--
-- Table structure for table `sales_order_address`
--

CREATE TABLE `sales_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 'Phone Number',
  `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 `SALES_ORDER_ADDRESS_PARENT_ID` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Address';

--
-- Dumping data for table `sales_order_address`
--

INSERT INTO `sales_order_address` VALUES ('1','1',NULL,NULL,NULL,NULL,NULL,NULL,'220000','VAN TOAN','DOI LANH-DONG SON-YEN THE-BAC GIANG\r\nBAC GIANG','BAC GIANG','demo@plazathemes.com','979656070','VN','DO','shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('2','1',NULL,NULL,NULL,NULL,NULL,NULL,'220000','VAN TOAN','DOI LANH-DONG SON-YEN THE-BAC GIANG\r\nBAC GIANG','BAC GIANG','demo@plazathemes.com','979656070','VN','DO','billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('3','2',NULL,NULL,'5',NULL,NULL,'Arkansas','plaza','themes','demo@plazathemes.com\r\ndemo@plazathemes.com','themes','demo@plazathemes.com','123456789','US','plaza','shipping',NULL,NULL,NULL,'plazathemes',NULL,NULL,NULL,NULL,NULL),('4','2',NULL,NULL,'5',NULL,NULL,'Arkansas','plaza','themes','demo@plazathemes.com\r\ndemo@plazathemes.com','themes','demo@plazathemes.com','123456789','US','plaza','billing',NULL,NULL,NULL,'plazathemes',NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `sales_order_aggregated_created`
--

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 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 `SALES_ORDER_AGGREGATED_CREATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_ORDER_AGGREGATED_CREATED_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Aggregated Created';

--
-- Table structure for table `sales_order_aggregated_updated`
--

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 `SALES_ORDER_AGGREGATED_UPDATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_ORDER_AGGREGATED_UPDATED_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Aggregated Updated';

--
-- Table structure for table `sales_order_grid`
--

CREATE TABLE `sales_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',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group` varchar(255) DEFAULT NULL COMMENT 'Customer Group',
  `subtotal` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(12,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `customer_name` varchar(255) DEFAULT NULL COMMENT 'Customer Name',
  `payment_method` varchar(255) DEFAULT NULL COMMENT 'Payment Method',
  `total_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Total Refunded',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_ORDER_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_ORDER_GRID_STATUS` (`status`),
  KEY `SALES_ORDER_GRID_STORE_ID` (`store_id`),
  KEY `SALES_ORDER_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `SALES_ORDER_GRID_BASE_TOTAL_PAID` (`base_total_paid`),
  KEY `SALES_ORDER_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `SALES_ORDER_GRID_TOTAL_PAID` (`total_paid`),
  KEY `SALES_ORDER_GRID_SHIPPING_NAME` (`shipping_name`),
  KEY `SALES_ORDER_GRID_BILLING_NAME` (`billing_name`),
  KEY `SALES_ORDER_GRID_CREATED_AT` (`created_at`),
  KEY `SALES_ORDER_GRID_CUSTOMER_ID` (`customer_id`),
  KEY `SALES_ORDER_GRID_UPDATED_AT` (`updated_at`),
  FULLTEXT KEY `FTI_65B9E9925EC58F0C7C2E2F6379C233E7` (`increment_id`,`billing_name`,`shipping_name`,`shipping_address`,`billing_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Grid';

--
-- Dumping data for table `sales_order_grid`
--

INSERT INTO `sales_order_grid` VALUES ('1','pending',1,'Main Website\r\nDigital Store\r\nEng',NULL,'125.0000',NULL,'125.0000',NULL,'000000001','USD','USD','DO VAN TOAN','DO VAN TOAN','2016-09-07 10:10:24','2016-09-07 10:10:25','DOI LANH-DONG SON-YEN THE-BAC GIANG\r\nBAC GIANG BAC GIANG 220000','DOI LANH-DONG SON-YEN THE-BAC GIANG\r\nBAC GIANG BAC GIANG 220000','Flat Rate - Fixed','demo@plazathemes.com','0','110.0000','15.0000','','checkmo',NULL),('2','pending',4,'Main Website\r\nkitchenware Catego',NULL,'72.0000',NULL,'72.0000',NULL,'4000000001','USD','USD','plaza themes','plaza themes','2016-12-22 09:11:10','2016-12-22 09:11:10','demo@plazathemes.com\r\ndemo@plazathemes.com themes Arkansas plaza','demo@plazathemes.com\r\ndemo@plazathemes.com themes Arkansas plaza','Flat Rate - Fixed','demo@plazathemes.com','0','67.0000','5.0000','','checkmo',NULL);

--
-- Table structure for table `sales_order_item`
--

CREATE TABLE `sales_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 CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP 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',
  `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',
  `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `discount_tax_compensation_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Invoiced',
  `base_discount_tax_compensation_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Invoiced',
  `discount_tax_compensation_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Refunded',
  `base_discount_tax_compensation_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Refunded',
  `tax_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Tax Canceled',
  `discount_tax_compensation_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation 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',
  `free_shipping` smallint(6) DEFAULT NULL,
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message Id',
  `gift_message_available` int(11) DEFAULT NULL COMMENT 'Gift Message Available',
  `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',
  `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_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',
  `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 `SALES_ORDER_ITEM_ORDER_ID` (`order_id`),
  KEY `SALES_ORDER_ITEM_STORE_ID` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Item';

--
-- Dumping data for table `sales_order_item`
--

INSERT INTO `sales_order_item` VALUES ('1','1',NULL,'16',1,'2016-09-07 10:10:24','2016-09-07 10:10:24','19','simple','a:1:{s:15:\"info_buyRequest\";a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"19\";s:3:\"qty\";d:1;}}',NULL,0,'24-MB03','Crown Summit Backpack',NULL,NULL,NULL,0,0,NULL,'0.0000','0.0000','1.0000','0.0000','0.0000','40.0000','38.0000','38.0000','38.0000','38.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','38.0000','38.0000','0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,'38.0000','38.0000','38.0000','38.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('2','1',NULL,'17',1,'2016-09-07 10:10:24','2016-09-07 10:10:24','7','virtual','a:1:{s:15:\"info_buyRequest\";a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:1:\"7\";s:3:\"qty\";d:1;}}',NULL,1,'MH01-Black','MH01-Black',NULL,NULL,NULL,0,0,NULL,'0.0000','0.0000','1.0000','0.0000','0.0000',NULL,'52.0000','52.0000','52.0000','52.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','52.0000','52.0000','0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,'52.0000','52.0000','52.0000','52.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('3','1',NULL,'18',1,'2016-09-07 10:10:24','2016-09-07 10:10:24','37','simple','a:1:{s:15:\"info_buyRequest\";a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"37\";s:3:\"qty\";d:1;}}',NULL,0,'25-UG04','Zing Jump Rope',NULL,NULL,NULL,0,0,NULL,'0.0000','0.0000','1.0000','0.0000','0.0000',NULL,'12.0000','12.0000','12.0000','12.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','12.0000','12.0000','0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,'12.0000','12.0000','12.0000','12.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('4','1',NULL,'19',1,'2016-09-07 10:10:24','2016-09-07 10:10:24','36','simple','a:1:{s:15:\"info_buyRequest\";a:3:{s:4:\"uenc\";s:40:\"aHR0cDovLzEyNy4wLjAuMS9tYV9yYXBpZGVuLw,,\";s:7:\"product\";s:2:\"36\";s:3:\"qty\";d:1;}}',NULL,0,'25-UG07','Dual Handle Cardio Ball',NULL,NULL,NULL,0,0,NULL,'0.0000','0.0000','1.0000','0.0000','0.0000',NULL,'8.0000','8.0000','12.0000','12.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','8.0000','8.0000','0.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,'8.0000','8.0000','8.0000','8.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),('5','2',NULL,'33',4,'2016-12-22 09:11:10','2016-12-22 09:11:10','65','simple','a:1:{s:15:\"info_buyRequest\";a:3:{s:4:\"uenc\";s:56:\"aHR0cDovLzE5Mi4xNjguMS45Mi9tYV90aGViZWxsL2VuZ2xpc2g0Lw,,\";s:7:\"product\";s:2:\"65\";s:3:\"qty\";d:1;}}','47.0000',0,'5pc Knife Block Set','5pc Knife Block Set',NULL,NULL,NULL,0,0,NULL,'0.0000','0.0000','1.0000','0.0000','0.0000',NULL,'67.0000','67.0000','67.0000','67.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','67.0000','67.0000','0.0000','0.0000','47.0000',NULL,NULL,NULL,NULL,NULL,'67.0000','67.0000','67.0000','67.0000','0.0000','0.0000',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `sales_order_payment`
--

CREATE TABLE `sales_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(12) DEFAULT NULL COMMENT 'Cc Exp Month',
  `cc_ss_start_year` varchar(12) DEFAULT NULL COMMENT 'Cc Ss Start Year',
  `echeck_bank_name` varchar(128) DEFAULT NULL COMMENT 'Echeck Bank Name',
  `method` varchar(128) DEFAULT NULL COMMENT 'Method',
  `cc_debug_request_body` varchar(32) DEFAULT NULL COMMENT 'Cc Debug Request Body',
  `cc_secure_verify` varchar(32) DEFAULT NULL COMMENT 'Cc Secure Verify',
  `protection_eligibility` varchar(32) DEFAULT NULL COMMENT 'Protection Eligibility',
  `cc_approval` varchar(32) DEFAULT NULL COMMENT 'Cc Approval',
  `cc_last_4` varchar(100) DEFAULT NULL COMMENT 'Cc Last 4',
  `cc_status_description` varchar(32) DEFAULT NULL COMMENT 'Cc Status Description',
  `echeck_type` varchar(32) DEFAULT NULL COMMENT 'Echeck Type',
  `cc_debug_response_serialized` varchar(32) DEFAULT NULL COMMENT 'Cc Debug Response Serialized',
  `cc_ss_start_month` varchar(128) DEFAULT NULL COMMENT 'Cc Ss Start Month',
  `echeck_account_type` varchar(255) DEFAULT NULL COMMENT 'Echeck Account Type',
  `last_trans_id` varchar(32) DEFAULT NULL COMMENT 'Last Trans Id',
  `cc_cid_status` varchar(32) DEFAULT NULL COMMENT 'Cc Cid Status',
  `cc_owner` varchar(128) DEFAULT NULL COMMENT 'Cc Owner',
  `cc_type` varchar(32) DEFAULT NULL COMMENT 'Cc Type',
  `po_number` varchar(32) DEFAULT NULL COMMENT 'Po Number',
  `cc_exp_year` varchar(4) DEFAULT NULL COMMENT 'Cc Exp Year',
  `cc_status` varchar(4) DEFAULT NULL COMMENT 'Cc Status',
  `echeck_routing_number` varchar(32) DEFAULT NULL COMMENT 'Echeck Routing Number',
  `account_status` varchar(32) DEFAULT NULL COMMENT 'Account Status',
  `anet_trans_method` varchar(32) DEFAULT NULL COMMENT 'Anet Trans Method',
  `cc_debug_response_body` varchar(32) DEFAULT NULL COMMENT 'Cc Debug Response Body',
  `cc_ss_issue` varchar(32) DEFAULT NULL COMMENT 'Cc Ss Issue',
  `echeck_account_name` varchar(32) DEFAULT NULL COMMENT 'Echeck Account Name',
  `cc_avs_status` varchar(32) DEFAULT NULL COMMENT 'Cc Avs Status',
  `cc_number_enc` varchar(32) DEFAULT NULL COMMENT 'Cc Number Enc',
  `cc_trans_id` varchar(32) DEFAULT NULL COMMENT 'Cc Trans Id',
  `address_status` varchar(32) DEFAULT NULL COMMENT 'Address Status',
  `additional_information` text COMMENT 'Additional Information',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_ORDER_PAYMENT_PARENT_ID` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Payment';

--
-- Dumping data for table `sales_order_payment`
--

INSERT INTO `sales_order_payment` VALUES ('1','1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'15.0000','15.0000',NULL,NULL,'125.0000',NULL,NULL,NULL,'125.0000',NULL,NULL,NULL,NULL,NULL,NULL,'checkmo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'a:3:{s:12:\"method_title\";s:19:\"Check / Money order\";s:10:\"payable_to\";N;s:15:\"mailing_address\";N;}'),('2','2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'5.0000','5.0000',NULL,NULL,'72.0000',NULL,NULL,NULL,'72.0000',NULL,NULL,NULL,NULL,NULL,NULL,'checkmo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'a:3:{s:12:\"method_title\";s:19:\"Check / Money order\";s:10:\"payable_to\";N;s:15:\"mailing_address\";N;}');

--
-- Table structure for table `sales_order_status`
--

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';

--
-- Dumping data for table `sales_order_status`
--

INSERT INTO `sales_order_status` VALUES ('canceled','Canceled'),('closed','Closed'),('complete','Complete'),('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');

--
-- Table structure for table `sales_order_status_history`
--

CREATE TABLE `sales_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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `entity_name` varchar(32) DEFAULT NULL COMMENT 'Shows what entity history is bind to.',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_ORDER_STATUS_HISTORY_PARENT_ID` (`parent_id`),
  KEY `SALES_ORDER_STATUS_HISTORY_CREATED_AT` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Order Status History';

--
-- Table structure for table `sales_order_status_label`
--

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 `SALES_ORDER_STATUS_LABEL_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Status Label Table';

--
-- Table structure for table `sales_order_status_state`
--

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',
  `visible_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Visible on front',
  PRIMARY KEY (`status`,`state`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Status Table';

--
-- Dumping data for table `sales_order_status_state`
--

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

--
-- Table structure for table `sales_order_tax`
--

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',
  PRIMARY KEY (`tax_id`),
  KEY `SALES_ORDER_TAX_ORDER_ID_PRIORITY_POSITION` (`order_id`,`priority`,`position`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Tax Table';

--
-- Table structure for table `sales_order_tax_item`
--

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 DEFAULT NULL COMMENT 'Item Id',
  `tax_percent` decimal(12,4) NOT NULL COMMENT 'Real Tax Percent For Item',
  `amount` decimal(12,4) NOT NULL COMMENT 'Tax amount for the item and tax rate',
  `base_amount` decimal(12,4) NOT NULL COMMENT 'Base tax amount for the item and tax rate',
  `real_amount` decimal(12,4) NOT NULL COMMENT 'Real tax amount for the item and tax rate',
  `real_base_amount` decimal(12,4) NOT NULL COMMENT 'Real base tax amount for the item and tax rate',
  `associated_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Id of the associated item',
  `taxable_item_type` varchar(32) NOT NULL COMMENT 'Type of the taxable item',
  PRIMARY KEY (`tax_item_id`),
  UNIQUE KEY `SALES_ORDER_TAX_ITEM_TAX_ID_ITEM_ID` (`tax_id`,`item_id`),
  KEY `SALES_ORDER_TAX_ITEM_ITEM_ID` (`item_id`),
  KEY `SALES_ORDER_TAX_ITEM_ASSOCIATED_ITEM_ID_SALES_ORDER_ITEM_ITEM_ID` (`associated_item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Tax Item';

--
-- Table structure for table `sales_payment_transaction`
--

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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`transaction_id`),
  UNIQUE KEY `SALES_PAYMENT_TRANSACTION_ORDER_ID_PAYMENT_ID_TXN_ID` (`order_id`,`payment_id`,`txn_id`),
  KEY `SALES_PAYMENT_TRANSACTION_PARENT_ID` (`parent_id`),
  KEY `SALES_PAYMENT_TRANSACTION_PAYMENT_ID` (`payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Payment Transaction';

--
-- Table structure for table `sales_refunded_aggregated`
--

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 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 `SALES_REFUNDED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_REFUNDED_AGGREGATED_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Refunded Aggregated';

--
-- Table structure for table `sales_refunded_aggregated_order`
--

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 `SALES_REFUNDED_AGGREGATED_ORDER_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_REFUNDED_AGGREGATED_ORDER_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Refunded Aggregated Order';

--
-- Table structure for table `sales_sequence_meta`
--

CREATE TABLE `sales_sequence_meta` (
  `meta_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `entity_type` varchar(32) NOT NULL COMMENT 'Prefix',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store Id',
  `sequence_table` varchar(32) NOT NULL COMMENT 'table for sequence',
  PRIMARY KEY (`meta_id`),
  UNIQUE KEY `SALES_SEQUENCE_META_ENTITY_TYPE_STORE_ID` (`entity_type`,`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8 COMMENT='sales_sequence_meta';

--
-- Dumping data for table `sales_sequence_meta`
--

INSERT INTO `sales_sequence_meta` VALUES ('1','order',0,'sequence_order_0'),('2','invoice',0,'sequence_invoice_0'),('3','creditmemo',0,'sequence_creditmemo_0'),('4','shipment',0,'sequence_shipment_0'),('5','order',1,'sequence_order_1'),('6','invoice',1,'sequence_invoice_1'),('7','creditmemo',1,'sequence_creditmemo_1'),('8','shipment',1,'sequence_shipment_1'),('9','order',2,'sequence_order_2'),('10','invoice',2,'sequence_invoice_2'),('11','creditmemo',2,'sequence_creditmemo_2'),('12','shipment',2,'sequence_shipment_2'),('13','order',3,'sequence_order_3'),('14','invoice',3,'sequence_invoice_3'),('15','creditmemo',3,'sequence_creditmemo_3'),('16','shipment',3,'sequence_shipment_3'),('17','order',4,'sequence_order_4'),('18','invoice',4,'sequence_invoice_4'),('19','creditmemo',4,'sequence_creditmemo_4'),('20','shipment',4,'sequence_shipment_4'),('21','order',5,'sequence_order_5'),('22','invoice',5,'sequence_invoice_5'),('23','creditmemo',5,'sequence_creditmemo_5'),('24','shipment',5,'sequence_shipment_5'),('25','order',6,'sequence_order_6'),('26','invoice',6,'sequence_invoice_6'),('27','creditmemo',6,'sequence_creditmemo_6'),('28','shipment',6,'sequence_shipment_6'),('29','order',7,'sequence_order_7'),('30','invoice',7,'sequence_invoice_7'),('31','creditmemo',7,'sequence_creditmemo_7'),('32','shipment',7,'sequence_shipment_7'),('33','order',8,'sequence_order_8'),('34','invoice',8,'sequence_invoice_8'),('35','creditmemo',8,'sequence_creditmemo_8'),('36','shipment',8,'sequence_shipment_8'),('37','order',9,'sequence_order_9'),('38','invoice',9,'sequence_invoice_9'),('39','creditmemo',9,'sequence_creditmemo_9'),('40','shipment',9,'sequence_shipment_9'),('41','order',10,'sequence_order_10'),('42','invoice',10,'sequence_invoice_10'),('43','creditmemo',10,'sequence_creditmemo_10'),('44','shipment',10,'sequence_shipment_10'),('45','order',11,'sequence_order_11'),('46','invoice',11,'sequence_invoice_11'),('47','creditmemo',11,'sequence_creditmemo_11'),('48','shipment',11,'sequence_shipment_11'),('49','order',12,'sequence_order_12'),('50','invoice',12,'sequence_invoice_12'),('51','creditmemo',12,'sequence_creditmemo_12'),('52','shipment',12,'sequence_shipment_12'),('53','order',13,'sequence_order_13'),('54','invoice',13,'sequence_invoice_13'),('55','creditmemo',13,'sequence_creditmemo_13'),('56','shipment',13,'sequence_shipment_13'),('57','order',14,'sequence_order_14'),('58','invoice',14,'sequence_invoice_14'),('59','creditmemo',14,'sequence_creditmemo_14'),('60','shipment',14,'sequence_shipment_14'),('61','order',15,'sequence_order_15'),('62','invoice',15,'sequence_invoice_15'),('63','creditmemo',15,'sequence_creditmemo_15'),('64','shipment',15,'sequence_shipment_15'),('65','order',16,'sequence_order_16'),('66','invoice',16,'sequence_invoice_16'),('67','creditmemo',16,'sequence_creditmemo_16'),('68','shipment',16,'sequence_shipment_16');

--
-- Table structure for table `sales_sequence_profile`
--

CREATE TABLE `sales_sequence_profile` (
  `profile_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `meta_id` int(10) unsigned NOT NULL COMMENT 'Meta_id',
  `prefix` varchar(32) DEFAULT NULL COMMENT 'Prefix',
  `suffix` varchar(32) DEFAULT NULL COMMENT 'Suffix',
  `start_value` int(10) unsigned NOT NULL DEFAULT '1' COMMENT 'Start value for sequence',
  `step` int(10) unsigned NOT NULL DEFAULT '1' COMMENT 'Step for sequence',
  `max_value` int(10) unsigned NOT NULL COMMENT 'MaxValue for sequence',
  `warning_value` int(10) unsigned NOT NULL COMMENT 'WarningValue for sequence',
  `is_active` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'isActive flag',
  PRIMARY KEY (`profile_id`),
  UNIQUE KEY `SALES_SEQUENCE_PROFILE_META_ID_PREFIX_SUFFIX` (`meta_id`,`prefix`,`suffix`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8 COMMENT='sales_sequence_profile';

--
-- Dumping data for table `sales_sequence_profile`
--

INSERT INTO `sales_sequence_profile` VALUES ('1','1',NULL,NULL,'1','1','0','0',1),('2','2',NULL,NULL,'1','1','0','0',1),('3','3',NULL,NULL,'1','1','0','0',1),('4','4',NULL,NULL,'1','1','0','0',1),('5','5',NULL,NULL,'1','1','0','0',1),('6','6',NULL,NULL,'1','1','0','0',1),('7','7',NULL,NULL,'1','1','0','0',1),('8','8',NULL,NULL,'1','1','0','0',1),('9','9','2',NULL,'1','1','0','0',1),('10','10','2',NULL,'1','1','0','0',1),('11','11','2',NULL,'1','1','0','0',1),('12','12','2',NULL,'1','1','0','0',1),('13','13','3',NULL,'1','1','0','0',1),('14','14','3',NULL,'1','1','0','0',1),('15','15','3',NULL,'1','1','0','0',1),('16','16','3',NULL,'1','1','0','0',1),('17','17','4',NULL,'1','1','0','0',1),('18','18','4',NULL,'1','1','0','0',1),('19','19','4',NULL,'1','1','0','0',1),('20','20','4',NULL,'1','1','0','0',1),('21','21','5',NULL,'1','1','0','0',1),('22','22','5',NULL,'1','1','0','0',1),('23','23','5',NULL,'1','1','0','0',1),('24','24','5',NULL,'1','1','0','0',1),('25','25','6',NULL,'1','1','0','0',1),('26','26','6',NULL,'1','1','0','0',1),('27','27','6',NULL,'1','1','0','0',1),('28','28','6',NULL,'1','1','0','0',1),('29','29','7',NULL,'1','1','0','0',1),('30','30','7',NULL,'1','1','0','0',1),('31','31','7',NULL,'1','1','0','0',1),('32','32','7',NULL,'1','1','0','0',1),('33','33','8',NULL,'1','1','0','0',1),('34','34','8',NULL,'1','1','0','0',1),('35','35','8',NULL,'1','1','0','0',1),('36','36','8',NULL,'1','1','0','0',1),('37','37','9',NULL,'1','1','0','0',1),('38','38','9',NULL,'1','1','0','0',1),('39','39','9',NULL,'1','1','0','0',1),('40','40','9',NULL,'1','1','0','0',1),('41','41','10',NULL,'1','1','0','0',1),('42','42','10',NULL,'1','1','0','0',1),('43','43','10',NULL,'1','1','0','0',1),('44','44','10',NULL,'1','1','0','0',1),('45','45','11',NULL,'1','1','0','0',1),('46','46','11',NULL,'1','1','0','0',1),('47','47','11',NULL,'1','1','0','0',1),('48','48','11',NULL,'1','1','0','0',1),('49','49','12',NULL,'1','1','0','0',1),('50','50','12',NULL,'1','1','0','0',1),('51','51','12',NULL,'1','1','0','0',1),('52','52','12',NULL,'1','1','0','0',1),('53','53','13',NULL,'1','1','0','0',1),('54','54','13',NULL,'1','1','0','0',1),('55','55','13',NULL,'1','1','0','0',1),('56','56','13',NULL,'1','1','0','0',1),('57','57','14',NULL,'1','1','0','0',1),('58','58','14',NULL,'1','1','0','0',1),('59','59','14',NULL,'1','1','0','0',1),('60','60','14',NULL,'1','1','0','0',1),('61','61','15',NULL,'1','1','0','0',1),('62','62','15',NULL,'1','1','0','0',1),('63','63','15',NULL,'1','1','0','0',1),('64','64','15',NULL,'1','1','0','0',1),('65','65','16',NULL,'1','1','0','0',1),('66','66','16',NULL,'1','1','0','0',1),('67','67','16',NULL,'1','1','0','0',1),('68','68','16',NULL,'1','1','0','0',1);

--
-- Table structure for table `sales_shipment`
--

CREATE TABLE `sales_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',
  `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',
  `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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `packages` text COMMENT 'Packed Products in Packages',
  `shipping_label` mediumblob COMMENT 'Shipping Label Content',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_SHIPMENT_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_SHIPMENT_STORE_ID` (`store_id`),
  KEY `SALES_SHIPMENT_TOTAL_QTY` (`total_qty`),
  KEY `SALES_SHIPMENT_ORDER_ID` (`order_id`),
  KEY `SALES_SHIPMENT_CREATED_AT` (`created_at`),
  KEY `SALES_SHIPMENT_UPDATED_AT` (`updated_at`),
  KEY `SALES_SHIPMENT_SEND_EMAIL` (`send_email`),
  KEY `SALES_SHIPMENT_EMAIL_SENT` (`email_sent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment';

--
-- Table structure for table `sales_shipment_comment`
--

CREATE TABLE `sales_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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_SHIPMENT_COMMENT_CREATED_AT` (`created_at`),
  KEY `SALES_SHIPMENT_COMMENT_PARENT_ID` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment Comment';

--
-- Table structure for table `sales_shipment_grid`
--

CREATE TABLE `sales_shipment_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity Id',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_increment_id` varchar(32) NOT NULL COMMENT 'Order Increment Id',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `order_created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Order Increment Id',
  `customer_name` varchar(128) NOT NULL COMMENT 'Customer Name',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `shipment_status` int(11) DEFAULT NULL COMMENT 'Shipment Status',
  `order_status` varchar(32) DEFAULT NULL COMMENT 'Order',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `billing_name` varchar(128) DEFAULT NULL COMMENT 'Billing Name',
  `shipping_name` varchar(128) DEFAULT NULL COMMENT 'Shipping Name',
  `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group_id` smallint(6) DEFAULT NULL COMMENT 'Customer Group Id',
  `payment_method` varchar(32) DEFAULT NULL COMMENT 'Payment Method',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method 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 `SALES_SHIPMENT_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_SHIPMENT_GRID_STORE_ID` (`store_id`),
  KEY `SALES_SHIPMENT_GRID_TOTAL_QTY` (`total_qty`),
  KEY `SALES_SHIPMENT_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `SALES_SHIPMENT_GRID_SHIPMENT_STATUS` (`shipment_status`),
  KEY `SALES_SHIPMENT_GRID_ORDER_STATUS` (`order_status`),
  KEY `SALES_SHIPMENT_GRID_CREATED_AT` (`created_at`),
  KEY `SALES_SHIPMENT_GRID_UPDATED_AT` (`updated_at`),
  KEY `SALES_SHIPMENT_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `SALES_SHIPMENT_GRID_SHIPPING_NAME` (`shipping_name`),
  KEY `SALES_SHIPMENT_GRID_BILLING_NAME` (`billing_name`),
  FULLTEXT KEY `FTI_086B40C8955F167B8EA76653437879B4` (`increment_id`,`order_increment_id`,`shipping_name`,`customer_name`,`customer_email`,`billing_address`,`shipping_address`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment Grid';

--
-- Table structure for table `sales_shipment_item`
--

CREATE TABLE `sales_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 `SALES_SHIPMENT_ITEM_PARENT_ID` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment Item';

--
-- Table structure for table `sales_shipment_track`
--

CREATE TABLE `sales_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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_SHIPMENT_TRACK_PARENT_ID` (`parent_id`),
  KEY `SALES_SHIPMENT_TRACK_ORDER_ID` (`order_id`),
  KEY `SALES_SHIPMENT_TRACK_CREATED_AT` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Flat Shipment Track';

--
-- Table structure for table `sales_shipping_aggregated`
--

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 `SALES_SHPP_AGGRED_PERIOD_STORE_ID_ORDER_STS_SHPP_DESCRIPTION` (`period`,`store_id`,`order_status`,`shipping_description`),
  KEY `SALES_SHIPPING_AGGREGATED_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Shipping Aggregated';

--
-- Table structure for table `sales_shipping_aggregated_order`
--

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 `UNQ_C05FAE47282EEA68654D0924E946761F` (`period`,`store_id`,`order_status`,`shipping_description`),
  KEY `SALES_SHIPPING_AGGREGATED_ORDER_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Shipping Aggregated Order';

--
-- Table structure for table `salesrule`
--

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 COMMENT 'From',
  `to_date` date DEFAULT NULL COMMENT 'To',
  `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 DEFAULT '0' COMMENT 'Discount Step',
  `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 'User Per Coupon',
  `simple_free_shipping` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`rule_id`),
  KEY `SALESRULE_IS_ACTIVE_SORT_ORDER_TO_DATE_FROM_DATE` (`is_active`,`sort_order`,`to_date`,`from_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Salesrule';

--
-- Table structure for table `salesrule_coupon`
--

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 NULL DEFAULT NULL COMMENT 'Coupon Code Creation Date',
  `type` smallint(6) DEFAULT '0' COMMENT 'Coupon Code Type',
  PRIMARY KEY (`coupon_id`),
  UNIQUE KEY `SALESRULE_COUPON_CODE` (`code`),
  UNIQUE KEY `SALESRULE_COUPON_RULE_ID_IS_PRIMARY` (`rule_id`,`is_primary`),
  KEY `SALESRULE_COUPON_RULE_ID` (`rule_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Salesrule Coupon';

--
-- Table structure for table `salesrule_coupon_aggregated`
--

CREATE TABLE `salesrule_coupon_aggregated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date NOT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `coupon_code` varchar(50) DEFAULT NULL COMMENT 'Coupon Code',
  `coupon_uses` int(11) NOT NULL DEFAULT '0' COMMENT 'Coupon Uses',
  `subtotal_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `total_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount',
  `subtotal_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount Actual',
  `discount_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount Actual',
  `total_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount Actual',
  `rule_name` varchar(255) DEFAULT NULL COMMENT 'Rule Name',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALESRULE_COUPON_AGGRED_PERIOD_STORE_ID_ORDER_STS_COUPON_CODE` (`period`,`store_id`,`order_status`,`coupon_code`),
  KEY `SALESRULE_COUPON_AGGREGATED_STORE_ID` (`store_id`),
  KEY `SALESRULE_COUPON_AGGREGATED_RULE_NAME` (`rule_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Coupon Aggregated';

--
-- Table structure for table `salesrule_coupon_aggregated_order`
--

CREATE TABLE `salesrule_coupon_aggregated_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date NOT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `coupon_code` varchar(50) DEFAULT NULL COMMENT 'Coupon Code',
  `coupon_uses` int(11) NOT NULL DEFAULT '0' COMMENT 'Coupon Uses',
  `subtotal_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `total_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount',
  `rule_name` varchar(255) DEFAULT NULL COMMENT 'Rule Name',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_1094D1FBBCBB11704A29DEF3ACC37D2B` (`period`,`store_id`,`order_status`,`coupon_code`),
  KEY `SALESRULE_COUPON_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  KEY `SALESRULE_COUPON_AGGREGATED_ORDER_RULE_NAME` (`rule_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Coupon Aggregated Order';

--
-- Table structure for table `salesrule_coupon_aggregated_updated`
--

CREATE TABLE `salesrule_coupon_aggregated_updated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `period` date NOT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `coupon_code` varchar(50) DEFAULT NULL COMMENT 'Coupon Code',
  `coupon_uses` int(11) NOT NULL DEFAULT '0' COMMENT 'Coupon Uses',
  `subtotal_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `total_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount',
  `subtotal_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount Actual',
  `discount_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount Actual',
  `total_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount Actual',
  `rule_name` varchar(255) DEFAULT NULL COMMENT 'Rule Name',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_7196FA120A4F0F84E1B66605E87E213E` (`period`,`store_id`,`order_status`,`coupon_code`),
  KEY `SALESRULE_COUPON_AGGREGATED_UPDATED_STORE_ID` (`store_id`),
  KEY `SALESRULE_COUPON_AGGREGATED_UPDATED_RULE_NAME` (`rule_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Salesrule Coupon Aggregated Updated';

--
