{"record":{"id":"1227e005806f595b","repo":"yiisoft/yii2","slug":"does-not-support-adding-default-value-constrain","errorCode":null,"errorMessage":"{} does not support adding default value constraints.","messagePattern":"(.+?) does not support adding default value constraints\\.","errorType":"exception","errorClass":"yii\\base\\NotSupportedException","httpStatus":null,"severity":"error","filePath":"framework/db/QueryBuilder.php","lineNumber":1019,"sourceCode":"            . ' DROP CONSTRAINT ' . $this->db->quoteColumnName($name);\n    }\n\n    /**\n     * Creates a SQL command for adding a default value constraint to an existing table.\n     * @param string $name the name of the default value constraint.\n     * The name will be properly quoted by the method.\n     * @param string $table the table that the default value constraint will be added to.\n     * The name will be properly quoted by the method.\n     * @param string $column the name of the column to that the constraint will be added on.\n     * The name will be properly quoted by the method.\n     * @param mixed $value default value.\n     * @return string the SQL statement for adding a default value constraint to an existing table.\n     * @throws NotSupportedException if this is not supported by the underlying DBMS.\n     * @since 2.0.13\n     */\n    public function addDefaultValue($name, $table, $column, $value)\n    {\n        throw new NotSupportedException($this->db->getDriverName() . ' does not support adding default value constraints.');\n    }\n\n    /**\n     * Creates a SQL command for dropping a default value constraint.\n     * @param string $name the name of the default value constraint to be dropped.\n     * The name will be properly quoted by the method.\n     * @param string $table the table whose default value constraint is to be dropped.\n     * The name will be properly quoted by the method.\n     * @return string the SQL statement for dropping a default value constraint.\n     * @throws NotSupportedException if this is not supported by the underlying DBMS.\n     * @since 2.0.13\n     */\n    public function dropDefaultValue($name, $table)\n    {\n        throw new NotSupportedException($this->db->getDriverName() . ' does not support dropping default value constraints.');\n    }\n\n    /**","sourceCodeStart":1001,"sourceCodeEnd":1037,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/db/QueryBuilder.php#L1001-L1037","documentation":"Error \"{} does not support adding default value constraints.\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/db/QueryBuilder.php:1019 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"66f00d18a29b520f85e8e8f1e32d1e7e7b556cac","analyzedAt":"2026-08-17T05:17:23.470Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}