php bin/magento setup:upgrade 报错

5.89K 浏览M2交流区

php bin/magento setup:upgrade 报错

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Mageplaza_HelloWorld' for key 'PRIMARY', query was: INSERT INTO `setup_module` (`module`, `schema_version`) VALUES (?, ?)

0

https://magento.stackexchange.com/questions/112293/mysql-error-and-possible-duplicates-running-bin-magento-setupupgrade-after-rena

1.find  setup_module  table  name  in  database
2.then  find  the  row  which  contains  the  name  of  your  module
3.delete  the  row  containing  the  old  module  only  (when  you  run  setup:upgrade  it  will  automatically  be  re-generated)
4.run  the  command  bin/magento  setup:upgrade
I  hope  now  your  get  fixed.  for  any  clarification  mention  in  comment

Reason:  your  old  module  information  already  exist,  so  whenever  you  run,  its  get  conflict.After  removing  old  module  information  its  successfully  get  upgrade.

have  good  luck.

share

0