AnselUpgradeComputestylehashes::up PHP Method

up() public method

public up ( )
    public function up()
    {
        // Migrate existing data for share
        $sql = 'SELECT attribute_style, share_id FROM ansel_shares';
        $this->announce('Computing style hashes from ansel_shares.', 'cli.message');
        $rows = $this->_connection->select($sql);
        $this->_ensureHashes($rows);
        // Migrate existing data for shareng
        $sql = 'SELECT attribute_style, share_id FROM ansel_sharesng';
        $this->announce('Computing style hashes from ansel_sharesng.', 'cli.message');
        $rows = $this->_connection->select($sql);
        $this->_ensureHashes($rows);
    }
AnselUpgradeComputestylehashes