Description
These types of errors occur on both the web and CLI install modes of Magento 2 via Composer....
Starting Magento installation:
File permissions check...
Enabling Maintenance Mode...
Installing deployment configuration...
Installing database schema:
Schema creation/updates:
Module 'Magento_Core':
Module 'Magento_Store':
Module 'Magento_Theme':
Module 'Magento_Directory':
Module 'Magento_Backup':
Module 'Magento_Eav':
Module 'Magento_Customer':
Module 'Magento_Indexer':
Module 'Magento_CatalogImportExport':
Module 'Magento_Cms':
Module 'Magento_Rule':
Module 'Magento_Backend':
Module 'Magento_Catalog':
Module 'Magento_Widget':
Module 'Magento_CatalogInventory':
Module 'Magento_Payment':
Module 'Magento_CheckoutAgreements':
Module 'Magento_Bundle':
Module 'Magento_CmsUrlRewrite':
Module 'Magento_ConfigurableImportExport':
Module 'Magento_Sales':
Include /var/www/store/app/code/Magento/Sales/sql/sales_setup/install-2.0.0.php
[ERROR] exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1293 Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause' in /var/www/store/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /var/www/store/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /var/www/store/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php(91): Zend_Db_Statement_Pdo->_execute(Array)
#2 /var/www/store/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#3 /var/www/store/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 /var/www/store/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('CREATE TABLE s...', Array) #5 /var/www/store/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(416): Zend_Db_Adapter_Pdo_Abstract->query('CREATE TABLE
s...', Array)
#6 /var/www/store/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(1952): Magento\Framework\DB\Adapter\Pdo\Mysql->query('CREATE TABLE `s...')
#7 /var/www/store/app/code/Magento/Sales/sql/sales_setup/install-2.0.0.php(873): Magento\Framework\DB\Adapter\Pdo\Mysql->createTable(Object(Magento\Framework\DB\Ddl\Table))
#8 /var/www/store/setup/module/Magento/Setup/src/Module/SetupModule.php(271): include('/var/www/store/...')
#9 /var/www/store/setup/module/Magento/Setup/src/Module/SetupModule.php(183): Magento\Setup\Module\SetupModule->includeFile('/var/www/store/...')
#10 /var/www/store/setup/module/Magento/Setup/src/Module/SetupModule.php(153): Magento\Setup\Module\SetupModule->applySchemaUpdates('install', '', '2.0.0')
#11 /var/www/store/setup/module/Magento/Setup/src/Model/Installer.php(552): Magento\Setup\Module\SetupModule->applyUpdates()
#12 [internal function]: Magento\Setup\Model\Installer->installSchema()
#13 /var/www/store/setup/module/Magento/Setup/src/Model/Installer.php(292): call_user_func_array(Array, Array)
#14 /var/www/store/setup/module/Magento/Setup/src/Controller/Install.php(79): Magento\Setup\Model\Installer->install(Array)
#15 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractActionController.php(83): Magento\Setup\Controller\Install->startAction()
#16 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#17 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#18 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#19 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#20 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#21 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#22 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#23 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#24 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#25 /var/www/store/setup/index.php(24): Zend\Mvc\Application->run()
#26 {main}
Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 1293 Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause, query was: CREATE TABLE sales_order
(
entity_id
int UNSIGNED NOT NULL auto_increment COMMENT 'Entity Id' ,
state
varchar(32) NULL COMMENT 'State' ,
status
varchar(32) NULL COMMENT 'Status' ,
coupon_code
varchar(255) NULL COMMENT 'Coupon Code' ,
protect_code
varchar(255) NULL COMMENT 'Protect Code' ,
shipping_description
varchar(255) NULL COMMENT 'Shipping Description' ,
is_virtual
smallint UNSIGNED NULL COMMENT 'Is Virtual' ,
store_id
smallint UNSIGNED NULL COMMENT 'Store Id' ,
customer_id
int UNSIGNED NULL COMMENT 'Customer Id' ,
base_discount_amount
decimal(12,4) NULL COMMENT 'Base Discount Amount' ,
base_discount_canceled
decimal(12,4) NULL COMMENT 'Base Discount Canceled' ,
base_discount_invoiced
decimal(12,4) NULL COMMENT 'Base Discount Invoiced' ,
base_discount_refunded
decimal(12,4) NULL COMMENT 'Base Discount Refunded' ,
base_grand_total
decimal(12,4) NULL COMMENT 'Base Grand Total' ,
base_shipping_amount
decimal(12,4) NULL COMMENT 'Base Shipping Amount' ,
base_shipping_canceled
decimal(12,4) NULL COMMENT 'Base Shipping Canceled' ,
base_shipping_invoiced
decimal(12,4) NULL COMMENT 'Base Shipping Invoiced' ,
base_shipping_refunded
decimal(12,4) NULL COMMENT 'Base Shipping Refunded' ,
base_shipping_tax_amount
decimal(12,4) NULL COMMENT 'Base Shipping Tax Amount' ,
base_shipping_tax_refunded
decimal(12,4) NULL COMMENT 'Base Shipping Tax Refunded' ,
base_subtotal
decimal(12,4) NULL COMMENT 'Base Subtotal' ,
base_subtotal_canceled
decimal(12,4) NULL COMMENT 'Base Subtotal Canceled' ,
base_subtotal_invoiced
decimal(12,4) NULL COMMENT 'Base Subtotal Invoiced' ,
base_subtotal_refunded
decimal(12,4) NULL COMMENT 'Base Subtotal Refunded' ,
base_tax_amount
decimal(12,4) NULL COMMENT 'Base Tax Amount' ,
base_tax_canceled
decimal(12,4) NULL COMMENT 'Base Tax Canceled' ,
base_tax_invoiced
decimal(12,4) NULL COMMENT 'Base Tax Invoiced' ,
base_tax_refunded
decimal(12,4) NULL COMMENT 'Base Tax Refunded' ,
base_to_global_rate
decimal(12,4) NULL COMMENT 'Base To Global Rate' ,
base_to_order_rate
decimal(12,4) NULL COMMENT 'Base To Order Rate' ,
base_total_canceled
decimal(12,4) NULL COMMENT 'Base Total Canceled' ,
base_total_invoiced
decimal(12,4) NULL COMMENT 'Base Total Invoiced' ,
base_total_invoiced_cost
decimal(12,4) NULL COMMENT 'Base Total Invoiced Cost' ,
base_total_offline_refunded
decimal(12,4) NULL COMMENT 'Base Total Offline Refunded' ,
base_total_online_refunded
decimal(12,4) NULL COMMENT 'Base Total Online Refunded' ,
base_total_paid
decimal(12,4) NULL COMMENT 'Base Total Paid' ,
base_total_qty_ordered
decimal(12,4) NULL COMMENT 'Base Total Qty Ordered' ,
base_total_refunded
decimal(12,4) NULL COMMENT 'Base Total Refunded' ,
discount_amount
decimal(12,4) NULL COMMENT 'Discount Amount' ,
discount_canceled
decimal(12,4) NULL COMMENT 'Discount Canceled' ,
discount_invoiced
decimal(12,4) NULL COMMENT 'Discount Invoiced' ,
discount_refunded
decimal(12,4) NULL COMMENT 'Discount Refunded' ,
grand_total
decimal(12,4) NULL COMMENT 'Grand Total' ,
shipping_amount
decimal(12,4) NULL COMMENT 'Shipping Amount' ,
shipping_canceled
decimal(12,4) NULL COMMENT 'Shipping Canceled' ,
shipping_invoiced
decimal(12,4) NULL COMMENT 'Shipping Invoiced' ,
shipping_refunded
decimal(12,4) NULL COMMENT 'Shipping Refunded' ,
shipping_tax_amount
decimal(12,4) NULL COMMENT 'Shipping Tax Amount' ,
shipping_tax_refunded
decimal(12,4) NULL COMMENT 'Shipping Tax Refunded' ,
store_to_base_rate
decimal(12,4) NULL COMMENT 'Store To Base Rate' ,
store_to_order_rate
decimal(12,4) NULL COMMENT 'Store To Order Rate' ,
subtotal
decimal(12,4) NULL COMMENT 'Subtotal' ,
subtotal_canceled
decimal(12,4) NULL COMMENT 'Subtotal Canceled' ,
subtotal_invoiced
decimal(12,4) NULL COMMENT 'Subtotal Invoiced' ,
subtotal_refunded
decimal(12,4) NULL COMMENT 'Subtotal Refunded' ,
tax_amount
decimal(12,4) NULL COMMENT 'Tax Amount' ,
tax_canceled
decimal(12,4) NULL COMMENT 'Tax Canceled' ,
tax_invoiced
decimal(12,4) NULL COMMENT 'Tax Invoiced' ,
tax_refunded
decimal(12,4) NULL COMMENT 'Tax Refunded' ,
total_canceled
decimal(12,4) NULL COMMENT 'Total Canceled' ,
total_invoiced
decimal(12,4) NULL COMMENT 'Total Invoiced' ,
total_offline_refunded
decimal(12,4) NULL COMMENT 'Total Offline Refunded' ,
total_online_refunded
decimal(12,4) NULL COMMENT 'Total Online Refunded' ,
total_paid
decimal(12,4) NULL COMMENT 'Total Paid' ,
total_qty_ordered
decimal(12,4) NULL COMMENT 'Total Qty Ordered' ,
total_refunded
decimal(12,4) NULL COMMENT 'Total Refunded' ,
can_ship_partially
smallint UNSIGNED NULL COMMENT 'Can Ship Partially' ,
can_ship_partially_item
smallint UNSIGNED NULL COMMENT 'Can Ship Partially Item' ,
customer_is_guest
smallint UNSIGNED NULL COMMENT 'Customer Is Guest' ,
customer_note_notify
smallint UNSIGNED NULL COMMENT 'Customer Note Notify' ,
billing_address_id
int NULL COMMENT 'Billing Address Id' ,
customer_group_id
smallint NULL COMMENT 'Customer Group Id' ,
edit_increment
int NULL COMMENT 'Edit Increment' ,
email_sent
smallint UNSIGNED NULL COMMENT 'Email Sent' ,
forced_shipment_with_invoice
smallint UNSIGNED NULL COMMENT 'Forced Do Shipment With Invoice' ,
payment_auth_expiration
int NULL COMMENT 'Payment Authorization Expiration' ,
quote_address_id
int NULL COMMENT 'Quote Address Id' ,
quote_id
int NULL COMMENT 'Quote Id' ,
shipping_address_id
int NULL COMMENT 'Shipping Address Id' ,
adjustment_negative
decimal(12,4) NULL COMMENT 'Adjustment Negative' ,
adjustment_positive
decimal(12,4) NULL COMMENT 'Adjustment Positive' ,
base_adjustment_negative
decimal(12,4) NULL COMMENT 'Base Adjustment Negative' ,
base_adjustment_positive
decimal(12,4) NULL COMMENT 'Base Adjustment Positive' ,
base_shipping_discount_amount
decimal(12,4) NULL COMMENT 'Base Shipping Discount Amount' ,
base_subtotal_incl_tax
decimal(12,4) NULL COMMENT 'Base Subtotal Incl Tax' ,
base_total_due
decimal(12,4) NULL COMMENT 'Base Total Due' ,
payment_authorization_amount
decimal(12,4) NULL COMMENT 'Payment Authorization Amount' ,
shipping_discount_amount
decimal(12,4) NULL COMMENT 'Shipping Discount Amount' ,
subtotal_incl_tax
decimal(12,4) NULL COMMENT 'Subtotal Incl Tax' ,
total_due
decimal(12,4) NULL COMMENT 'Total Due' ,
weight
decimal(12,4) NULL COMMENT 'Weight' ,
customer_dob
datetime NULL COMMENT 'Customer Dob' ,
increment_id
varchar(50) NULL COMMENT 'Increment Id' ,
applied_rule_ids
varchar(255) NULL COMMENT 'Applied Rule Ids' ,
base_currency_code
varchar(3) NULL COMMENT 'Base Currency Code' ,
customer_email
varchar(255) NULL COMMENT 'Customer Email' ,
customer_firstname
varchar(255) NULL COMMENT 'Customer Firstname' ,
customer_lastname
varchar(255) NULL COMMENT 'Customer Lastname' ,
customer_middlename
varchar(255) NULL COMMENT 'Customer Middlename' ,
customer_prefix
varchar(255) NULL COMMENT 'Customer Prefix' ,
customer_suffix
varchar(255) NULL COMMENT 'Customer Suffix' ,
customer_taxvat
varchar(255) NULL COMMENT 'Customer Taxvat' ,
discount_description
varchar(255) NULL COMMENT 'Discount Description' ,
ext_customer_id
varchar(255) NULL COMMENT 'Ext Customer Id' ,
ext_order_id
varchar(255) NULL COMMENT 'Ext Order Id' ,
global_currency_code
varchar(3) NULL COMMENT 'Global Currency Code' ,
hold_before_state
varchar(255) NULL COMMENT 'Hold Before State' ,
hold_before_status
varchar(255) NULL COMMENT 'Hold Before Status' ,
order_currency_code
varchar(255) NULL COMMENT 'Order Currency Code' ,
original_increment_id
varchar(50) NULL COMMENT 'Original Increment Id' ,
relation_child_id
varchar(32) NULL COMMENT 'Relation Child Id' ,
relation_child_real_id
varchar(32) NULL COMMENT 'Relation Child Real Id' ,
relation_parent_id
varchar(32) NULL COMMENT 'Relation Parent Id' ,
relation_parent_real_id
varchar(32) NULL COMMENT 'Relation Parent Real Id' ,
remote_ip
varchar(255) NULL COMMENT 'Remote Ip' ,
shipping_method
varchar(255) NULL COMMENT 'Shipping Method' ,
store_currency_code
varchar(3) NULL COMMENT 'Store Currency Code' ,
store_name
varchar(255) NULL COMMENT 'Store Name' ,
x_forwarded_for
varchar(255) NULL COMMENT 'X Forwarded For' ,
customer_note
text NULL COMMENT 'Customer Note' ,
created_at
timestamp NOT NULL default CURRENT_TIMESTAMP COMMENT 'Created At' ,
updated_at
timestamp NOT NULL default 0 ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At' ,
total_item_count
smallint UNSIGNED NOT NULL default '0' COMMENT 'Total Item Count' ,
customer_gender
int NULL COMMENT 'Customer Gender' ,
hidden_tax_amount
decimal(12,4) NULL COMMENT 'Hidden Tax Amount' ,
base_hidden_tax_amount
decimal(12,4) NULL COMMENT 'Base Hidden Tax Amount' ,
shipping_hidden_tax_amount
decimal(12,4) NULL COMMENT 'Shipping Hidden Tax Amount' ,
base_shipping_hidden_tax_amnt
decimal(12,4) NULL COMMENT 'Base Shipping Hidden Tax Amount' ,
hidden_tax_invoiced
decimal(12,4) NULL COMMENT 'Hidden Tax Invoiced' ,
base_hidden_tax_invoiced
decimal(12,4) NULL COMMENT 'Base Hidden Tax Invoiced' ,
hidden_tax_refunded
decimal(12,4) NULL COMMENT 'Hidden Tax Refunded' ,
base_hidden_tax_refunded
decimal(12,4) NULL COMMENT 'Base Hidden Tax Refunded' ,
shipping_incl_tax
decimal(12,4) NULL COMMENT 'Shipping Incl Tax' ,
base_shipping_incl_tax
decimal(12,4) NULL COMMENT 'Base Shipping Incl Tax' ,
coupon_rule_name
varchar(255) NULL COMMENT 'Coupon Sales Rule Name' ,
PRIMARY KEY (entity_id
),
INDEX IDX_SALES_ORDER_STATUS
(status
),
INDEX IDX_SALES_ORDER_STATE
(state
),
INDEX IDX_SALES_ORDER_STORE_ID
(store_id
),
UNIQUE UNQ_SALES_ORDER_INCREMENT_ID
(increment_id
),
INDEX IDX_SALES_ORDER_CREATED_AT
(created_at
),
INDEX IDX_SALES_ORDER_CUSTOMER_ID
(customer_id
),
INDEX IDX_SALES_ORDER_EXT_ORDER_ID
(ext_order_id
),
INDEX IDX_SALES_ORDER_QUOTE_ID
(quote_id
),
INDEX IDX_SALES_ORDER_UPDATED_AT
(updated_at
),
CONSTRAINT FK_SALES_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_ORDER_STORE_ID_STORE_STORE_ID
FOREIGN KEY (store_id
) REFERENCES store
(store_id
) ON DELETE SET NULL ON UPDATE CASCADE
) COMMENT='Sales Flat Order' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci' in /var/www/store/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /var/www/store/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php(91): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/store/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#2 /var/www/store/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/store/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('CREATE TABLE s...', Array) #4 /var/www/store/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(416): Zend_Db_Adapter_Pdo_Abstract->query('CREATE TABLE
s...', Array)
#5 /var/www/store/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(1952): Magento\Framework\DB\Adapter\Pdo\Mysql->query('CREATE TABLE `s...')
#6 /var/www/store/app/code/Magento/Sales/sql/sales_setup/install-2.0.0.php(873): Magento\Framework\DB\Adapter\Pdo\Mysql->createTable(Object(Magento\Framework\DB\Ddl\Table))
#7 /var/www/store/setup/module/Magento/Setup/src/Module/SetupModule.php(271): include('/var/www/store/...')
#8 /var/www/store/setup/module/Magento/Setup/src/Module/SetupModule.php(183): Magento\Setup\Module\SetupModule->includeFile('/var/www/store/...')
#9 /var/www/store/setup/module/Magento/Setup/src/Module/SetupModule.php(153): Magento\Setup\Module\SetupModule->applySchemaUpdates('install', '', '2.0.0')
#10 /var/www/store/setup/module/Magento/Setup/src/Model/Installer.php(552): Magento\Setup\Module\SetupModule->applyUpdates()
#11 [internal function]: Magento\Setup\Model\Installer->installSchema()
#12 /var/www/store/setup/module/Magento/Setup/src/Model/Installer.php(292): call_user_func_array(Array, Array)
#13 /var/www/store/setup/module/Magento/Setup/src/Controller/Install.php(79): Magento\Setup\Model\Installer->install(Array)
#14 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractActionController.php(83): Magento\Setup\Controller\Install->startAction()
#15 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#16 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#17 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#18 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#19 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#20 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#21 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#22 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#23 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#24 /var/www/store/setup/index.php(24): Zend\Mvc\Application->run()
#25 {main}
Next exception 'Exception' with message 'Error in file: "/var/www/store/app/code/Magento/Sales/sql/sales_setup/install-2.0.0.php" - SQLSTATE[HY000]: General error: 1293 Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause, query was: CREATE TABLE sales_order
(
entity_id
int UNSIGNED NOT NULL auto_increment COMMENT 'Entity Id' ,
state
varchar(32) NULL COMMENT 'State' ,
status
varchar(32) NULL COMMENT 'Status' ,
coupon_code
varchar(255) NULL COMMENT 'Coupon Code' ,
protect_code
varchar(255) NULL COMMENT 'Protect Code' ,
shipping_description
varchar(255) NULL COMMENT 'Shipping Description' ,
is_virtual
smallint UNSIGNED NULL COMMENT 'Is Virtual' ,
store_id
smallint UNSIGNED NULL COMMENT 'Store Id' ,
customer_id
int UNSIGNED NULL COMMENT 'Customer Id' ,
base_discount_amount
decimal(12,4) NULL COMMENT 'Base Discount Amount' ,
base_discount_canceled
decimal(12,4) NULL COMMENT 'Base Discount Canceled' ,
base_discount_invoiced
decimal(12,4) NULL COMMENT 'Base Discount Invoiced' ,
base_discount_refunded
decimal(12,4) NULL COMMENT 'Base Discount Refunded' ,
base_grand_total
decimal(12,4) NULL COMMENT 'Base Grand Total' ,
base_shipping_amount
decimal(12,4) NULL COMMENT 'Base Shipping Amount' ,
base_shipping_canceled
decimal(12,4) NULL COMMENT 'Base Shipping Canceled' ,
base_shipping_invoiced
decimal(12,4) NULL COMMENT 'Base Shipping Invoiced' ,
base_shipping_refunded
decimal(12,4) NULL COMMENT 'Base Shipping Refunded' ,
base_shipping_tax_amount
decimal(12,4) NULL COMMENT 'Base Shipping Tax Amount' ,
base_shipping_tax_refunded
decimal(12,4) NULL COMMENT 'Base Shipping Tax Refunded' ,
base_subtotal
decimal(12,4) NULL COMMENT 'Base Subtotal' ,
base_subtotal_canceled
decimal(12,4) NULL COMMENT 'Base Subtotal Canceled' ,
base_subtotal_invoiced
decimal(12,4) NULL COMMENT 'Base Subtotal Invoiced' ,
base_subtotal_refunded
decimal(12,4) NULL COMMENT 'Base Subtotal Refunded' ,
base_tax_amount
decimal(12,4) NULL COMMENT 'Base Tax Amount' ,
base_tax_canceled
decimal(12,4) NULL COMMENT 'Base Tax Canceled' ,
base_tax_invoiced
decimal(12,4) NULL COMMENT 'Base Tax Invoiced' ,
base_tax_refunded
decimal(12,4) NULL COMMENT 'Base Tax Refunded' ,
base_to_global_rate
decimal(12,4) NULL COMMENT 'Base To Global Rate' ,
base_to_order_rate
decimal(12,4) NULL COMMENT 'Base To Order Rate' ,
base_total_canceled
decimal(12,4) NULL COMMENT 'Base Total Canceled' ,
base_total_invoiced
decimal(12,4) NULL COMMENT 'Base Total Invoiced' ,
base_total_invoiced_cost
decimal(12,4) NULL COMMENT 'Base Total Invoiced Cost' ,
base_total_offline_refunded
decimal(12,4) NULL COMMENT 'Base Total Offline Refunded' ,
base_total_online_refunded
decimal(12,4) NULL COMMENT 'Base Total Online Refunded' ,
base_total_paid
decimal(12,4) NULL COMMENT 'Base Total Paid' ,
base_total_qty_ordered
decimal(12,4) NULL COMMENT 'Base Total Qty Ordered' ,
base_total_refunded
decimal(12,4) NULL COMMENT 'Base Total Refunded' ,
discount_amount
decimal(12,4) NULL COMMENT 'Discount Amount' ,
discount_canceled
decimal(12,4) NULL COMMENT 'Discount Canceled' ,
discount_invoiced
decimal(12,4) NULL COMMENT 'Discount Invoiced' ,
discount_refunded
decimal(12,4) NULL COMMENT 'Discount Refunded' ,
grand_total
decimal(12,4) NULL COMMENT 'Grand Total' ,
shipping_amount
decimal(12,4) NULL COMMENT 'Shipping Amount' ,
shipping_canceled
decimal(12,4) NULL COMMENT 'Shipping Canceled' ,
shipping_invoiced
decimal(12,4) NULL COMMENT 'Shipping Invoiced' ,
shipping_refunded
decimal(12,4) NULL COMMENT 'Shipping Refunded' ,
shipping_tax_amount
decimal(12,4) NULL COMMENT 'Shipping Tax Amount' ,
shipping_tax_refunded
decimal(12,4) NULL COMMENT 'Shipping Tax Refunded' ,
store_to_base_rate
decimal(12,4) NULL COMMENT 'Store To Base Rate' ,
store_to_order_rate
decimal(12,4) NULL COMMENT 'Store To Order Rate' ,
subtotal
decimal(12,4) NULL COMMENT 'Subtotal' ,
subtotal_canceled
decimal(12,4) NULL COMMENT 'Subtotal Canceled' ,
subtotal_invoiced
decimal(12,4) NULL COMMENT 'Subtotal Invoiced' ,
subtotal_refunded
decimal(12,4) NULL COMMENT 'Subtotal Refunded' ,
tax_amount
decimal(12,4) NULL COMMENT 'Tax Amount' ,
tax_canceled
decimal(12,4) NULL COMMENT 'Tax Canceled' ,
tax_invoiced
decimal(12,4) NULL COMMENT 'Tax Invoiced' ,
tax_refunded
decimal(12,4) NULL COMMENT 'Tax Refunded' ,
total_canceled
decimal(12,4) NULL COMMENT 'Total Canceled' ,
total_invoiced
decimal(12,4) NULL COMMENT 'Total Invoiced' ,
total_offline_refunded
decimal(12,4) NULL COMMENT 'Total Offline Refunded' ,
total_online_refunded
decimal(12,4) NULL COMMENT 'Total Online Refunded' ,
total_paid
decimal(12,4) NULL COMMENT 'Total Paid' ,
total_qty_ordered
decimal(12,4) NULL COMMENT 'Total Qty Ordered' ,
total_refunded
decimal(12,4) NULL COMMENT 'Total Refunded' ,
can_ship_partially
smallint UNSIGNED NULL COMMENT 'Can Ship Partially' ,
can_ship_partially_item
smallint UNSIGNED NULL COMMENT 'Can Ship Partially Item' ,
customer_is_guest
smallint UNSIGNED NULL COMMENT 'Customer Is Guest' ,
customer_note_notify
smallint UNSIGNED NULL COMMENT 'Customer Note Notify' ,
billing_address_id
int NULL COMMENT 'Billing Address Id' ,
customer_group_id
smallint NULL COMMENT 'Customer Group Id' ,
edit_increment
int NULL COMMENT 'Edit Increment' ,
email_sent
smallint UNSIGNED NULL COMMENT 'Email Sent' ,
forced_shipment_with_invoice
smallint UNSIGNED NULL COMMENT 'Forced Do Shipment With Invoice' ,
payment_auth_expiration
int NULL COMMENT 'Payment Authorization Expiration' ,
quote_address_id
int NULL COMMENT 'Quote Address Id' ,
quote_id
int NULL COMMENT 'Quote Id' ,
shipping_address_id
int NULL COMMENT 'Shipping Address Id' ,
adjustment_negative
decimal(12,4) NULL COMMENT 'Adjustment Negative' ,
adjustment_positive
decimal(12,4) NULL COMMENT 'Adjustment Positive' ,
base_adjustment_negative
decimal(12,4) NULL COMMENT 'Base Adjustment Negative' ,
base_adjustment_positive
decimal(12,4) NULL COMMENT 'Base Adjustment Positive' ,
base_shipping_discount_amount
decimal(12,4) NULL COMMENT 'Base Shipping Discount Amount' ,
base_subtotal_incl_tax
decimal(12,4) NULL COMMENT 'Base Subtotal Incl Tax' ,
base_total_due
decimal(12,4) NULL COMMENT 'Base Total Due' ,
payment_authorization_amount
decimal(12,4) NULL COMMENT 'Payment Authorization Amount' ,
shipping_discount_amount
decimal(12,4) NULL COMMENT 'Shipping Discount Amount' ,
subtotal_incl_tax
decimal(12,4) NULL COMMENT 'Subtotal Incl Tax' ,
total_due
decimal(12,4) NULL COMMENT 'Total Due' ,
weight
decimal(12,4) NULL COMMENT 'Weight' ,
customer_dob
datetime NULL COMMENT 'Customer Dob' ,
increment_id
varchar(50) NULL COMMENT 'Increment Id' ,
applied_rule_ids
varchar(255) NULL COMMENT 'Applied Rule Ids' ,
base_currency_code
varchar(3) NULL COMMENT 'Base Currency Code' ,
customer_email
varchar(255) NULL COMMENT 'Customer Email' ,
customer_firstname
varchar(255) NULL COMMENT 'Customer Firstname' ,
customer_lastname
varchar(255) NULL COMMENT 'Customer Lastname' ,
customer_middlename
varchar(255) NULL COMMENT 'Customer Middlename' ,
customer_prefix
varchar(255) NULL COMMENT 'Customer Prefix' ,
customer_suffix
varchar(255) NULL COMMENT 'Customer Suffix' ,
customer_taxvat
varchar(255) NULL COMMENT 'Customer Taxvat' ,
discount_description
varchar(255) NULL COMMENT 'Discount Description' ,
ext_customer_id
varchar(255) NULL COMMENT 'Ext Customer Id' ,
ext_order_id
varchar(255) NULL COMMENT 'Ext Order Id' ,
global_currency_code
varchar(3) NULL COMMENT 'Global Currency Code' ,
hold_before_state
varchar(255) NULL COMMENT 'Hold Before State' ,
hold_before_status
varchar(255) NULL COMMENT 'Hold Before Status' ,
order_currency_code
varchar(255) NULL COMMENT 'Order Currency Code' ,
original_increment_id
varchar(50) NULL COMMENT 'Original Increment Id' ,
relation_child_id
varchar(32) NULL COMMENT 'Relation Child Id' ,
relation_child_real_id
varchar(32) NULL COMMENT 'Relation Child Real Id' ,
relation_parent_id
varchar(32) NULL COMMENT 'Relation Parent Id' ,
relation_parent_real_id
varchar(32) NULL COMMENT 'Relation Parent Real Id' ,
remote_ip
varchar(255) NULL COMMENT 'Remote Ip' ,
shipping_method
varchar(255) NULL COMMENT 'Shipping Method' ,
store_currency_code
varchar(3) NULL COMMENT 'Store Currency Code' ,
store_name
varchar(255) NULL COMMENT 'Store Name' ,
x_forwarded_for
varchar(255) NULL COMMENT 'X Forwarded For' ,
customer_note
text NULL COMMENT 'Customer Note' ,
created_at
timestamp NOT NULL default CURRENT_TIMESTAMP COMMENT 'Created At' ,
updated_at
timestamp NOT NULL default 0 ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At' ,
total_item_count
smallint UNSIGNED NOT NULL default '0' COMMENT 'Total Item Count' ,
customer_gender
int NULL COMMENT 'Customer Gender' ,
hidden_tax_amount
decimal(12,4) NULL COMMENT 'Hidden Tax Amount' ,
base_hidden_tax_amount
decimal(12,4) NULL COMMENT 'Base Hidden Tax Amount' ,
shipping_hidden_tax_amount
decimal(12,4) NULL COMMENT 'Shipping Hidden Tax Amount' ,
base_shipping_hidden_tax_amnt
decimal(12,4) NULL COMMENT 'Base Shipping Hidden Tax Amount' ,
hidden_tax_invoiced
decimal(12,4) NULL COMMENT 'Hidden Tax Invoiced' ,
base_hidden_tax_invoiced
decimal(12,4) NULL COMMENT 'Base Hidden Tax Invoiced' ,
hidden_tax_refunded
decimal(12,4) NULL COMMENT 'Hidden Tax Refunded' ,
base_hidden_tax_refunded
decimal(12,4) NULL COMMENT 'Base Hidden Tax Refunded' ,
shipping_incl_tax
decimal(12,4) NULL COMMENT 'Shipping Incl Tax' ,
base_shipping_incl_tax
decimal(12,4) NULL COMMENT 'Base Shipping Incl Tax' ,
coupon_rule_name
varchar(255) NULL COMMENT 'Coupon Sales Rule Name' ,
PRIMARY KEY (entity_id
),
INDEX IDX_SALES_ORDER_STATUS
(status
),
INDEX IDX_SALES_ORDER_STATE
(state
),
INDEX IDX_SALES_ORDER_STORE_ID
(store_id
),
UNIQUE UNQ_SALES_ORDER_INCREMENT_ID
(increment_id
),
INDEX IDX_SALES_ORDER_CREATED_AT
(created_at
),
INDEX IDX_SALES_ORDER_CUSTOMER_ID
(customer_id
),
INDEX IDX_SALES_ORDER_EXT_ORDER_ID
(ext_order_id
),
INDEX IDX_SALES_ORDER_QUOTE_ID
(quote_id
),
INDEX IDX_SALES_ORDER_UPDATED_AT
(updated_at
),
CONSTRAINT FK_SALES_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_ORDER_STORE_ID_STORE_STORE_ID
FOREIGN KEY (store_id
) REFERENCES store
(store_id
) ON DELETE SET NULL ON UPDATE CASCADE
) COMMENT='Sales Flat Order' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci' in /var/www/store/setup/module/Magento/Setup/src/Module/SetupModule.php:197
Stack trace:
#0 /var/www/store/setup/module/Magento/Setup/src/Module/SetupModule.php(153): Magento\Setup\Module\SetupModule->applySchemaUpdates('install', '', '2.0.0')
#1 /var/www/store/setup/module/Magento/Setup/src/Model/Installer.php(552): Magento\Setup\Module\SetupModule->applyUpdates()
#2 [internal function]: Magento\Setup\Model\Installer->installSchema()
#3 /var/www/store/setup/module/Magento/Setup/src/Model/Installer.php(292): call_user_func_array(Array, Array)
#4 /var/www/store/setup/module/Magento/Setup/src/Controller/Install.php(79): Magento\Setup\Model\Installer->install(Array)
#5 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractActionController.php(83): Magento\Setup\Controller\Install->startAction()
#6 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#7 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#8 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#9 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#11 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#12 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13 /var/www/store/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /var/www/store/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /var/www/store/setup/index.php(24): Zend\Mvc\Application->run()
#16 {main}