'How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

my website running perfect but today 1 order is placed by the customer, and I am getting this error in my website.

Here is the screenshot of error

enter image description here

error is here.. Fatal error: Uncaught RuntimeException: Error saving action: Error saving action: Duplicate entry '0' for key 'PRIMARY' in /home/website/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:44



Solution 1:[1]

Go to table structure and then hover on More option in front of id field and then click on primary key. Here is screenshot

if problem still there after doing this then click on change in front of id field and check the A.I checkbox

Here is screenshot

Solution 2:[2]

Error resolved when I changed id=0 to id=1 in

actionscheduler_actions

table.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Subhan Khalid
Solution 2 cigien