protected function optimizePrimaryKey()
    {
        if ($this->field->isPrimary()) {
			$this->field->isNullable = false;
				
            if ($this->meta == null) {
                $this->field->isOnFormView = false;
                $this->field->isOnIndexView = false;
                $this->field->isOnShowView = false;

                return $this;
            }

            if (!array_key_exists('is-on-views', $this->meta)) {
                if (!array_key_exists('is-on-form', $this->meta)) {
                    $this->field->isOnFormView = false;
                }

                if (!array_key_exists('is-on-index', $this->meta)) {
                    $this->field->isOnIndexView = false;
                }

                if (!array_key_exists('is-on-show', $this->meta)) {
                    $this->field->isOnShowView = false;
                }
            }
        }

        return $this;
    }