yii\db\ColumnSchemaBuilder::buildNotNullString PHP Method

buildNotNullString() protected method

Builds the not null constraint for the column.
protected buildNotNullString ( ) : string
return string returns 'NOT NULL' if [[isNotNull]] is true, 'NULL' if [[isNotNull]] is false or an empty string otherwise.
    protected function buildNotNullString()
    {
        if ($this->isNotNull === true) {
            return ' NOT NULL';
        } elseif ($this->isNotNull === false) {
            return ' NULL';
        } else {
            return '';
        }
    }