prorm API Reference
    Preparing search index...

    Interface TableColumnDefinition

    Column definition for createTable/alterTable

    interface TableColumnDefinition {
        type: DataType;
        allowNull?: boolean;
        defaultValue?: any;
        primaryKey?: boolean;
        autoIncrement?: boolean;
        unique?: string | boolean;
        references?: {
            model: string;
            key: string;
            deferrable?: string;
            onDelete?: string;
            onUpdate?: string;
        };
        comment?: string;
        validate?: Record<string, any>;
    }
    Index
    type: DataType
    allowNull?: boolean
    defaultValue?: any
    primaryKey?: boolean
    autoIncrement?: boolean
    unique?: string | boolean
    references?: {
        model: string;
        key: string;
        deferrable?: string;
        onDelete?: string;
        onUpdate?: string;
    }
    comment?: string
    validate?: Record<string, any>