framework/db/Command.php
public function addCheck($name, $table, $expression)
    {
        $sql = $this->db->getQueryBuilder()->addCheck($name, $table, $expression);

        return $this->setSql($sql)->requireTableSchemaRefresh($table);
    }
public function addCheck($name, $table, $expression)
    {
        $sql = $this->db->getQueryBuilder()->addCheck($name, $table, $expression);

        return $this->setSql($sql)->requireTableSchemaRefresh($table);
    }
public function addCheck ( $ name , $ table , $ expression ) { $ sql = $ this -> db -> getQueryBuilder ( ) -> addCheck ( $ name , $ table , $ expression ) ; return $ this -> setSql ( $ sql ) -> requireTableSchemaRefresh ( $ table ) ; }
Creates a SQL command for adding a check constraint to an existing table.
@param string $name the name of the check constraint.
The name will be properly quoted by the method.
@param string $table the table that the check constraint will be added to.
The name will be properly quoted by the method.
@param string $expression the SQL of the `CHECK` constraint.
@return $this the command object itself.
@since 2.0.13
Creates a SQL command for adding a check constraint to an existing table .