adoSchema::SetUpgradeMethod PHP Method

SetUpgradeMethod() public method

Use this method to specify how existing database objects should be upgraded. The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to alter each database object directly, REPLACE attempts to rebuild each object from scratch, BEST attempts to determine the best upgrade method for each object, and NONE disables upgrading. This method is not yet used by AXMLS, but exists for backward compatibility. The ALTER method is automatically assumed when the adoSchema object is instantiated; other upgrade methods are not currently supported.
public SetUpgradeMethod ( string $method = '' )
$method string Upgrade method (ALTER|REPLACE|BEST|NONE)
    function SetUpgradeMethod($method = '')
    {
        if (!is_string($method)) {
            return FALSE;
        }
        $method = strtoupper($method);
        // Handle the upgrade methods
        switch ($method) {
            case 'ALTER':
                $this->upgrade = $method;
                break;
            case 'REPLACE':
                $this->upgrade = $method;
                break;
            case 'BEST':
                $this->upgrade = 'ALTER';
                break;
            case 'NONE':
                $this->upgrade = 'NONE';
                break;
            default:
                // Use default if no legitimate method is passed.
                $this->upgrade = XMLS_DEFAULT_UPGRADE_METHOD;
        }
        return $this->upgrade;
    }