MariaDB [(none)]> show create table spartoo.orders\G
|
|
Table: orders
|
Create Table: CREATE TABLE `orders` (
|
`orders_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
`orders_id_crypt` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_id` int(10) unsigned NOT NULL DEFAULT 0,
|
`customers_firstname` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_lastname` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_company` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_street_address` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_suburb` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_city` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_postcode` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_state` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_country` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_country_id` smallint(5) unsigned NOT NULL,
|
`customers_country_id_new` smallint(5) unsigned DEFAULT NULL,
|
`customers_telephone` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_email_address` varchar(96) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`customers_address_format_id` tinyint(3) unsigned NOT NULL DEFAULT 0,
|
`delivery_firstname` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`delivery_lastname` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`delivery_company` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`delivery_street_address` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`delivery_suburb` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`delivery_city` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`delivery_postcode` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`delivery_state` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`delivery_country` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`delivery_country_id` smallint(5) unsigned NOT NULL,
|
`delivery_country_id_new` smallint(5) unsigned DEFAULT NULL,
|
`delivery_address_format_id` tinyint(3) unsigned NOT NULL DEFAULT 0,
|
`payment_method` tinyint(3) unsigned NOT NULL,
|
`payment_price` decimal(10,2) NOT NULL DEFAULT 0.00,
|
`last_modified` datetime DEFAULT NULL,
|
`date_purchased` datetime DEFAULT NULL,
|
`orders_status` smallint(5) unsigned NOT NULL DEFAULT 0,
|
`order_date_sent` datetime DEFAULT NULL,
|
`order_date_trac` datetime DEFAULT NULL,
|
`currency` varchar(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
`currency_id` tinyint(4) NOT NULL DEFAULT 0,
|
`currency_rate` decimal(10,4) NOT NULL DEFAULT 1.0000,
|
`vat_id` tinyint(3) unsigned NOT NULL DEFAULT 1,
|
`test_AB` tinyint(3) unsigned NOT NULL DEFAULT 0,
|
`test_AB2` tinyint(3) unsigned NOT NULL,
|
`shipping_id` smallint(5) unsigned NOT NULL,
|
`shipping_price` decimal(10,2) NOT NULL,
|
`normal_total` decimal(10,2) NOT NULL COMMENT 'Sum products final price + Shipping price + Payment Price',
|
`coupon_id` int(11) unsigned NOT NULL,
|
`sub_total` decimal(10,2) NOT NULL COMMENT 'Sum products final price',
|
`total` decimal(10,2) NOT NULL COMMENT 'Sum products final price + Shipping price + Payment price - cheque cadeau',
|
`order_origin` int(11) unsigned NOT NULL DEFAULT 0,
|
`order_first_origin` int(11) unsigned NOT NULL,
|
`not_in_CA` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0:cmd normale et dupliquée-1:cmd issue de retour',
|
`explication_orders_back` text CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
`reason_orders_back` tinyint(3) unsigned DEFAULT 0,
|
`ip` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'deprecated, utiliser ip_number à la place',
|
`ip_number` int(11) unsigned NOT NULL,
|
`accesslog_id` int(11) unsigned NOT NULL,
|
`language_id` tinyint(3) unsigned DEFAULT NULL,
|
`partnership_id` smallint(5) unsigned NOT NULL DEFAULT 0,
|
`retail_website` smallint(5) unsigned NOT NULL,
|
`warehouse_id` smallint(5) unsigned NOT NULL DEFAULT 1,
|
PRIMARY KEY (`orders_id`),
|
KEY `date_purchased` (`date_purchased`),
|
KEY `customers_id_2` (`customers_id`,`orders_status`,`date_purchased`),
|
KEY `ip_number` (`ip_number`),
|
KEY `accesslog_id` (`accesslog_id`),
|
KEY `retail_website` (`retail_website`,`orders_status`),
|
KEY `coupon_id` (`coupon_id`),
|
KEY `order_origin` (`order_origin`),
|
KEY `order_date_sent` (`order_date_sent`),
|
KEY `order_first_origin` (`order_first_origin`),
|
KEY `vat_id` (`vat_id`),
|
KEY `customers_email_address` (`customers_email_address`),
|
KEY `customers_firstname` (`customers_firstname`),
|
KEY `customers_lastname` (`customers_lastname`),
|
KEY `orders_id_crypt` (`orders_id_crypt`),
|
KEY `order_date_trac` (`order_date_trac`),
|
KEY `warehouse_id` (`warehouse_id`),
|
KEY `shipping_payment` (`shipping_id`,`payment_method`),
|
KEY `orders_status` (`orders_status`),
|
KEY `partnership_id` (`partnership_id`,`delivery_country_id`) USING BTREE
|
) ENGINE=InnoDB AUTO_INCREMENT=36417856 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
1 row in set (0.000 sec)
|