framework/db/SchemaBuilderTrait.php
public function decimal($precision = null, $scale = null)
    {
        $length = [];
        if ($precision !== null) {
            $length[] = $precision;
        }
        if ($scale !== null) {
            $length[] = $scale;
        }

        return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_DECIMAL, $length);
    }
public function decimal($precision = null, $scale = null)
    {
        $length = [];
        if ($precision !== null) {
            $length[] = $precision;
        }
        if ($scale !== null) {
            $length[] = $scale;
        }

        return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_DECIMAL, $length);
    }
public function decimal ( $ precision = null , $ scale = null ) { $ length = [ ] ; if ( $ precision !== null ) { $ length [ ] = $ precision ; } if ( $ scale !== null ) { $ length [ ] = $ scale ; } return $ this -> getDb ( ) -> getSchema ( ) -> createColumnSchemaBuilder ( Schema :: TYPE_DECIMAL , $ length ) ; }
Creates a decimal column.
@param int $precision column value precision, which is usually the total number of digits.
First parameter passed to the column type, e.g. DECIMAL(precision, scale).
This parameter will be ignored if not supported by the DBMS.
@param int $scale column value scale, which is usually the number of digits after the decimal point.
Second parameter passed to the column type, e.g. DECIMAL(precision, scale).
This parameter will be ignored if not supported by the DBMS.
@return ColumnSchemaBuilder the column instance which can be further customized.
@since 2.0.6
Creates a decimal column .