diff --git a/install-dev/upgrade/sql/1.5.0.13.sql b/install-dev/upgrade/sql/1.5.0.13.sql index 81c9d66d6..f79b8e9f1 100644 --- a/install-dev/upgrade/sql/1.5.0.13.sql +++ b/install-dev/upgrade/sql/1.5.0.13.sql @@ -35,3 +35,8 @@ ALTER TABLE `PREFIX_order_payment` DROP COLUMN `id_order`, DROP COLUMN `id_order_invoice`; +-- update for all employee the last ids for notifications +UPDATE `PREFIX_employee` + SET `id_last_order`= (SELECT max(`id_order`) FROM `PREFIX_orders`), + SET `id_last_customer_message`= (SELECT max(`id_customer_message`) FROM `PREFIX_customer_message`), + SET `id_last_customer`= (SELECT max(`id_customer`) FROM `PREFIX_customer`); \ No newline at end of file