Jump to content

Edit History

Martin C

Martin C


solved the issue

Update prestashop from 8.1.2 to 8.1.5 with 1-Click Upgrade  module version 5.0.1.
Updating database schema fails:
Mariadb version 10.6.17.

How can i manually execute the queries to update the database schema? Where can i find the queries?


Updating database schema...
Executing: ALTER TABLE ps_feature_flag CHANGE state state TINYINT(1) DEFAULT '0'
Executing: AtTER TABLE ps_tab DROP hide_host_mode
Executing: ALTER TABLE ps_translation CHANGE `key` `key` TEXT NOT NULL COLLATE `utf8_bin`
Executing: ALTER TABLE ps_bk_payment_methods CHANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()' , CHANGE updated_at updated_at DATETIME NOT NULL
19:32:17 CRITICAL [console] Error thrown while running command "prestashop:schema:update-without-foreign --env=prod". Message: "An exception occurred while executing 'ALTER TABLE ps_C CHANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()' , CHANGE updated_at updated_at DATETIME NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'" ["exception" => Doctrine\DBAL\Exception\DriverException { …},"command" => "prestashop:schema:update-without-foreign --env=prod","message" => """ An exception occurred while executing 'ALTER TABLE ps_bk_payment_methods CHANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()' , CHANGE updated_at updated_at DATETIME NOT NULL':\n \n SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at' """]
In AbstractMySQLDriver.php line 128:
An exception occurred while executing 'ALTER TABLE ps_bk_payment_methods CH
ANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()'
, CHANGE updated_at updated_at DATETIME NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at'
In Exception.php line 18:
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at'
In PDOConnection.php line 141:
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at'
prestashop:schema:update-without-foreign [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--id_shop [ID_SHOP]] [--id_shop_group [ID_SHOP_GROUP]] [--]

Martin C

Martin C

Update prestashop from 8.1.2 to 8.1.5 with 1-Click Upgrade  module version 5.0.1.
Updating database schema fails:
Mariadb version 10.6.17.

How can i manually execute the queries to update the database schema? Where can i find the queries?


Updating database schema...
Executing: ALTER TABLE ps_feature_flag CHANGE state state TINYINT(1) DEFAULT '0'
Executing: AtTER TABLE ps_tab DROP hide_host_mode
Executing: ALTER TABLE ps_translation CHANGE `key` `key` TEXT NOT NULL COLLATE `utf8_bin`
Executing: ALTER TABLE ps_bk_payment_methods CHANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()' , CHANGE updated_at updated_at DATETIME NOT NULL
19:32:17 CRITICAL [console] Error thrown while running command "prestashop:schema:update-without-foreign --env=prod". Message: "An exception occurred while executing 'ALTER TABLE ps_C CHANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()' , CHANGE updated_at updated_at DATETIME NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'" ["exception" => Doctrine\DBAL\Exception\DriverException { …},"command" => "prestashop:schema:update-without-foreign --env=prod","message" => """ An exception occurred while executing 'ALTER TABLE ps_bk_payment_methods CHANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()' , CHANGE updated_at updated_at DATETIME NOT NULL':\n \n SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at' """]
In AbstractMySQLDriver.php line 128:
An exception occurred while executing 'ALTER TABLE ps_bk_payment_methods CH
ANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()'
, CHANGE updated_at updated_at DATETIME NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at'
In Exception.php line 18:
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at'
In PDOConnection.php line 141:
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at'
prestashop:schema:update-without-foreign [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--id_shop [ID_SHOP]] [--id_shop_group [ID_SHOP_GROUP]] [--]

Martin C

Martin C

Update prestashop from 8.1.2 to 8.1.5 with 1-Click Upgrade  module version 5.0.1.
Updating database schema fails:
Mariadb version 10.6.17.

How can i manually execute the queries to update the database schema? Where can i find the queries?


Updating database schema...
Executing: ALTER TABLE ps_feature_flag CHANGE state state TINYINT(1) DEFAULT '0'
Executing: AtTER TABLE ps_tab DROP hide_host_mode
Executing: ALTER TABLE ps_translation CHANGE `key` `key` TEXT NOT NULL COLLATE `utf8_bin`
Executing: ALTER TABLE ps_bk_payment_methods CHANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()' , CHANGE updated_at updated_at DATETIME NOT NULL
19:32:17 CRITICAL [console] Error thrown while running command "prestashop:schema:update-without-foreign --env=prod". Message: "An exception occurred while executing 'ALTER TABLE ps_C CHANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()' , CHANGE updated_at updated_at DATETIME NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'" ["exception" => Doctrine\DBAL\Exception\DriverException { …},"command" => "prestashop:schema:update-without-foreign --env=prod","message" => """ An exception occurred while executing 'ALTER TABLE ps_bk_payment_methods CHANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()' , CHANGE updated_at updated_at DATETIME NOT NULL':\n \n SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at' """]
In AbstractMySQLDriver.php line 128:
An exception occurred while executing 'ALTER TABLE ps_bk_payment_methods CH
ANGE created_at created_at DATETIME NOT NULL DEFAULT 'current_timestamp()'
, CHANGE updated_at updated_at DATETIME NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at'
In Exception.php line 18:
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at'
In PDOConnection.php line 141:
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at'
prestashop:schema:update-without-foreign [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--id_shop [ID_SHOP]] [--id_shop_group [ID_SHOP_GROUP]] [--]

×
×
  • Create New...