Update is_required for Existing Attribute Code

Create sql script to update region attribute

$installer->startSetup();
/*** Update customer address attributes*/
$installer->updateAttribute('customer_address', 'region', 'is_required', true); 

/*** Update order address attributes*/
$installer->updateAttribute('order_address', 'region', 'is_required', true);  
$installer->endSetup();

I hope above code will help


I am writing this updates is simply sharing my research and hope could help someone out there.

config.xml

<config>
    <modules>
        <Package_Module>
            <version>0.0.2</version>
        </Package_Module>
    </modules>
    <global>
        <resources>
            <module_setup>
                <setup>
                    <module>Package_Module</module>
                    <!-- 
                     Create a Switchable Installer Script 
                     This class is incredibly handy in case you need different setup classes 
                     -->
                    <class>Package_Module_Model_Resource_Setup</class> 
                </setup>
            </module_setup>
        </resources>
    </global>
<config>

Custom Setup Class: Package_Module_Model_Resource_Setup

class Package_Module_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
{
    public function getCatalogResourceSetup()
    {
        return new Mage_Catalog_Model_Resource_Setup('module_setup');
    }
    public function getCustomerResourceSetup()
    {
        return new Mage_Customer_Model_Resource_Setup('module_setup');
    }
    public function getCustomerEntitySetup() 
    {
        return new Mage_Customer_Model_Entity_Setup('module_setup');
    }
}

Upgrade Script: mysql4-upgrade-0.0.1-0.0.2.php

<?php
/* @var $installer Package_Module_Model_Resource_Setup */
$installer = $this->getCustomerEntitySetup();

$installer->startSetup();
/*** Update customer address attributes*/
$installer->updateAttribute('customer_address', 'region', 'is_required', 1);

$installer->endSetup();

Hereby a great article that shared about 'Switchable Installer Script'. Source link: inchoo.net