We have a installed a third party module on an existing Magento installation which creates some new order statuses in its setup script like this:
$statusTable = $installer->getTable('sales/order_status'); $data = array( array('status' => 'authorized', 'label' => 'Authorized Payment'), array('status' => 'canceled_saferpay', 'label' => 'Canceled by Saferpay') ); $installer->getConnection()->insertArray($statusTable, array('status', 'label'), $data);
Everything went fine until we tried to initialize a new database with the existing Magento code (which is already including the module).
Now we get a duplicate key constraint violation in the
sales_order_status table, complaining that the entry
authorized already exists.