I'm fairly sure I'm missing something obvious here, but I can't see it.

I've added an install script to a module I've built, I've double checked it against Alan Storm's excellent tutorial, and I'm sure everything is correct, but it won't play ball.

I'm clearing the entry from core_resource each time, and I'm clearing the cache (all of the cache is disabled anyway, but I'm clearing it for good measure!!)

config.xml looks like this:

<?xml version="1.0"?>



class Lw_Restrict_Model_Resource_Mysql4_Setup extends Mage_Core_Model_Resource_Setup {





The install script was previously more complicated, adding attributes etc, but I stripped it back to this test just to make sure it wasn't that.

What happens when I clear everything and run this is that the site loads as normal, a row is added to core_resource, but it doesn't die (and previously it didn't add the attributes)

If someone can point out what I'm missing that'd be great!!!

1 Answer 1


Have you deleted the reference in the database to your module's version number?

It should be in the core_resource table under restrict_setup

If so, perhaps try <lw_restrict_setup> rather than <restrict_setup> and remove the <connection> tag altogether.

Also, rename the restrict_setup folder in




and then add within your <global> tag:

  • 1
    Thanks - didn't need to add to <models>, but made your other suggested changes and it worked! May 18, 2015 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.