I've renamed a custom module from MagicPack_magicheader to MagicPack_Magicheader and trying to now update by running setup:upgrade. I get the following error:
[Zend_Db_Statement_Exception]
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'MagicPack_Magicheader' for key 'PRIMARY', query was: INSERT INTO `setup_module` (`module`, `schema_version`) VALUES (?, ?)
[PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'MagicPack_Magicheader' for key 'PRIMARY'
On the site itself, it tells me to run upgrade, but I've noticed two entries:
The following modules are outdated:
MagicPack_Magicheader schema: current version - none, required version - 0.2.0
MagicPack_Magicheader data: current version - none, required version - 0.2.0
This seems to match the issue with duplicate entries. Can anyone let me know why there are duplicate entries, one for schema and one for data? The module.xml file is as follows:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="MagicPack_Magicheader" setup_version="0.0.1"/>
</config>
Thanks