yiisoft/yii2 · error · yii\base\NotSupportedException
{} does not support adding default value constraints.
Error message
{} does not support adding default value constraints. What it means
Error "{} does not support adding default value constraints." thrown in yiisoft/yii2.
Source
Thrown at framework/db/QueryBuilder.php:1019
. ' DROP CONSTRAINT ' . $this->db->quoteColumnName($name);
}
/**
* Creates a SQL command for adding a default value constraint to an existing table.
* @param string $name the name of the default value constraint.
* The name will be properly quoted by the method.
* @param string $table the table that the default value constraint will be added to.
* The name will be properly quoted by the method.
* @param string $column the name of the column to that the constraint will be added on.
* The name will be properly quoted by the method.
* @param mixed $value default value.
* @return string the SQL statement for adding a default value constraint to an existing table.
* @throws NotSupportedException if this is not supported by the underlying DBMS.
* @since 2.0.13
*/
public function addDefaultValue($name, $table, $column, $value)
{
throw new NotSupportedException($this->db->getDriverName() . ' does not support adding default value constraints.');
}
/**
* Creates a SQL command for dropping a default value constraint.
* @param string $name the name of the default value constraint to be dropped.
* The name will be properly quoted by the method.
* @param string $table the table whose default value constraint is to be dropped.
* The name will be properly quoted by the method.
* @return string the SQL statement for dropping a default value constraint.
* @throws NotSupportedException if this is not supported by the underlying DBMS.
* @since 2.0.13
*/
public function dropDefaultValue($name, $table)
{
throw new NotSupportedException($this->db->getDriverName() . ' does not support dropping default value constraints.');
}
/**View on GitHub (pinned to 66f00d18a2)
When it happens
Trigger: Thrown at framework/db/QueryBuilder.php:1019 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of yiisoft/yii2@66f00d18a2 (2026-08-17).
Data as JSON: /api/errors/1227e005806f595b.
Report an issue: GitHub.