Skip to content

support use 'text' type as enum type for Mysql #8

@richardo2016

Description

@richardo2016

sometimes we want define one enumerable type, as we hope it can be add/remove enum values dynamicly. As of MySQL, if we define one field orm model with type enum, it would create one field in mysql with enum column type(MySQL's).

orm.define("test", {
     "types": {
         // mark it's one enum type type, use validator before instance save, but it's not enum type in MySQL
         type: 'text_enum', 
         // column size
         size: 64,
     }
})

or just upgrade @fxjs/sql-ddl-sync to support defining required custom property.datastoreType(prop).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions