Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE `sales_flat_order` (
- `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id',
- `psl_wawi_order_export` int DEFAULT '0',
- `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 unsigned DEFAULT NULL COMMENT 'Is Virtual',
- `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store Id',
- `customer_id` int 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 unsigned DEFAULT NULL COMMENT 'Can Ship Partially',
- `can_ship_partially_item` smallint unsigned DEFAULT NULL COMMENT 'Can Ship Partially Item',
- `customer_is_guest` smallint unsigned DEFAULT NULL COMMENT 'Customer Is Guest',
- `customer_note_notify` smallint unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
- `billing_address_id` int DEFAULT NULL COMMENT 'Billing Address Id',
- `customer_group_id` smallint DEFAULT NULL COMMENT 'Customer Group Id',
- `edit_increment` int DEFAULT NULL COMMENT 'Edit Increment',
- `email_sent` smallint unsigned DEFAULT NULL COMMENT 'Email Sent',
- `forced_shipment_with_invoice` smallint unsigned DEFAULT NULL COMMENT 'Forced Do Shipment With Invoice',
- `payment_auth_expiration` int DEFAULT NULL COMMENT 'Payment Authorization Expiration',
- `quote_address_id` int DEFAULT NULL COMMENT 'Quote Address Id',
- `quote_id` int DEFAULT NULL COMMENT 'Quote Id',
- `shipping_address_id` int DEFAULT NULL COMMENT 'Shipping Address Id',
- `adjustment_negative` decimal(12,4) DEFAULT NULL COMMENT 'Adjustment Negative',
- `adjustment_positive` decimal(12,4) DEFAULT NULL COMMENT 'Adjustment Positive',
- `base_adjustment_negative` decimal(12,4) DEFAULT NULL COMMENT 'Base Adjustment Negative',
- `base_adjustment_positive` decimal(12,4) DEFAULT NULL COMMENT 'Base Adjustment Positive',
- `base_shipping_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Discount Amount',
- `base_subtotal_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',
- `base_total_due` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Due',
- `payment_authorization_amount` decimal(12,4) DEFAULT NULL COMMENT 'Payment Authorization Amount',
- `shipping_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Discount Amount',
- `subtotal_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
- `total_due` decimal(12,4) DEFAULT NULL COMMENT 'Total Due',
- `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',
- `customer_dob` datetime DEFAULT NULL COMMENT 'Customer Dob',
- `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',
- `applied_rule_ids` varchar(255) DEFAULT NULL COMMENT 'Applied Rule Ids',
- `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
- `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
- `customer_firstname` varchar(255) DEFAULT NULL COMMENT 'Customer Firstname',
- `customer_lastname` varchar(255) DEFAULT NULL COMMENT 'Customer Lastname',
- `customer_middlename` varchar(255) DEFAULT NULL COMMENT 'Customer Middlename',
- `customer_prefix` varchar(255) DEFAULT NULL COMMENT 'Customer Prefix',
- `customer_suffix` varchar(255) DEFAULT NULL COMMENT 'Customer Suffix',
- `customer_taxvat` varchar(255) DEFAULT NULL COMMENT 'Customer Taxvat',
- `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
- `ext_customer_id` varchar(255) DEFAULT NULL COMMENT 'Ext Customer Id',
- `ext_order_id` varchar(255) DEFAULT NULL COMMENT 'Ext Order Id',
- `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
- `hold_before_state` varchar(255) DEFAULT NULL COMMENT 'Hold Before State',
- `hold_before_status` varchar(255) DEFAULT NULL COMMENT 'Hold Before Status',
- `order_currency_code` varchar(255) DEFAULT NULL COMMENT 'Order Currency Code',
- `original_increment_id` varchar(50) DEFAULT NULL COMMENT 'Original Increment Id',
- `relation_child_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child Id',
- `relation_child_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child Real Id',
- `relation_parent_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent Id',
- `relation_parent_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent Real Id',
- `remote_ip` varchar(255) DEFAULT NULL COMMENT 'Remote Ip',
- `shipping_method` varchar(255) DEFAULT NULL COMMENT 'Shipping Method',
- `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
- `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
- `x_forwarded_for` varchar(255) DEFAULT NULL COMMENT 'X Forwarded For',
- `customer_note` text COMMENT 'Customer Note',
- `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
- `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
- `total_item_count` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Total Item Count',
- `customer_gender` int DEFAULT NULL COMMENT 'Customer Gender',
- `hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Amount',
- `base_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Amount',
- `shipping_hidden_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Hidden Tax Amount',
- `base_shipping_hidden_tax_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Hidden Tax Amount',
- `hidden_tax_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Invoiced',
- `base_hidden_tax_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Invoiced',
- `hidden_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Hidden Tax Refunded',
- `base_hidden_tax_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Hidden Tax Refunded',
- `shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
- `base_shipping_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
- `coupon_rule_name` varchar(255) DEFAULT NULL COMMENT 'Coupon Sales Rule Name',
- `paypal_ipn_customer_notified` int DEFAULT '0' COMMENT 'Paypal Ipn Customer Notified',
- `gift_message_id` int DEFAULT NULL COMMENT 'Gift Message Id',
- `cod_fee` decimal(12,4) DEFAULT NULL COMMENT 'Cod Fee',
- `base_cod_fee` decimal(12,4) DEFAULT NULL COMMENT 'Base Cod Fee',
- `cod_fee_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Cod Fee Invoiced',
- `base_cod_fee_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Cod Fee Invoiced',
- `cod_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Cod Tax Amount',
- `base_cod_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Cod Tax Amount',
- `cod_tax_amount_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Cod Tax Amount Invoiced',
- `base_cod_tax_amount_invoiced` decimal(12,4) DEFAULT NULL COMMENT 'Base Cod Tax Amount Invoiced',
- `cod_fee_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Cod Fee Refunded',
- `base_cod_fee_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Cod Fee Refunded',
- `cod_tax_amount_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Cod Tax Amount Refunded',
- `base_cod_tax_amount_refunded` decimal(12,4) DEFAULT NULL COMMENT 'Base Cod Tax Amount Refunded',
- `cod_fee_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Cod Fee Canceled',
- `base_cod_fee_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Base Cod Fee Canceled',
- `cod_tax_amount_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Cod Tax Amount Canceled',
- `base_cod_tax_amount_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Base Cod Tax Amount Canceled',
- `payone_transaction_status` varchar(16) NOT NULL COMMENT 'payone_transaction_status',
- `payone_dunning_status` varchar(16) NOT NULL COMMENT 'payone_dunning_status',
- `payone_payment_method_type` varchar(50) NOT NULL COMMENT 'Method Type that was used. Only filled for CreditCard and OnlineBankTransfer',
- `payone_payment_fee` float DEFAULT NULL COMMENT 'payone_payment_fee',
- `payone_prevent_confirmation` int DEFAULT NULL COMMENT 'Flag to prevent confirmation mail',
- `payone_cancel_substitute_increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID of the cancled order which this is the substitute for',
- `mollie_transaction_id` varchar(255) DEFAULT NULL COMMENT 'Mollie Transaction Id',
- `mollie_mpm_payment_fee` decimal(12,4) DEFAULT NULL,
- `base_mollie_mpm_payment_fee` decimal(12,4) DEFAULT NULL,
- `mollie_mpm_payment_fee_tax` decimal(12,4) DEFAULT NULL,
- `base_mollie_mpm_payment_fee_tax` decimal(12,4) DEFAULT NULL,
- PRIMARY KEY (`entity_id`),
- UNIQUE KEY `UNQ_SALES_FLAT_ORDER_INCREMENT_ID` (`increment_id`),
- KEY `IDX_SALES_FLAT_ORDER_STATUS` (`status`),
- KEY `IDX_SALES_FLAT_ORDER_STATE` (`state`),
- KEY `IDX_SALES_FLAT_ORDER_STORE_ID` (`store_id`),
- KEY `IDX_SALES_FLAT_ORDER_CREATED_AT` (`created_at`),
- KEY `IDX_SALES_FLAT_ORDER_CUSTOMER_ID` (`customer_id`),
- KEY `IDX_SALES_FLAT_ORDER_EXT_ORDER_ID` (`ext_order_id`),
- KEY `IDX_SALES_FLAT_ORDER_QUOTE_ID` (`quote_id`),
- KEY `IDX_SALES_FLAT_ORDER_UPDATED_AT` (`updated_at`),
- KEY `IDX_SALES_FLAT_ORDER_PO_CANCEL_SUBSTITUTE_INCREMENT_ID` (`payone_cancel_substitute_increment_id`),
- KEY `IDX_SALES_FLAT_ORDER_MOLLIE_TRANSACTION_ID` (`mollie_transaction_id`),
- CONSTRAINT `FK_SALES_FLAT_ORDER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL ON UPDATE CASCADE,
- CONSTRAINT `FK_SALES_FLAT_ORDER_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=129047 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Order'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement