UNPKG

@blitzjs/installer

Version:

Package installation for the Blitz CLI

21 lines (20 loc) 783 B
import { ModelAttribute } from '@mrleebo/prisma-ast'; /** * Adds a field to a model in your schema.prisma data model. * * @remarks Not ready for actual use * @param source - schema.prisma source file contents * @param modelName - name of the model to add a field to * @param attributeProps - the model attribute (such as an index) to add * @returns The modified schema.prisma source * @example Usage * ``` * addPrismaModelAttribute(source, "Project", { * type: "attribute", * kind: "model", * name: "index", * args: [{ type: "attributeArgument", value: { type: "array", args: ["name"] } }] * }); * ``` */ export declare function addPrismaModelAttribute(source: string, modelName: string, attributeProps: ModelAttribute): Promise<string>;