src/Charcoal/Admin/Script/Object/Table/AlterPrimaryKeyScript.php
private function oldPrimaryKey()
    {
        if ($this->oldPrimaryKey === null) {
            if ($this->isPrimaryKeyDifferent()) {
                $oldKey = $this->climate()->arguments->get('old_key');
            } else {
                $oldKey = $this->targetModel()->key();
            }

            $this->oldPrimaryKey = $oldKey;
        }

        return $this->oldPrimaryKey;
    }
private function oldPrimaryKey()
    {
        if ($this->oldPrimaryKey === null) {
            if ($this->isPrimaryKeyDifferent()) {
                $oldKey = $this->climate()->arguments->get('old_key');
            } else {
                $oldKey = $this->targetModel()->key();
            }

            $this->oldPrimaryKey = $oldKey;
        }

        return $this->oldPrimaryKey;
    }
private function oldPrimaryKey ( ) { if ( $ this -> oldPrimaryKey === null ) { if ( $ this -> isPrimaryKeyDifferent ( ) ) { $ oldKey = $ this -> climate ( ) -> arguments -> get ( 'old_key' ) ; } else { $ oldKey = $ this -> targetModel ( ) -> key ( ) ; } $ this -> oldPrimaryKey = $ oldKey ; } return $ this -> oldPrimaryKey ; }
Retrieve the target model's old primary key name.

@return string|null
Retrieve the target model s old primary key name .