Skip to content

AutoMigrate 自动迁移不支持 带中文的字段名及解决办法 #150

@x1056795985

Description

@x1056795985

AutoMigrate 自动迁移不支持 带中文的字段名 经查询发现是(d *ddl) getColumns() 通过正则获取字段名的表达式不支持中文

reg := regexp.MustCompile("^[\"']?([\w\d]+)["']?") 替换为
reg := regexp.MustCompile("^[\"']?([^\\s\"'`,;()=\\[\\]{}]+)[\"'`]?") ` 即可修复该问题``

非常棒的库,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions