The requirement is that I want to execute a script upon the installation of my extension. But I want to make sure that it runs only once and then never again.
I tried doing this via Setup Resources. But apparently, it runs not only when the user installs the extension but also when the clears the cache and other actions etc.
Setup.php
class My_Module_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
{
function __construct($arg)
{
# Code that I want to run only once
parent::__construct($arg);
}
}
Is there a specific way to achieve this without having to write stuff to the database?