Libraries v5.0.0
    Preparing search index...

    Interface AddColumnDiff

    A column to add in a migration.

    interface AddColumnDiff {
        defaultValue?: any;
        name: string;
        nullable: boolean;
        onDelete?: string;
        onUpdate?: string;
        references?: { column: string; table: string };
        type: string;
    }
    Index
    defaultValue?: any

    Optional default value or expression metadata for the new column.

    name: string

    Physical SQL name of the new column.

    nullable: boolean

    Whether the new column permits SQL NULL.

    onDelete?: string

    Optional ON DELETE action for the reference.

    onUpdate?: string

    Optional ON UPDATE action for the reference.

    references?: { column: string; table: string }

    Optional referenced table/column for a new foreign key.

    type: string

    SQL type to create, including any declared length/precision.