defaultFunctions

Experimental Feature

This configuration entry is related to an Experimental (Optional) feature called Custom Attribute Functions. Before you start to configure this section, make sure to read the page specific for this feature (accessible here) and this page that explains how to enable Experimental Features.

Versioning History

API Version v2.0.0 - Introduced defaultFunctions configuration option.

Configure the default function for this column. The key of this element is a field from a model, and the value is the default value of said column. To configure default functions, add these lines to your configuration object:

prisma-util.config.mjs
export default {
    // Other configuration lines
    defaultFunctions: {
        "filePath:Model.column": (dmmf) => "defaultValue"
    }
};

Last updated